curl --request POST \
--url https://api.letsdothis.com/v0/referrals/import \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"referrals": [
{
"referredBookingId": "65f708192a3b4c5d6e7f80",
"referralCodeOwnerBookingId": "65f708192a3b4c5d6e7f70"
}
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
referrals: [
{
referredBookingId: '65f708192a3b4c5d6e7f80',
referralCodeOwnerBookingId: '65f708192a3b4c5d6e7f70'
}
]
})
};
fetch('https://api.letsdothis.com/v0/referrals/import', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.letsdothis.com/v0/referrals/import"
payload = { "referrals": [
{
"referredBookingId": "65f708192a3b4c5d6e7f80",
"referralCodeOwnerBookingId": "65f708192a3b4c5d6e7f70"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"jobId": "66393a4b5c6d7e8f901a2b3c",
"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,
"referredBookingId": "<string>",
"value": "<string>"
}
],
"fieldId": "<string>"
}
],
"errors": [
{
"rowIndex": 123,
"errors": [
{
"code": "<string>",
"message": "<string>",
"fieldId": "<string>"
}
],
"referredBookingId": "<string>"
}
],
"truncated": true
}{
"statusCode": 429,
"error": "<string>",
"message": "<string>"
}Import referrals
Asynchronously imports referral progress between existing bookings created through the Public API. Each row names the referredBookingId, whose start-list entries each count as referral progress, and the referralCodeOwnerBookingId, whose generated referral code receives credit. The owner booking’s code is reused or generated internally.
Both bookings must belong to this organizer and their occurrences must be covered by the same active referral program. This operation does not create bookings or participants and does not trigger booking or threshold emails.
The whole batch is validated synchronously — either every row is accepted or none is. Each start-list entry is attributed at most once. Send an Idempotency-Key header to make submission replayable.
curl --request POST \
--url https://api.letsdothis.com/v0/referrals/import \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"referrals": [
{
"referredBookingId": "65f708192a3b4c5d6e7f80",
"referralCodeOwnerBookingId": "65f708192a3b4c5d6e7f70"
}
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
referrals: [
{
referredBookingId: '65f708192a3b4c5d6e7f80',
referralCodeOwnerBookingId: '65f708192a3b4c5d6e7f70'
}
]
})
};
fetch('https://api.letsdothis.com/v0/referrals/import', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.letsdothis.com/v0/referrals/import"
payload = { "referrals": [
{
"referredBookingId": "65f708192a3b4c5d6e7f80",
"referralCodeOwnerBookingId": "65f708192a3b4c5d6e7f70"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"jobId": "66393a4b5c6d7e8f901a2b3c",
"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,
"referredBookingId": "<string>",
"value": "<string>"
}
],
"fieldId": "<string>"
}
],
"errors": [
{
"rowIndex": 123,
"errors": [
{
"code": "<string>",
"message": "<string>",
"fieldId": "<string>"
}
],
"referredBookingId": "<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 referral import request: the whole batch is accepted or none of it.
The referrals to import.
1 - 1000 elementsShow child attributes
Show child attributes
Was this page helpful?

