ShopEazydevelopers
API referenceMerchant API BetaDiscounts

List discount codes

Beta
Credentials
  • OAuth access token
Scopes
marketing:read
GET
/v1/merchant/stores/{storeId}/discounts

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

Paged: { items, nextCursor }, limit (default 50, at most 200) and an opaque cursor.

Authorization

merchantOAuth marketing:read
headerAuthorizationBearer <token>

OAuth 2.1 (authorization code + PKCE S256, public clients, dynamic registration) for connected AI apps. Effective power is scopes granted AND the person's role today AND the plan. orders:refund, billing:write and team:write are opt-in on the consent screen. Write implies read for marketing:read and messages:read, so a grant holding marketing:write passes a marketing:read check, and messages:send passes messages:read.

Scope: marketing:read

Path Parameters

storeId*string

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

Query Parameters

active?boolean

true = only live codes; false = everything not live.

cursor?string

The nextCursor of the previous page, unchanged. A cursor that is not one we gave you is 400 bad_request.

limit?integer

Page size: default 50, at most 200 (more is 200; a missing or unusable value is 50).

Range1 <= value <= 200
Default50

Response Body

OK

application/json
  1. response
data*
Example Request
curl -X GET 'https://api.shopeazy.co/v1/merchant/stores/<storeId>/discounts' \  -H 'Authorization: Bearer <access_token>'
Example Response
{  "data": {    "items": [      {        "id": "POTS50",        "code": "POTS50",        "kind": "fixed",        "kindLabel": "Rand off",        "status": "active",        "state": "live",        "note": null,        "offer": "R50,00 off",        "used": 0,        "usageLimit": null,        "usageLabel": "Used 0",        "updatedAt": 1792924393615      },      {        "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      }    ],    "nextCursor": null  }}