curl --request GET \
--url https://api.letsdothis.com/v0/referrals/import/{jobId} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.letsdothis.com/v0/referrals/import/{jobId}', 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/{jobId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"jobId": "66393a4b5c6d7e8f901a2b3c",
"status": "completed",
"counts": {
"pending": 0,
"processing": 0,
"success": 1,
"failure": 0,
"cancelled": 0,
"total": 1
},
"rowCounts": {
"succeeded": 1,
"alreadyImported": 0,
"failed": 1,
"total": 2
},
"results": [
{
"referredBookingId": "65f708192a3b4c5d6e7f80",
"referralIds": [
"65f708192a3b4c5d6e7f8091",
"65f708192a3b4c5d6e7f8092"
],
"status": "succeeded",
"errors": []
},
{
"referredBookingId": "65f708192a3b4c5d6e7f81",
"status": "failed",
"errors": [
{
"code": "SELF_REFERRAL",
"fieldId": "referralCodeOwnerBookingId",
"message": "A booking cannot be both the referred booking and the referral-code owner"
}
]
}
]
}Get referral import status
Returns the progress of a referral import and the result for each row imported so far. See reading a job.
Poll until status is completed, then read results.
curl --request GET \
--url https://api.letsdothis.com/v0/referrals/import/{jobId} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.letsdothis.com/v0/referrals/import/{jobId}', 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/{jobId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"jobId": "66393a4b5c6d7e8f901a2b3c",
"status": "completed",
"counts": {
"pending": 0,
"processing": 0,
"success": 1,
"failure": 0,
"cancelled": 0,
"total": 1
},
"rowCounts": {
"succeeded": 1,
"alreadyImported": 0,
"failed": 1,
"total": 2
},
"results": [
{
"referredBookingId": "65f708192a3b4c5d6e7f80",
"referralIds": [
"65f708192a3b4c5d6e7f8091",
"65f708192a3b4c5d6e7f8092"
],
"status": "succeeded",
"errors": []
},
{
"referredBookingId": "65f708192a3b4c5d6e7f81",
"status": "failed",
"errors": [
{
"code": "SELF_REFERRAL",
"fieldId": "referralCodeOwnerBookingId",
"message": "A booking cannot be both the referred booking and the referral-code owner"
}
]
}
]
}403. Contact your Let’s Do This representative if you’d like access.Authorizations
Response
The job's progress so far, and the result for each row it has finished.
The state of a referral import.
results holds one entry per row, with its status and errors. It's the only field that says whether a row was imported, so act on it. It fills up while the job runs, so a processing job shows only the rows finished so far: poll until status is completed.
rowCounts totals results, so a non-zero rowCounts.failed means some rows need attention. status is completed once the job has finished, even if every row failed. counts tracks the job's background work, not your rows.
Outcome totals for an import job, folded from results: one count per reported result, not per submitted row. Most imports report one result per submitted row, but an endpoint can report several — a reserved-entry participant row covering a booking reports one result per participant — so total can legitimately exceed the submitted row count and is not a reconciliation check against it. The totals accumulate the same way results does: a processing job counts the results reported so far. A non-zero failed is the signal to inspect results and act on the failures.
Show child attributes
Show child attributes
Was this page helpful?

