Skip to main content

validateVoucher Mutation

Description

Validates a voucher code for a checkout.

mutation validateVoucher($id: String!, $voucherId: String!) {
validateVoucher(id: $id, voucherId: $voucherId) {
id
value
originalValue
redeemType
redeemed
expires
unlimited
user {
_id
id
firstName
lastName
name
email
telephone
taxNumber
}
created
note {
date
content
}
}
}

Variables

{
"id": "08a16b83-9094-4e89-8c05-2ccadd5c1c7e",
"voucherId": "voucherId"
}

Response

{
"validateVoucher": {
"id": "example",
"value": "example",
"originalValue": "example",
"redeemType": "example",
"redeemed": true,
"expires": 1728136208001,
"unlimited": true,
"user": {
"_id": "a6ee32e107d1c0e5ba5306b3",
"id": "example",
"firstName": "example",
"lastName": "example",
"name": "example",
"email": "email@example.com",
"telephone": "example",
"taxNumber": "example"
},
"created": 1719772400226,
"note": {
"date": 1709214813564,
"content": "example"
}
}
}

Arguments

NameTypeDescription
idString!Checkout identifier string.
voucherIdString!Voucher identifier or code.

Returns

CheckoutVoucher