Create a promotion code

Required scope: promotion-codes:write
Organization authorization: supported

Credit promotion codes

Set type to credit to deposit currency into the driver's wallet instead of applying a discount:

  • amount is a currency amount, not a percentage.
  • The code is single-use. maxUsesCount must be 1 or omitted; a higher value is rejected with 422.
  • One code is created per call; bulk generation of unique codes is not available yet.
  • credit must be enabled for your operator, otherwise the request is rejected with 422.
  • Your operator wallet is debited when a driver redeems the code, not when the code is created.
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
string
required
length ≥ 1

Name of the promotion code

string
required
^[a-z0-9]+(?:-[a-z0-9]+)*$

Unique code string. Must be lowercase alphanumeric, optionally hyphen-separated (e.g. summer-2025).

string | null

Description of the promotion code

double
required
0.1 to 500

Percentage off for the discount types (max 100), or the currency amount deposited into the driver's wallet for credit (max 500). The cap is enforced per type by the server, so a percentage type above 100 is rejected with 422 even though the schema maximum is 500.

int32 | null
≥ 1

Maximum number of times the code can be used. For credit this must be 1 or omitted — a higher value is rejected with 422, and omitting it creates the code as single-use.

date-time | null

When the promotion code becomes active (ISO8601: yyyy-MM-ddTHH:mm:ssZ)

date-time | null

When the promotion code expires (ISO8601: yyyy-MM-ddTHH:mm:ssZ)

string | null
enum

What the code gives the driver.

  • ongoing-charge-discount-percentage — a percentage off each charge.
  • charge-package-discount-percentage — a percentage off a charge package.
  • credit — deposits amount as currency into the driver's wallet instead of applying any discount. Must be enabled for your operator.
Allowed:
int64 | null

User ID to limit this code to a specific user

number | null
0.01 to 999999.99

Cap on the total discount a single driver can accumulate from this code. Once a driver reaches it the code stops discounting for them; the code stays usable for everyone else. Ignored for credit. Omit to set no cap.

selectedTeamIds
array of int64s | null

Team IDs the promotion code is restricted to. Omit or pass an empty array to leave the code unrestricted.

selectedTeamIds
number | null
≥ 0.01

kWh allowance the discount covers per budget period. Ignored for credit, and must be enabled for your operator. Omit or pass null for no kWh cap.

string | null
calendar-month

Reset window for the kWh allowance; calendar-month resets on the 1st, null means a lifetime cap. Ignored for credit.

selectedListIds
array of int64s | null

List IDs the promotion code is restricted to. Omit or pass an empty array to leave the code unrestricted.

selectedListIds
int32 | null
1 to 10000

Max charges per driver eligible for the discount after redeeming. Omit to set no limit.

Responses

422

Validation failed — amount above the cap for the type, maxUsesCount above 1 for credit, or credit promotion codes are not enabled for this operator

Language
Credentials
Bearer
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json