Discounts
Discount definitions (read-only inventory).
apiKeyAuthorizationBearer <token>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.forms:publish— save versions and turn forms on or off on the live storefront. Grantable only by a member who holds the Form-publishing permission.discounts:read— read discount definitions. Grantable only by a member who holds the Discounts-view permission.
active?booleanWhen true, return only active definitions. Default returns all (active + archived).
The shop's discount definitions.
application/json- response
data*array<>Endpoint-specific payload.
meta*curl -X GET 'https://public-api.formtoro.com/v1/discounts'{ "meta": { "requestId": "string", "shopId": "string", "credentialId": "string", "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" } ]}apiKeyAuthorizationBearer <token>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.forms:publish— save versions and turn forms on or off on the live storefront. Grantable only by a member who holds the Form-publishing permission.discounts:read— read discount definitions. Grantable only by a member who holds the Discounts-view permission.
id*stringThe discount definition's UUID. A non-existent / foreign id resolves to 404.
uuidThe discount definition.
application/json- response
data*A discount definition, trimmed to what's needed to reference it in a
form. Use id as a form's settings.reward.discountDefinitionId. Only
status: active discounts should be referenced.
meta*curl -X GET 'https://public-api.formtoro.com/v1/discounts/497f6eca-6276-4993-bfeb-53cbbbba6f08'{ "meta": { "requestId": "string", "shopId": "string", "credentialId": "string", "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" }}