v1

latestOpenAPI 3.0.12026-07-21161785.3 KB
Redemptions & Discount Codes

Check discount code validity

put/api/external/check-discount

Request body

customerIdinteger required

Shopify customer ID (numeric). Identifies which customer is attempting to use the discount code. Used to verify the discount code belongs to this customer. Example: 67890

discountCodestring required

The discount code to validate. Case-insensitive. This is the code the customer enters at checkout. System will check if:

  • Code exists in loyalty system
  • Code belongs to this customer
  • Code status is UNUSED or ACTIVE
  • Code has not expired Examples: "LOYALTY15OFF", "VIP20", "WELCOME10"

Example request

{
  "customerId": 67890,
  "discountCode": "LOYALTY15OFF"
}

Response

Discount code is valid and reward details returned

amountnumber double
createAtstring date-time required
customerIdinteger required
descriptionstring
discountCodestring required
discountCodeIdstring
expireDatestring date-time
idinteger
lastExpiryReminderSentDatestring date-time
orderIdinteger
orderNamestring
pointRedeemRuleIdinteger
pointTransactionIdinteger
productDatastring
rewardType'STORE_CREDIT' | 'DISCOUNT_CODE' | 'POINTS'
shopstring required
status'USED' | 'UNUSED' | 'REFUNDED' | 'EXPIRED' | 'SUBSCRIPTION_ACTIVE' | 'CANCELED' required
usageCountinteger
usedAtstring date-time
variantIdinteger