Skip to main content
POST
Import discount codes
This endpoint is restricted and not generally available: organizations that have not been enabled receive a 403. Contact your Let’s Do This representative if you’d like access.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

An asynchronous discount code import request: the whole batch is accepted or none of it.

The first row takes the defaults: it discounts entries only, once per transaction. The second widens what it reaches with appliesTo, which replaces the default rather than adding to it, and uses appliesPer to come off every entry in the basket instead of the basket as a whole. The third has flatRate: 0, so it applies no discount and is kept only for tracking.

discountCodes
DiscountCodeImportRow · object[]
required

The discount codes to import.

Required array length: 1 - 1000 elements

Response

The batch passed the check and was accepted. Poll the job with jobId to see each row's result.

jobId
string
required

The id of the queued import job.

status
enum<string>
required
Available options:
queued