Discounts
Discount definitions (read-only inventory).
Authorization
apiKey A Formtoro API key minted in Settings → Connections. A key carries one
or more scopes; an endpoint refuses a key that lacks its required scope
with 403 insufficient_scope. Scopes:
analytics:read— all aggregate read endpoints.customers:read— customer-level lifetime value.forms:write— create and edit forms (drafts). Grantable only by a member who holds the Form-editing permission.discounts:read— read discount definitions. Grantable only by a member who holds the Discounts-view permission.
In: header
Query Parameters
When true, return only active definitions. Default returns all (active + archived).
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/v1/discounts"{ "meta": { "requestId": "req_019e73ce-1968-71ca-ae57-dbd8084cee79", "shopId": "example.myshopify.com", "credentialId": "cred_019e73c0", "range": { "from": "2019-08-24T14:15:22Z", "to": "2019-08-24T14:15:22Z" } }, "data": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "status": "active", "config": {}, "createdAt": "2019-08-24T14:15:22Z" } ]}{ "error": { "code": "string", "message": "string", "requestId": "string" }}{ "error": { "code": "string", "message": "string", "requestId": "string" }}{ "error": { "code": "string", "message": "string", "requestId": "string" }}{ "error": { "code": "string", "message": "string", "requestId": "string" }}Authorization
apiKey A Formtoro API key minted in Settings → Connections. A key carries one
or more scopes; an endpoint refuses a key that lacks its required scope
with 403 insufficient_scope. Scopes:
analytics:read— all aggregate read endpoints.customers:read— customer-level lifetime value.forms:write— create and edit forms (drafts). Grantable only by a member who holds the Form-editing permission.discounts:read— read discount definitions. Grantable only by a member who holds the Discounts-view permission.
In: header
Path Parameters
The discount definition's UUID. A non-existent / foreign id resolves to 404.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/v1/discounts/497f6eca-6276-4993-bfeb-53cbbbba6f08"{ "meta": { "requestId": "req_019e73ce-1968-71ca-ae57-dbd8084cee79", "shopId": "example.myshopify.com", "credentialId": "cred_019e73c0", "range": { "from": "2019-08-24T14:15:22Z", "to": "2019-08-24T14:15:22Z" } }, "data": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "status": "active", "config": {}, "createdAt": "2019-08-24T14:15:22Z" }}{ "error": { "code": "string", "message": "string", "requestId": "string" }}{ "error": { "code": "string", "message": "string", "requestId": "string" }}{ "error": { "code": "string", "message": "string", "requestId": "string" }}{ "error": { "code": "string", "message": "string", "requestId": "string" }}{ "error": { "code": "string", "message": "string", "requestId": "string" }}