POST /v1/extension/lot
Add a lot to Desk: vehicle + offer for a client request
Add a lot to Desk: vehicle + offer for a client request
Creates a vehicle (source "extension"; the same lot is not duplicated) and an offer for the chosen client request. The client-facing snapshot merges lot price, auction fees and the broker fee into one line and never contains the margin. With send=true the offer is sent to the client right away (event request.offer_sent; delivery to Telegram/cabinet is done by the notification worker). Supports Idempotency-Key. Requires scope write:deals.
- Автентифікація: заголовок
Authorization: Bearer rv_live_...(API-ключі та scopes) - Потрібний scope:
write:deals
openapi.json) і подається англійською, як у самому API.Параметри
| Поле | Де | Тип | Обов’язк. | Опис |
|---|---|---|---|---|
idempotency-key | header | string | ні | Makes a retry of this POST safe for 24 hours: the same key and body returns the stored response. |
Тіло запиту
| Поле | Тип | Обов’язк. | Опис |
|---|---|---|---|
request_id | string (uuid) | так | Client request (from GET /v1/extension/requests) the offer is made for. |
lot | object | так | |
lot.auction | "copart" | "iaai" | так | |
lot.lot_id | string | так | |
lot.url | string (uri) | так | Link to the lot page. |
lot.title | string | так | |
lot.vin | string | ні | |
lot.make | string | ні | |
lot.model | string | ні | |
lot.year | integer | ні | |
lot.fuel | "petrol" | "diesel" | "hybrid" | "phev" | "ev" | "lpg" | "cng" | "hydrogen" | "other" | ні | |
lot.engine_cc | integer | ні | |
lot.kwh | number | ні | |
lot.mileage_km | integer | ні | |
lot.damage_primary | string | ні | |
lot.damage_secondary | string | ні | |
lot.title_status | "clean" | "salvage" | "rebuilt" | "flood" | "junk" | "parts_only" | "certificate" | "unknown" | ні | |
lot.yard | string | ні | |
lot.us_state | string | ні | |
lot.price_usd | number | ні | Current bid or buy-now price in USD. |
lot.photos | string (uri)[] | ні | |
landed | object | так | |
landed.currency | string | так | |
landed.total | number | так | |
landed.country | "UA" | "PL" | "LT" | "GE" | "DE" | так | |
landed.confidence | number | ні | |
landed.items | object[] | так | Landed cost lines in currency. The client sees them aggregated: lot, auction fees and the broker fee are merged into one "vehicle and services" line. |
landed.items[].kind | "lot_price" | "auction_fee" | "broker_fee" | "inland_us" | "ocean" | "port" | "inland_eu" | "customs_duty" | "excise" | "vat" | "broker_customs" | "certification" | "pension_fund" | "registration" | "repair" | "detailing" | "insurance" | "our_fee" | "other" | ні | |
landed.items[].amount | number | ні | |
message | string | ні | Text for the client. |
send | boolean | ні | true: send the offer to the client right away (Telegram by default). |
channel | "telegram" | "viber" | "email" | "sms" | "webhook" | "in_app" | ні |
Відповіді
201
Created.
application/json · Схема: ExtensionLotResponse
| Поле | Тип | Обов’язк. | Опис |
|---|---|---|---|
vehicle_id | string (uuid) | так | |
offer_id | string (uuid) | так | |
request_id | string (uuid) | так | |
contact_id | string (uuid) | так | |
status | "draft" | "sent" | так | |
price_total | string | null | так | |
currency | string | null | так | |
desk_path | string | так | Path in Desk where the request with the offer is shown. |
400
Invalid request parameters or body (code validation_error).
application/problem+json · Схема: Problem
401
Missing, malformed, unknown, revoked or expired API key (code unauthorized).
application/problem+json · Схема: Problem
403
The API key lacks the scope required by this endpoint (code insufficient_scope).
application/problem+json · Схема: Problem
404
The request does not exist in this tenant.
application/problem+json · Схема: Problem
409
The offer cannot be created or sent in the current state.
application/problem+json · Схема: Problem
422
Invalid data (e.g. VIN checksum).
application/problem+json · Схема: Problem
429
Rate limit exceeded for the tenant plan (code rate_limited). Wait Retry-After seconds.
application/problem+json · Схема: Problem