Discounts
Read a discount
One discount by its id.
Authorization
bearer discounts:readAuthorizationBearer <token>
A v1 API key; the scope named is the one the route needs.
In: header
Scope: discounts:read
Path Parameters
discountId*string
Match
^[A-Za-z0-9_-]{1,64}$Length
1 <= length <= 64Response Body
application/json
application/problem+json
curl -X GET "https://example.com/v1/discounts/string"{ "id": "string", "liveMode": true, "type": "string", "name": "string", "value": 0, "valueType": "string", "code": "string", "currency": "string", "validFrom": "2019-08-24T14:15:22Z", "validUntil": "2019-08-24T14:15:22Z", "timezone": "string", "purchaseLimit": 1, "timesUsed": 0, "includedOfferIds": [ "string" ], "excludedOfferIds": [ "string" ], "appliesToAllOffers": true, "active": true, "archivedAt": "2019-08-24T14:15:22Z", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z"}Create a discount POST
Creates a sale or a code discount, a percentage or a fixed amount, over all offers or the ones named, valid in a window.
Update a discount PATCH
Changes the fields sent and leaves the rest. Send `expectedUpdatedAt` as the `updatedAt` you last read; a row changed since is refused with `STALE_WRITE` and the current row.