Add or update up to 1,000 items
const url = 'https://api.threadkite.app/v1/items/bulk';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"items":[{"source":"my-dms","externalId":"STOCK-1001","locationId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","billing":"one_off","addOn":true,"addOnFor":["example"],"attributes":{"title":"Merino jumper","description":"example","link":"https://example.com","imageLinks":["https://example.com"],"price":{"amountMinor":1299500,"currency":"GBP"},"salePrice":{"amountMinor":1299500,"currency":"GBP"},"availability":"in_stock","condition":"new","brand":"example","gtin":"example","mpn":"example","sku":"example","googleProductCategory":"example","productType":"example","itemGroupId":"example","size":"example","colour":"example","material":"example","pattern":"example","customLabel0":"example","customLabel1":"example","customLabel2":"example","customLabel3":"example","customLabel4":"example"},"type":"product"}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.threadkite.app/v1/items/bulk \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "items": [ { "source": "my-dms", "externalId": "STOCK-1001", "locationId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "billing": "one_off", "addOn": true, "addOnFor": [ "example" ], "attributes": { "title": "Merino jumper", "description": "example", "link": "https://example.com", "imageLinks": [ "https://example.com" ], "price": { "amountMinor": 1299500, "currency": "GBP" }, "salePrice": { "amountMinor": 1299500, "currency": "GBP" }, "availability": "in_stock", "condition": "new", "brand": "example", "gtin": "example", "mpn": "example", "sku": "example", "googleProductCategory": "example", "productType": "example", "itemGroupId": "example", "size": "example", "colour": "example", "material": "example", "pattern": "example", "customLabel0": "example", "customLabel1": "example", "customLabel2": "example", "customLabel3": "example", "customLabel4": "example" }, "type": "product" } ] }'Each item is matched on its source and externalId: new ones are added, existing ones replaced. Items are validated one by one; invalid items are skipped and reported in results while the rest are saved.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
object
Defaults to api
Example
my-dmsExample
STOCK-1001How the price is charged: one_off (once, the default for a new item), monthly or annual. Left out, an existing item keeps its own
Example
monthlyUsually sold as an add-on to something else (suggested when adding add-ons)
The item types it is usually added to; empty means anything
object
Google/Meta title
Example
Merino jumperGoogle/Meta description
Product page. Google/Meta link
Main image first. Google/Meta image_link and additional_image_link
Google/Meta price
object
Amount in minor units (pence, cents)
Example
1299500ISO 4217
Example
GBPGoogle/Meta sale_price
object
Amount in minor units (pence, cents)
Example
1299500ISO 4217
Example
GBPGoogle/Meta availability
Google/Meta condition
Google/Meta brand
GTIN-8, 12, 13 or 14. Google/Meta gtin
Google/Meta mpn
Your own stock code
Google/Meta google_product_category
Google/Meta product_type
Shared by variants. Google/Meta item_group_id
Google/Meta size
Google/Meta color
Google/Meta material
Google/Meta pattern
Google/Meta custom_label_0
Google/Meta custom_label_1
Google/Meta custom_label_2
Google/Meta custom_label_3
Google/Meta custom_label_4
object
Defaults to api
Example
my-dmsExample
STOCK-1001How the price is charged: one_off (once, the default for a new item), monthly or annual. Left out, an existing item keeps its own
Example
monthlyUsually sold as an add-on to something else (suggested when adding add-ons)
The item types it is usually added to; empty means anything
object
Advert title; made from make, model and derivative when left out. Google/Meta title
Google/Meta description
Number plate. Meta vehicle_registration_plate
Example
AB12 CDEGoogle/Meta vin
Example
WF0XXXGCDX1234567Google brand, Meta make
Example
FordGoogle/Meta model
Example
FocusFull version name
Example
1.0 EcoBoost Titanium 5drGoogle/Meta trim
Example
TitaniumGoogle/Meta year
Example
2019First registration date, YYYY-MM-DD
Google mileage, Meta mileage.value and .unit
object
Example
24000Example
miGoogle condition and certified_pre_owned, Meta state_of_vehicle
Google engine, Meta fuel_type
Example
PetrolMeta transmission
Example
ManualMeta drivetrain
Exterior colour. Google color, Meta exterior_color
Example
BlueMeta interior_color
Example
BlackGoogle/Meta body_style
Example
HatchbackGoogle/Meta price
object
Amount in minor units (pence, cents)
Example
1299500ISO 4217
Example
GBPGoogle/Meta sale_price
object
Amount in minor units (pence, cents)
Example
1299500ISO 4217
Example
GBPobject
Example
£249 a month, 48 months, 9.9% APR representativeobject
Amount in minor units (pence, cents)
Example
1299500ISO 4217
Example
GBPobject
Amount in minor units (pence, cents)
Example
1299500ISO 4217
Example
GBPMain image first. Google image_link/additional_image_link, Meta image[n].url
Advert page. Google link, Meta url
Google/Meta availability
Responses
Section titled “Responses”object
One per item, in order
object
Position in the request, from 0
object
Dotted path inside the item, e.g. attributes.price.amountMinor
Example
{ "results": [ { "status": "created", "errors": [ { "message": "Enter the make" } ] } ]}object
Stable machine-readable reason
With code invalid: every problem with the request, by field (message is the first)
object
Dotted path inside the item, e.g. attributes.price.amountMinor
Example
{ "statusCode": 403, "code": "forbidden", "message": "You do not have permission to do that.", "errors": [ { "message": "Enter the make" } ]}Missing or invalid API key
object
Stable machine-readable reason
With code invalid: every problem with the request, by field (message is the first)
object
Dotted path inside the item, e.g. attributes.price.amountMinor
Example
{ "statusCode": 403, "code": "forbidden", "message": "You do not have permission to do that.", "errors": [ { "message": "Enter the make" } ]}The organisation is on the Free plan (code upgrade_required)
object
Stable machine-readable reason
The feature that needs Pro
Where to upgrade or pay, in the web app
Example
{ "statusCode": 402, "code": "upgrade_required", "message": "Connections are part of Pro. Upgrade to connect texts, calls and more.", "feature": "extraSeats", "upgradePath": "/settings/billing"}The key does not have the scope (or the person the permission)
object
Stable machine-readable reason
With code invalid: every problem with the request, by field (message is the first)
object
Dotted path inside the item, e.g. attributes.price.amountMinor
Example
{ "statusCode": 403, "code": "forbidden", "message": "You do not have permission to do that.", "errors": [ { "message": "Enter the make" } ]}Rate limit reached
object
Stable machine-readable reason
Seconds until another request will be accepted
Example
{ "statusCode": 429, "code": "rate_limited", "message": "Too many requests. Each key can make 120 requests a minute; try again in 12 seconds.", "retryAfter": 12}