ShopEazydevelopers
API referenceMerchant API BetaDiscounts

One discount code

Beta
Credentials, one of
  • Station token
  • OAuth access token
Scopes
marketing:read
GET
/v1/merchant/stores/{storeId}/discounts/{code}

Access: OAuth scope marketing:read (a grant with marketing:write passes too); not write-gated.

Authorization

headerAuthorizationBearer <token>

It may call only the operations whose x-stations lists its kind, on its own store, and acts through the access of the owner or admin who paired it. Unpairing it, or that person leaving the business, ends it (401 station_revoked).

Path Parameters

storeId*string

A store the person can reach. Any other id answers 404, never 403.

code*string

The discount CODE (URL-encoded), not a document id.

Response Body

OK

application/json
  1. response
data*
Example Request
curl -X GET 'https://api.shopeazy.co/v1/merchant/stores/<storeId>/discounts/<code>' \  -H 'Authorization: Bearer <access_token>'
Example Response
{  "data": {    "id": "SPRING10",    "code": "SPRING10",    "kind": "percent",    "kindLabel": "Percentage off",    "status": "active",    "state": "live",    "note": null,    "offer": "10% off",    "used": 0,    "usageLimit": 200,    "usageLabel": "Used 0 / 200",    "updatedAt": 1792924393230,    "percent": 10,    "amountOff": null,    "startsAt": 1792920792825,    "endsAt": 1797762792825,    "minSpend": {      "amount": 30000,      "currency": "ZAR"    },    "minSpendLabel": "Baskets over R300,00",    "perCustomerLimit": 1,    "createdAt": 1792924393230  }}