Skip to main content
POST
Create a promotion code

Authorizations

Authorization
string
header
required

Tolt API key sent as a bearer token.

Body

application/json
code
string
required

The discount code as customers enter it at checkout. Customers and payments that use it are attributed to the code's partner. A partner cannot have the same code twice, ignoring case. Recording it here does not create it in your billing system.

Required string length: 1 - 255
partner_id
string
required

Id of the partner the code belongs to (part_...), as returned when listing partners. The code is created in that partner's program.

Minimum string length: 1
type
enum<string>

Whether value is a percent off or a fixed amount off.

Available options:
fixed,
percentage
value
string

Size of the discount as a plain decimal: a percent from 0 to 100 for percentage codes ("20" is 20%), or an amount from 0 to 1,000,000 in major units of the program currency for fixed codes ("20" is 20.00).

Maximum string length: 255

Response

The created promotion code

success
boolean
required
Example:

true

message
string
required
Example:

"Request successful"

data
object
required