Import referrals
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>"
}Referrals
Import referrals
Records referrals between bookings you’ve already imported, in the background as a job you poll. See how imports work.
How to use it
- Each row names the
referredBookingId, whose entries count as referral progress, and thereferralCodeOwnerBookingId, whose referral code gets the credit. The owner booking’s referral code is reused, or created if it has none. - Both bookings must be yours, and their events must be covered by the same active referral program.
- Each entry counts towards one referral at most.
- No bookings or participants are created, and no booking or referral threshold emails are sent.
POST
/
v0
/
referrals
/
import
Import referrals
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>"
}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
Body
application/json
Was this page helpful?

