Skip to main content

Arguments

idempotencyKey : String

Optional idempotency key to prevent the entire batch from being processed more than once on retry. If provided and already used, the mutation returns an error instead of creating duplicate purchases.

input : [PurchaseVoucherInput]! required

The list of vouchers to purchase.

Returns

PurchaseVouchers

Purchase multiple vouchers.

Allowed Viewers

Customer Partner User Third party

Required Permissions

Can create voucher purchase

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

mutation PurchaseVouchers( $idempotencyKey: String, $input: [PurchaseVoucherInput]! ) { purchaseVouchers( idempotencyKey: $idempotencyKey, input: $input ) { voucherPurchases { ...VoucherPurchaseTypeFragment } } }

Variables

{ "idempotencyKey": "walk-big-air-it-quickly", "input": PurchaseVoucherInput }

Response

{ "data": { "purchaseVouchers": { "voucherPurchases": [VoucherPurchaseType] } } }