SoftSolzSoftSolz
HomeAPI GuideAPI ReferenceWidget Tester

Create a discount code

Create a discount code. A percentage code takes percent_off from 1 to 100. An amount code takes amount_off_cents. An expiry date must be in the future and after the start date. A usage limit must be more than zero, or left out for no limit. A code already used in the workspace answers 409 coupon_exists.

POSThttps://app.softsolz.uk/api/v1/services/catalog/catalog/coupons

Recent Requests

Kept only in this browser
TimeStatusTook
Send a request with Try it to see it here.

Headers

Authorizationstringrequired

Bearer token: Bearer sk_live_... (or sk_test_... for sandbox). A login token will not work here.

Idempotency-Keystring

Optional idempotency key for safe retries.

Body Params

codestringrequired

3 to 40 letters, numbers, dashes or underscores. Stored in capitals.

descriptionstring | null

Internal note about the code.

discount_typestring

A percentage off, or a fixed amount off. Defaults to percent.

percent_offnumber

Percentage off, 1 to 100. Needed for a percent code.

amount_off_centsinteger

Amount off in minor units. Needed for an amount code.

currencystring

Currency of an amount code, stored in capitals (gbp becomes GBP).

max_redemptionsinteger | null

How many times the code can be used in total. Leave out for no limit.

starts_atstring | null

When the code starts working.

expires_atstring | null

When the code stops working. Must be in the future.

activeboolean

Whether the code is on. Defaults to true.

Response

Response Body

idstringDiscount code id.
codestringThe code customers enter.
descriptionstring | nullInternal note about the code.
discount_typestringA percentage off, or a fixed amount off.
percent_offnumber | nullPercentage off, 1 to 100. Null for an amount discount.
amount_off_centsinteger | nullAmount off in minor units. Null for a percentage discount.
currencystring | nullCurrency of an amount discount, stored in capitals (gbp becomes GBP).
max_redemptionsinteger | nullHow many times the code can be used in total. Null for no limit.
redeemed_countintegerHow many times the code has been used.
starts_atstring | nullWhen the code starts working.
expires_atstring | nullWhen the code stops working.
activebooleanWhether the code is switched on.
redeemablebooleanWhether the code can be used right now: on, started, not expired and under its limit.
created_atstringWhen the code was created.
updated_atstringWhen the code last changed.

Request

curl --request POST \
--url https://app.softsolz.uk/api/v1/services/catalog/catalog/coupons \
--header 'Authorization: Bearer sk_live_your_key' \
--header 'Content-Type: application/json' \
--data '{
"code": "WELCOME10",
"discount_type": "percent",
"percent_off": 10,
"max_redemptions": 100,
"expires_at": "2026-12-31T23:59:59.000Z"
}'

Credentials

Sent as a Bearer token and used in the samples above and in Try it. Kept only in this browser tab until you close it. Use an sk_test_ key to stay in your sandbox.

Response · 201

{
"data": {
"id": "5",
"code": "WELCOME10",
"description": "Ten percent off for new customers.",
"discount_type": "percent",
"percent_off": 10,
"amount_off_cents": null,
"currency": null,
"max_redemptions": 100,
"redeemed_count": 12,
"starts_at": null,
"expires_at": "2026-12-31T23:59:59.000Z",
"active": true,
"redeemable": true,
"created_at": "2026-10-01T09:00:00.000Z",
"updated_at": "2026-10-01T09:00:00.000Z"
}
}