Skip to Content
StarsellDocs
API referenceDiscounts

Get a discount

GET
/stores/{storeId}/discounts/{discountId}

Get a discount by id or code.

Authorization

storeKey
headerAuthorizationBearer <vtk_...>

A store API and MCP key

Path Parameters

storeId*string

The store id

discountId*string

The discount id, or its code

Response Body

OK

application/json
  1. response
data*
Example Request
curl -X GET 'https://starsell.app/api/v1/stores/string/discounts/string'
Example Response
{  "data": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "method": "code",    "code": "string",    "title": "string",    "kind": "amount_off_products",    "status": "active",    "state": "active",    "value": {      "type": "percent",      "value": 0    },    "targets": {      "kind": "all",      "ids": [        "6e0346a3-e54d-40e3-9779-4ba1e707e35b"      ]    },    "requirement": {      "kind": "none",      "value": 0    },    "buy_x_get_y": {      "buy": {        "kind": "quantity",        "value": 0,        "targets": {          "kind": "all",          "ids": [            "6e0346a3-e54d-40e3-9779-4ba1e707e35b"          ]        }      },      "get": {        "quantity": 0,        "targets": {          "kind": "all",          "ids": [            "6e0346a3-e54d-40e3-9779-4ba1e707e35b"          ]        },        "value": {          "type": "percent",          "value": 0        }      },      "uses_per_order": 0    },    "max_shipping_minor": 0,    "combines": {      "product": true,      "order": true,      "shipping": true    },    "eligibility": {      "kind": "all",      "values": [        "string"      ]    },    "market_ids": [      "9cb57349-3216-42de-9385-0817a7dc6f8c"    ],    "usage_limit": 0,    "once_per_customer": true,    "used_count": 0,    "starts_at": "2019-08-24T14:15:22Z",    "ends_at": "2019-08-24T14:15:22Z",    "created_at": "2019-08-24T14:15:22Z",    "updated_at": "2019-08-24T14:15:22Z"  }}