curl --request PUT \
--url https://loyalty-admin.appstle.com/api/external/update-discount \
--header 'Content-Type: application/json' \
--data '
{
"customerId": 67890,
"discountCode": "LOYALTY15OFF",
"status": "USED"
}
'{
"id": 12345,
"customerId": 67890,
"discountCode": "LOYALTY15OFF",
"discountType": "PERCENTAGE",
"discountValue": 15,
"status": "USED",
"expiryDate": "2025-06-30T23:59:59Z",
"pointsRedeemed": 100,
"usedAt": "2025-01-29T10:45:00Z",
"createAt": "2025-01-15T10:30:00Z"
}Documentation Index
Fetch the complete documentation index at: https://developers.appstle.com/llms.txt
Use this file to discover all available pages before exploring further.
Request containing customer ID, discount code, and new status
Shopify customer ID (numeric). Identifies which customer owns the discount code. Used to verify the discount code belongs to this customer before updating. Example: 67890
67890
The discount code to update. Case-insensitive. Must be a valid loyalty discount code that belongs to the specified customer. Examples: "LOYALTY15OFF", "VIP20", "WELCOME10"
100"LOYALTY15OFF"
New status for the discount code. Valid values:
Status transitions:
Note: Cannot mark already USED codes as USED again.
USED, UNUSED, REFUNDED, EXPIRED, SUBSCRIPTION_ACTIVE, USED, UNUSED, SUBSCRIPTION_ACTIVE, EXPIRED "USED"
Discount code status successfully updated
USED, UNUSED, REFUNDED, EXPIRED, SUBSCRIPTION_ACTIVE STORE_CREDIT, DISCOUNT_CODE, POINTS curl --request PUT \
--url https://loyalty-admin.appstle.com/api/external/update-discount \
--header 'Content-Type: application/json' \
--data '
{
"customerId": 67890,
"discountCode": "LOYALTY15OFF",
"status": "USED"
}
'{
"id": 12345,
"customerId": 67890,
"discountCode": "LOYALTY15OFF",
"discountType": "PERCENTAGE",
"discountValue": 15,
"status": "USED",
"expiryDate": "2025-06-30T23:59:59Z",
"pointsRedeemed": 100,
"usedAt": "2025-01-29T10:45:00Z",
"createAt": "2025-01-15T10:30:00Z"
}