Upsert imported add-ons
curl --request PUT \
--url https://api.letsdothis.com/v0/add-ons/import \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"addOns": [
{
"externalAddOnId": "<string>",
"name": "<string>",
"description": "<string>",
"allocationType": "<string>",
"variants": [
{
"externalVariantId": "<string>",
"name": "<string>",
"price": {
"value": 123,
"currencyCode": "<string>"
},
"properties": {},
"externalSku": "<string>",
"fulfilmentMethods": [
"<string>"
]
}
],
"eventIds": [
"<string>"
],
"eventOccurrenceIds": [
"<string>"
],
"raceIds": [
"<string>"
],
"ticketSlugs": [
"<string>"
]
}
]
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
addOns: [
{
externalAddOnId: '<string>',
name: '<string>',
description: '<string>',
allocationType: '<string>',
variants: [
{
externalVariantId: '<string>',
name: '<string>',
price: {value: 123, currencyCode: '<string>'},
properties: {},
externalSku: '<string>',
fulfilmentMethods: ['<string>']
}
],
eventIds: ['<string>'],
eventOccurrenceIds: ['<string>'],
raceIds: ['<string>'],
ticketSlugs: ['<string>']
}
]
})
};
fetch('https://api.letsdothis.com/v0/add-ons/import', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.letsdothis.com/v0/add-ons/import"
payload = { "addOns": [
{
"externalAddOnId": "<string>",
"name": "<string>",
"description": "<string>",
"allocationType": "<string>",
"variants": [
{
"externalVariantId": "<string>",
"name": "<string>",
"price": {
"value": 123,
"currencyCode": "<string>"
},
"properties": {},
"externalSku": "<string>",
"fulfilmentMethods": ["<string>"]
}
],
"eventIds": ["<string>"],
"eventOccurrenceIds": ["<string>"],
"raceIds": ["<string>"],
"ticketSlugs": ["<string>"]
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"importId": "3a55dc4c-6fd2-49bd-90cd-32c65fce7b1a",
"jobId": "65f60718293a4b5c6d7e8f90",
"status": "queued",
"replayed": false
}{
"statusCode": 400,
"error": "<string>",
"message": "<string>"
}{
"statusCode": 404,
"error": "<string>",
"message": "<string>"
}{
"statusCode": 409,
"error": "<string>",
"message": "<string>"
}{
"statusCode": 413,
"error": "<string>",
"message": "<string>"
}{
"statusCode": 429,
"error": "<string>",
"message": "<string>"
}Add-ons
Upsert imported add-ons
Creates add-on products, or updates ones an earlier import created, matched on externalAddOnId. They’re imported in the background as a job you poll. See how imports work.
How to use it
- Only products and variants created by an import are updated. Products created in the dashboard are never changed.
- Variants you leave out of a product are kept.
PUT
/
v0
/
add-ons
/
import
Upsert imported add-ons
curl --request PUT \
--url https://api.letsdothis.com/v0/add-ons/import \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"addOns": [
{
"externalAddOnId": "<string>",
"name": "<string>",
"description": "<string>",
"allocationType": "<string>",
"variants": [
{
"externalVariantId": "<string>",
"name": "<string>",
"price": {
"value": 123,
"currencyCode": "<string>"
},
"properties": {},
"externalSku": "<string>",
"fulfilmentMethods": [
"<string>"
]
}
],
"eventIds": [
"<string>"
],
"eventOccurrenceIds": [
"<string>"
],
"raceIds": [
"<string>"
],
"ticketSlugs": [
"<string>"
]
}
]
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
addOns: [
{
externalAddOnId: '<string>',
name: '<string>',
description: '<string>',
allocationType: '<string>',
variants: [
{
externalVariantId: '<string>',
name: '<string>',
price: {value: 123, currencyCode: '<string>'},
properties: {},
externalSku: '<string>',
fulfilmentMethods: ['<string>']
}
],
eventIds: ['<string>'],
eventOccurrenceIds: ['<string>'],
raceIds: ['<string>'],
ticketSlugs: ['<string>']
}
]
})
};
fetch('https://api.letsdothis.com/v0/add-ons/import', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.letsdothis.com/v0/add-ons/import"
payload = { "addOns": [
{
"externalAddOnId": "<string>",
"name": "<string>",
"description": "<string>",
"allocationType": "<string>",
"variants": [
{
"externalVariantId": "<string>",
"name": "<string>",
"price": {
"value": 123,
"currencyCode": "<string>"
},
"properties": {},
"externalSku": "<string>",
"fulfilmentMethods": ["<string>"]
}
],
"eventIds": ["<string>"],
"eventOccurrenceIds": ["<string>"],
"raceIds": ["<string>"],
"ticketSlugs": ["<string>"]
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"importId": "3a55dc4c-6fd2-49bd-90cd-32c65fce7b1a",
"jobId": "65f60718293a4b5c6d7e8f90",
"status": "queued",
"replayed": false
}{
"statusCode": 400,
"error": "<string>",
"message": "<string>"
}{
"statusCode": 404,
"error": "<string>",
"message": "<string>"
}{
"statusCode": 409,
"error": "<string>",
"message": "<string>"
}{
"statusCode": 413,
"error": "<string>",
"message": "<string>"
}{
"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
Headers
Body
application/json
Was this page helpful?

