G_giftCards
Supported arguments
The following arguments are supported by G_giftCards query:
Field | Type | Description |
---|---|---|
batchId | G_Uuid | The ID of the purchased batch |
transactionId | String | Your internal ID of the purchased batch |
Return type
The query returns theG_API_GiftCardCode
type.
Example usage
You can get list of codes by batch id
Query
query {
G_giftCards(batchId:"a602db96-28f5-11ed-a40c-065b8b9f71c6")
{
denomination {
amount
currency
}
id
code
state
}
}
Result
{
"data": {
"G_giftCards": [
{
"denomination": {
"amount": 100,
"currency": "EUR"
},
"id": "a602db96-28f5-11ed-a40c-065b8b9f71c2",
"code": "*****-*****-*****",
"state": "AVAILABLE"
},
{
"denomination": {
"amount": 100,
"currency": "EUR"
},
"id": "a602db96-28f5-11ed-a40c-065b8b9f71c3",
"code": "*****-*****-*****",
"state": "AVAILABLE"
},
{
"denomination": {
"amount": 100,
"currency": "EUR"
},
"id": "a602db96-28f5-11ed-a40c-065b8b9f71c4",
"code": "*****-*****-*****",
"state": "AVAILABLE"
}
]
}
}