get https://app.ecwid.com/api/v3//discount_coupons/
Get discount coupon details
Request and response example
Request:
curl --location 'https://app.ecwid.com/api/v3/1003/discount_coupons/DISC' \
--header 'Authorization: Bearer secret_ab***cd'
Response:
{
"id": 162428889,
"name": "Summer Promo",
"code": "DISC",
"discountType": "ABS",
"status": "ACTIVE",
"discount": 10,
"launchDate": "2022-07-28 23:00:00 +0000",
"usesLimit": "UNLIMITED",
"repeatCustomerOnly": false,
"applicationLimit": "UNLIMITED",
"creationDate": "2022-07-29 15:22:35 +0000",
"updateDate": "2024-05-01 05:26:28 +0000",
"orderCount": 1
}
Access scopes
Requires the following access scope: read_discount_coupons
Path params
Param | Type | Description |
---|---|---|
storeId | number | Ecwid store ID. |
couponIdentifier | string | Discount coupon ID or discount coupon code. |
Query params
All query params are optional.
Name | Type | Description |
---|---|---|
responseFields | string | Limit JSON response by specific fields. If specified, all missing fields will be removed from the response body. Example: ?responseFields=id,name,status |
Example of using responseFields
param:
curl --location 'https://app.ecwid.com/api/v3/1003/discount_coupons/DISC?responseFields=id,name,status' \
--header 'Authorization: Bearer secret_ab***cd'
{
"id": 162428889,
"name": "Summer Promo",
"status": "ACTIVE"
}
Headers
The Authorization header with a secret access token is required.
Header | Format | Description |
---|---|---|
Authorization | Bearer secret_ab***cd | Access token of the application. |
Response
A JSON object with the following fields:
Field | Type | Description |
---|---|---|
id | number | Internal unique coupon ID. |
name | string | Discount coupon name visible on the storefront. |
code | string | Discount coupon code used for its activation at the checkout. |
discountType | string | Discount type: ABS , PERCENT , SHIPPING , ABS_AND_SHIPPING , PERCENT_AND_SHIPPING |
status | string | Discount coupon state: ACTIVE , PAUSED , EXPIRED or USEDUP |
discount | number | Discount coupon value. |
launchDate | string | The date of coupon launch, e.g. 2014-06-06 08:00:00 +0400 . Any date provided will be corrected to the UTC timezone |
expirationDate | string | Coupon expiration date, e.g. 2014-06-06 08:00:00 +0400 . Any date provided will be corrected to the UTC timezone |
totalLimit | number | Minimum order subtotal for the discount coupon to be applied. |
usesLimit | string | Number of uses limitation: UNLIMITED , ONCEPERCUSTOMER , SINGLE |
repeatCustomerOnly | boolean | DEPRECATED Use applicationLimit instead. |
applicationLimit | string | User application limit for the discount coupon. Supported values: "UNLIMITED" - no user application limits."NEW_CUSTOMER_ONLY" - discount coupon can be applied only by customers without placed orders."REPEAT_CUSTOMER_ONLY" - discount coupon can be applied only by customers who placed orders in the store before. |
creationDate | string | Coupon creation date. Format example: 2023-06-29 11:36:55 +0000 |
updateDate | string | Coupon update date. Format example: 2023-06-29 11:36:55 +0000 |
orderCount | number | Counter for the discount coupon uses. |
catalogLimit | Object catalogLimit | Product and category limitations for the discount coupon. If empty, discount coupon can be applied to all products and categories available on the storefront. |
shippingLimit | Object shippingLimit | Shipping method limitations for the discount coupon. If empty, discount coupon can be applied to any shipping method available at the checkout. |
catalogLimit
Field | Type | Description |
---|---|---|
products | Array of numbers | List of product IDs the discount coupon can be applied to, e.g. [123456,234567] |
categories | Array of numbers | List of category IDs the discount coupon can be applied to, e.g. [0,87253552,765257901] |
shippingLimit
Field | Type | Description |
---|---|---|
shippingMethods | Array of strings | List of shipping method IDs the discount coupon can be applied to, e.g. ["18765-8651899366181"] |