Skip to main content

Arguments

accountNumber : ID! required

The account number.

after : String
availableBeforeDate : Date

An optional date to limit the response to vouchers that are available before the particular date (exclusive).

availableFromDate : Date

An optional date to limit the response to vouchers that are available from the particular date (inclusive) onwards.

before : String
excludeByDisplayName : [String]

An optional list of display names to exclude from the results (case-insensitive).

excludeRefunded : Boolean

Whether to exclude refunded vouchers from the response. By default, refunded vouchers will be included in the response.

first : Int
last : Int
purchasedBeforeDate : Date

An optional date to limit the response to vouchers that have been purchased before the particular date (exclusive).

purchasedFromDate : Date

An optional date to limit the response to vouchers that have been purchased from the particular date (inclusive) onwards.

redeemableOnly : Boolean! required

Whether to only return vouchers that can be redeemable.

Allowed Viewers

Customer Partner User Third party

Required Permissions

Can access customer queries
OR Can view account vouchers

Query Complexity

1

Examples

The example data in the variables and responses below are autogenerated values designed to resemble real inputs. They do not represent actual customer data, and in some cases may require additional validation.

Query

query VouchersForAccount( $accountNumber: ID!, $after: String, $availableBeforeDate: Date, $availableFromDate: Date, $before: String, $excludeByDisplayName: [String], $excludeRefunded: Boolean, $first: Int, $last: Int, $purchasedBeforeDate: Date, $purchasedFromDate: Date, $redeemableOnly: Boolean! ) { vouchersForAccount( accountNumber: $accountNumber, after: $after, availableBeforeDate: $availableBeforeDate, availableFromDate: $availableFromDate, before: $before, excludeByDisplayName: $excludeByDisplayName, excludeRefunded: $excludeRefunded, first: $first, last: $last, purchasedBeforeDate: $purchasedBeforeDate, purchasedFromDate: $purchasedFromDate, redeemableOnly: $redeemableOnly ) { edgeCount edges { ...VoucherPurchaseConnectionTypeEdgeFragment } pageInfo { ...PageInfoFragment } totalCount } }

Variables

{ "accountNumber": "A-C4517F9B", "after": "YXJyYXljb25uZWN0aW9uOjEw=", "availableBeforeDate": "2019-05-05", "availableFromDate": "1976-08-02", "before": "YXJyYXljb25uZWN0aW9uOjEw=", "excludeByDisplayName": "American-region-institution-road-effect", "excludeRefunded": true, "first": 10, "last": 10, "purchasedBeforeDate": "2005-05-29", "purchasedFromDate": "2020-10-31", "redeemableOnly": true }

Response

{ "data": { "vouchersForAccount": { "edgeCount": 8, "edges": [VoucherPurchaseConnectionTypeEdge], "pageInfo": PageInfo, "totalCount": 79 } } }