Upsert vehicles in a batch
POST/vehicles/batch
Creates or updates up to 500 vehicles in one request, with their
photos. Scope: vehicles:write. Secret keys only.
Each item is matched, in order, by id, then external_id, then
registration: a matched item updates that vehicle, an unmatched one
creates a vehicle. An item's images replaces that vehicle's photos
through a staged import, so the vehicle is never shown with half a
gallery.
The request checks each item's shape and answers 202 at once; items
that fail the check are already failed in the response. The rest
are written in the background: poll GET /vehicle-batches/{id} for
per-item results, or listen for the vehicle_batch.completed event.
On the Free plan, created items beyond the stock cap fail with
plan_stock_cap_reached; updates always go through.
Request
Responses
- 202
- 401
- 403
- 422
- 429
The batch, with a result for every item.
Response Headers
This request's id. Quote it to support.
Requests allowed per minute for this key.
Requests left in the current minute.
true when this is the stored response to an earlier request with the same Idempotency-Key.
No key, or one that cannot be used. Codes: missing_api_key,
invalid_api_key, api_key_revoked, api_key_expired,
key_owner_inactive.
Response Headers
This request's id. Quote it to support.
Bearer.
The key may not do this. Codes: insufficient_scope,
scope_not_permitted_for_owner, plan_not_entitled,
secret_key_required, publishable_key_required,
secret_key_in_browser, origin_not_allowed, ip_not_allowed,
branch_move_not_permitted, plan_stock_cap_reached,
sandbox_stock_cap_reached, not_available_in_sandbox,
theme_builder_not_enabled.
Response Headers
This request's id. Quote it to support.
The request was not valid. Code validation_failed, with errors
keyed by field; also body_not_received (a multipart body that
never arrived), webhook_endpoint_limit_reached,
vehicle_not_created, request_refused and
theme_publish_blocked (with errors.routes and errors.findings).
Response Headers
This request's id. Quote it to support.
Too many requests. Code rate_limited; wait Retry-After seconds. On POST /theme-generations, also theme_generation_quota_exceeded, when the dealer's monthly theme generations are used up (no Retry-After).
Response Headers
This request's id. Quote it to support.
Requests allowed per minute for this key.
Requests left in the current minute.
Seconds to wait before retrying.