vouchersForAccount
Query the voucher purchases for an account.
Arguments
The account number.
An optional date to limit the response to vouchers that are available before the particular date (exclusive).
An optional date to limit the response to vouchers that are available from the particular date (inclusive) onwards.
An optional list of display names to exclude from the results (case-insensitive).
Whether to exclude refunded vouchers from the response. By default, refunded vouchers will be included in the response.
An optional date to limit the response to vouchers that have been purchased before the particular date (exclusive).
An optional date to limit the response to vouchers that have been purchased from the particular date (inclusive) onwards.
Whether to only return vouchers that can be redeemable.
Examples
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-EA7C06AF",
"after": "YXJyYXljb25uZWN0aW9uOjEw=",
"availableBeforeDate": "2004-03-23",
"availableFromDate": "2014-03-10",
"before": "YXJyYXljb25uZWN0aW9uOjEw=",
"excludeByDisplayName": "style-develop-assume-particularly-his",
"excludeRefunded": true,
"first": 10,
"last": 10,
"purchasedBeforeDate": "2010-04-05",
"purchasedFromDate": "1986-08-20",
"redeemableOnly": true
}
Response
{
"data": {
"vouchersForAccount": {
"edgeCount": 56,
"edges": [VoucherPurchaseConnectionTypeEdge],
"pageInfo": PageInfo,
"totalCount": 1
}
}
}