Gift Cards
Mutation
createGiftCard — Returns GiftCard
No scope required
Create an internal gift card
| Arguments | Type | Description |
|---|---|---|
|
id |
String |
The client ID of the gift card, you can use this to store your own reference (this is not visible to the user) |
|
outlet |
The Outlet this gift card was purchased at |
|
|
code |
String! |
The unique code this gift card has |
|
amount |
Float! |
The amount of money that the gift card is loaded with |
|
expiry |
When the gift card will expire |
|
|
additional |
Any additional information to include with the gift card, this is not used by Shopfront in any way |
Example Mutation
mutation CreateGiftCards($outlet: ID!, $code: String!, $amount: Float!, $expiry: DateTime!) {
createGiftCard(outlet: $outlet, code: $code, amount: $amount, expiry: $expiry) {
id,
clientId,
originalAmount,
currentAmount,
code
}
}
# Example variables
{
"outlet": "<OUTLET>",
"code": "<CODE>",
"amount": "<AMOUNT>",
"expiry": "<EXPIRY>"
}Mutation
updateGiftCard — Returns GiftCard
No scope required
This is currently an experimental mutation, please get in contact with us before using it.
| Arguments | Type | Description |
|---|---|---|
|
id |
The The |
|
|
amount |
Float! |
The |
|
expiry |
The |
Example Mutation
mutation UpdateGiftCards {
updateGiftCard {
id,
clientId,
originalAmount,
currentAmount,
code
}
}