Issue many single-use credit promotion codes

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

Creates one single-use credit code per string in codes, for handing a credit to a large group of drivers as one code each rather than a shared code. You choose the codes, so they can follow your own naming scheme. Up to 5000 per request; issue a larger run as several requests.

  • The response carries the id of every code created. GET /promotion-codes?codePrefix= lists a batch again if the codes share a prefix.
  • Retrying is safe. A replayed request finds every code already taken, so it creates nothing new and returns them all in skippedExistingCodes.
  • Codes are unique across all operators. One already taken is reported in skippedExistingCodes rather than failing the whole batch, so check that list and reissue those codes under new strings.
  • Set startAt in the future to issue the batch inactive, then activate a code with PATCH /promotion-codes/{id} when it is sold. Until then it cannot be redeemed.
  • credit must be enabled for your operator, otherwise the request is rejected with 422.
  • Your operator wallet is debited as each code is redeemed, not when the batch is created.
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
string
required
length ≥ 1

Name shared by every code in the batch

string | null

Description shared by every code in the batch

codes
array of strings
required
length between 1 and 5000

The codes to create, chosen by you, up to 5000 per request. Each must be lowercase alphanumeric with optional hyphens, at most 64 characters, and unique within the request. A shared prefix is worth keeping: pass it to GET /promotion-codes?codePrefix= to list the batch again.

codes*
double
required
0.1 to 500

Currency amount deposited into the driver's wallet when a code is redeemed (max 500). Every code in the batch carries the same amount and is single-use — send one request per amount.

date-time | null

When the codes become redeemable (ISO8601: yyyy-MM-ddTHH:mm:ssZ). Set a future date to issue the batch inactive — a code stays unredeemable until this passes, so vouchers can be printed and distributed before they carry value, then activated per code with PATCH /promotion-codes/{id} when one is sold.

date-time | null

When the codes expire (ISO8601: yyyy-MM-ddTHH:mm:ssZ)

Responses

422

Validation failed — more than 5000 codes, a code repeated within the request, a code that is not lowercase alphanumeric, amount above 500, 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