Skip to content

Mark reward code used

markRewardCodeUsed(customerId, rewardCodeId)

Section titled “markRewardCodeUsed(customerId, rewardCodeId)”

Marks a reward code as used, for example after the discount has been applied at an external checkout. The code is also deactivated in Shopify so it can no longer be redeemed. No stamps are refunded.

NameTypeRequiredDescription
customerIdID!YesThe Shopify customer ID the code belongs to.
rewardCodeIdID!YesThe reward code to mark used.

Returns a non-null RewardCode with used set to true.

FieldTypeDescription
idID!The reward code’s identifier.
nameStringReward name.
codeStringThe discount code.
usedBooleanWhether it has been used (now true).
createdAtDateTimeISO-8601 timestamp.
mutation {
markRewardCodeUsed(customerId: "6677889900", rewardCodeId: "501") {
id
code
used
}
}
{
"data": {
"markRewardCodeUsed": {
"id": "501",
"code": "APPY-5OFF-XXXX",
"used": true
}
}
}

Returns an error with message REWARD_CODE_NOT_FOUND if the code does not belong to the customer, or CUSTOMER_NOT_FOUND for an unknown customer.