Skip to main content
PUT
Update discount code status

Body

application/json

Request containing customer ID, discount code, and new status

customerId
integer<int64>
required

Shopify customer ID (numeric) of the customer who owns the reward.

Example:

67890

discountCode
string
required

The reward's discount code. The lookup ignores case, and the reward keeps the spelling you send. A code that doesn't belong to customerId changes nothing, and the call returns 400 "Discount is not found".

Example:

"LOYALTY15OFF"

status
enum<string>
required

New status for the reward. One of USED, UNUSED, EXPIRED, REFUNDED, CANCELED or SUBSCRIPTION_ACTIVE. The operation description says what each one does at checkout. A reward that is already USED can't be changed.

Available options:
USED,
UNUSED,
REFUNDED,
EXPIRED,
SUBSCRIPTION_ACTIVE,
CANCELED
Example:

"USED"

Response

The reward with its new status.

createAt
string<date-time>
required
customerId
integer<int64>
required
discountCode
string
required
shop
string
required
status
enum<string>
required
Available options:
USED,
UNUSED,
REFUNDED,
EXPIRED,
SUBSCRIPTION_ACTIVE,
CANCELED
activeFrom
string<date-time>
amount
number<double>
description
string
discountCodeId
string
expireDate
string<date-time>
id
integer<int64>
lastExpiryReminderSentDate
string<date-time>
orderId
integer<int64>
orderName
string
pointRedeemRuleId
integer<int64>
pointTransactionId
integer<int64>
productData
string
rewardType
enum<string>
Available options:
STORE_CREDIT,
DISCOUNT_CODE,
POINTS
usageCount
integer<int64>
usedAt
string<date-time>
variantId
integer<int64>