Get discount coupon

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

ParamTypeDescription
storeIdnumberEcwid store ID.
couponIdentifierstringDiscount coupon ID or discount coupon code.

Query params

All query params are optional.

NameTypeDescription
responseFieldsstringLimit 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.

HeaderFormatDescription
AuthorizationBearer secret_ab***cdAccess token of the application.

Response

A JSON object with the following fields:

FieldTypeDescription
idnumberInternal unique coupon ID.
namestringDiscount coupon name visible on the storefront.
codestringDiscount coupon code used for its activation at the checkout.
discountTypestringDiscount type: ABS, PERCENT, SHIPPING, ABS_AND_SHIPPING, PERCENT_AND_SHIPPING
statusstringDiscount coupon state: ACTIVE, PAUSED, EXPIRED or USEDUP
discountnumberDiscount coupon value.
launchDatestringThe date of coupon launch, e.g. 2014-06-06 08:00:00 +0400. Any date provided will be corrected to the UTC timezone
expirationDatestringCoupon expiration date, e.g. 2014-06-06 08:00:00 +0400. Any date provided will be corrected to the UTC timezone
totalLimitnumberMinimum order subtotal for the discount coupon to be applied.
usesLimitstringNumber of uses limitation: UNLIMITED, ONCEPERCUSTOMER, SINGLE
repeatCustomerOnlybooleanDEPRECATED Use applicationLimit instead.
applicationLimitstringUser 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.
creationDatestringCoupon creation date. Format example: 2023-06-29 11:36:55 +0000
updateDatestringCoupon update date. Format example: 2023-06-29 11:36:55 +0000
orderCountnumberCounter for the discount coupon uses.
catalogLimitObject catalogLimitProduct and category limitations for the discount coupon. If empty, discount coupon can be applied to all products and categories available on the storefront.
shippingLimitObject shippingLimitShipping method limitations for the discount coupon. If empty, discount coupon can be applied to any shipping method available at the checkout.

catalogLimit

FieldTypeDescription
productsArray of numbersList of product IDs the discount coupon can be applied to, e.g. [123456,234567]
categoriesArray of numbersList of category IDs the discount coupon can be applied to, e.g. [0,87253552,765257901]

shippingLimit

FieldTypeDescription
shippingMethodsArray of stringsList of shipping method IDs the discount coupon can be applied to, e.g. ["18765-8651899366181"]
Language
Click Try It! to start a request and see the response here!