curl --request POST \
--url https://api.letsdothis.com/v0/discount-codes/import \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"discountCodes": [
{
"code": "FLEETFEET5",
"description": "Fleet Feet post-race in-store incentive",
"flatRate": 500,
"maxValue": 500,
"startDate": "2026-09-01T00:00:00Z",
"expiresAt": "2026-12-31T23:59:59Z",
"limitUsage": 1,
"limitUsagePerUser": 1,
"eventOccurrenceIds": [
"21111177799"
],
"group": "fleet-feet-2026"
},
{
"code": "EARLYBIRD15",
"percentage": 15,
"eventIds": [
"268365"
],
"appliesTo": [
"TICKETS",
"BOOKING_FEE"
],
"appliesPer": "ENTRY"
}
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
discountCodes: [
{
code: 'FLEETFEET5',
description: 'Fleet Feet post-race in-store incentive',
flatRate: 500,
maxValue: 500,
startDate: '2026-09-01T00:00:00Z',
expiresAt: '2026-12-31T23:59:59Z',
limitUsage: 1,
limitUsagePerUser: 1,
eventOccurrenceIds: ['21111177799'],
group: 'fleet-feet-2026'
},
{
code: 'EARLYBIRD15',
percentage: 15,
eventIds: ['268365'],
appliesTo: ['TICKETS', 'BOOKING_FEE'],
appliesPer: 'ENTRY'
}
]
})
};
fetch('https://api.letsdothis.com/v0/discount-codes/import', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.letsdothis.com/v0/discount-codes/import"
payload = { "discountCodes": [
{
"code": "FLEETFEET5",
"description": "Fleet Feet post-race in-store incentive",
"flatRate": 500,
"maxValue": 500,
"startDate": "2026-09-01T00:00:00Z",
"expiresAt": "2026-12-31T23:59:59Z",
"limitUsage": 1,
"limitUsagePerUser": 1,
"eventOccurrenceIds": ["21111177799"],
"group": "fleet-feet-2026"
},
{
"code": "EARLYBIRD15",
"percentage": 15,
"eventIds": ["268365"],
"appliesTo": ["TICKETS", "BOOKING_FEE"],
"appliesPer": "ENTRY"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"jobId": "661718293a4b5c6d7e8f901a",
"status": "queued"
}{
"statusCode": 400,
"error": "<string>",
"message": "<string>"
}{
"statusCode": 409,
"error": "<string>",
"message": "<string>"
}{
"statusCode": 413,
"error": "<string>",
"message": "<string>"
}{
"error": "validation_failed",
"message": "<string>",
"totalRows": 123,
"rowsWithErrors": 123,
"errorCount": 123,
"summary": [
{
"code": "<string>",
"count": 123,
"message": "<string>",
"examples": [
{
"rowIndex": 123,
"discountCode": "<string>",
"value": "<string>"
}
],
"fieldId": "<string>"
}
],
"errors": [
{
"rowIndex": 123,
"errors": [
{
"code": "<string>",
"message": "<string>",
"fieldId": "<string>"
}
],
"discountCode": "<string>"
}
],
"truncated": true
}{
"statusCode": 429,
"error": "<string>",
"message": "<string>"
}Import discount codes
Asynchronously imports a batch of discount codes. The whole batch is validated synchronously — either every row is accepted (202 with a job to poll) or nothing is (422 with every problem, aggregated by error class). Execution is per-row from there: one row failing never rejects the others.
Imports are create-once per code: re-importing an existing code returns it untouched, reported as alreadyImported.
Send an Idempotency-Key header to make the submission replayable: retrying the same key and body returns the original job; reusing a key with a different body is rejected (409).
curl --request POST \
--url https://api.letsdothis.com/v0/discount-codes/import \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"discountCodes": [
{
"code": "FLEETFEET5",
"description": "Fleet Feet post-race in-store incentive",
"flatRate": 500,
"maxValue": 500,
"startDate": "2026-09-01T00:00:00Z",
"expiresAt": "2026-12-31T23:59:59Z",
"limitUsage": 1,
"limitUsagePerUser": 1,
"eventOccurrenceIds": [
"21111177799"
],
"group": "fleet-feet-2026"
},
{
"code": "EARLYBIRD15",
"percentage": 15,
"eventIds": [
"268365"
],
"appliesTo": [
"TICKETS",
"BOOKING_FEE"
],
"appliesPer": "ENTRY"
}
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
discountCodes: [
{
code: 'FLEETFEET5',
description: 'Fleet Feet post-race in-store incentive',
flatRate: 500,
maxValue: 500,
startDate: '2026-09-01T00:00:00Z',
expiresAt: '2026-12-31T23:59:59Z',
limitUsage: 1,
limitUsagePerUser: 1,
eventOccurrenceIds: ['21111177799'],
group: 'fleet-feet-2026'
},
{
code: 'EARLYBIRD15',
percentage: 15,
eventIds: ['268365'],
appliesTo: ['TICKETS', 'BOOKING_FEE'],
appliesPer: 'ENTRY'
}
]
})
};
fetch('https://api.letsdothis.com/v0/discount-codes/import', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.letsdothis.com/v0/discount-codes/import"
payload = { "discountCodes": [
{
"code": "FLEETFEET5",
"description": "Fleet Feet post-race in-store incentive",
"flatRate": 500,
"maxValue": 500,
"startDate": "2026-09-01T00:00:00Z",
"expiresAt": "2026-12-31T23:59:59Z",
"limitUsage": 1,
"limitUsagePerUser": 1,
"eventOccurrenceIds": ["21111177799"],
"group": "fleet-feet-2026"
},
{
"code": "EARLYBIRD15",
"percentage": 15,
"eventIds": ["268365"],
"appliesTo": ["TICKETS", "BOOKING_FEE"],
"appliesPer": "ENTRY"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"jobId": "661718293a4b5c6d7e8f901a",
"status": "queued"
}{
"statusCode": 400,
"error": "<string>",
"message": "<string>"
}{
"statusCode": 409,
"error": "<string>",
"message": "<string>"
}{
"statusCode": 413,
"error": "<string>",
"message": "<string>"
}{
"error": "validation_failed",
"message": "<string>",
"totalRows": 123,
"rowsWithErrors": 123,
"errorCount": 123,
"summary": [
{
"code": "<string>",
"count": 123,
"message": "<string>",
"examples": [
{
"rowIndex": 123,
"discountCode": "<string>",
"value": "<string>"
}
],
"fieldId": "<string>"
}
],
"errors": [
{
"rowIndex": 123,
"errors": [
{
"code": "<string>",
"message": "<string>",
"fieldId": "<string>"
}
],
"discountCode": "<string>"
}
],
"truncated": true
}{
"statusCode": 429,
"error": "<string>",
"message": "<string>"
}403. Contact your Let’s Do This representative if you’d like access.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
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 discount codes to import.
1 - 1000 elementsShow child attributes
Show child attributes
Was this page helpful?

