GET

Get Discount Rule


Retrieves a discount rule.

Authentication

You can only call this method when authenticated as a Wix app or Wix user identity.

Permissions
Manage eCommerce - all permissions
Read eCommerce - all read permissions
Manage Stores - all permissions
Read Stores - all read permissions
Manage Restaurants - all permissions
Learn more about app permissions.
Endpoint
GET
https://www.wixapis.com/ecom/v1/discount-rules/{discountRuleId}

Path Params
discountRuleIdstringRequired

ID of the discount rule to retrieve.

Response Object
discountRuleDiscountRule

The requested discount rule.

Get Discount Rule Example 1
Request
cURL
curl 'https://www.wixapis.com/ecom/v1/discount-rules/15bac455-10d0-4478-8358-e06f697f6180' \ -H 'Authorization: <AUTH>'
Response
JSON
{ "id": "15bac455-10d0-4478-8358-e06f697f6180", "revision": "8", "createdDate": "2022-08-07T08:12:22.347Z", "updatedDate": "2022-08-09T07:45:44.044Z", "active": true, "name": "My Amazing 10% Discount", "trigger": { "and": { "triggers": [ { "subtotalRange": { "scopes": [ { "id": "specific_215238eb-22a5-4c36-9e7b-e7c08025e04e", "type": "CATALOG_ITEM", "catalogItemFilter": { "catalogAppId": "215238eb-22a5-4c36-9e7b-e7c08025e04e", "catalogItemIds": [ "f150b16a-79ef-ef81-50f9-22e2df631822", "187a07f6-b670-0650-c891-d60aeb797ee0" ] } } ], "from": "100", "to": null }, "triggerType": "SUBTOTAL_RANGE" }, { "itemQuantityRange": { "scopes": [ { "id": "specific_215238eb-22a5-4c36-9e7b-e7c08025e04e", "type": "CATALOG_ITEM", "catalogItemFilter": { "catalogAppId": "215238eb-22a5-4c36-9e7b-e7c08025e04e", "catalogItemIds": [ "f150b16a-79ef-ef81-50f9-22e2df631822", "187a07f6-b670-0650-c891-d60aeb797ee0" ] } } ], "from": 5, "to": null }, "triggerType": "ITEM_QUANTITY_RANGE" } ] }, "triggerType": "AND" }, "activeTimeInfo": { "start": "2022-08-07T08:11:00Z", "end": "2022-08-11T07:43:00Z" }, "discounts": { "values": [ { "targetType": "SPECIFIC_ITEMS", "specificItemsInfo": { "scopes": [ { "id": "specific_215238eb-22a5-4c36-9e7b-e7c08025e04e", "type": "CATALOG_ITEM", "catalogItemFilter": { "catalogAppId": "215238eb-22a5-4c36-9e7b-e7c08025e04e", "catalogItemIds": [ "f150b16a-79ef-ef81-50f9-22e2df631822", "187a07f6-b670-0650-c891-d60aeb797ee0" ] } } ] }, "percentage": 10, "discountType": "PERCENTAGE" } ] }, "status": "LIVE", "usageCount": 6 }
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?