ImportOS · Документація
Довідник API

POST /v1/deals

Create a deal

Create a deal

Creates a deal at stage "lead" with the next number of the tenant. Supports Idempotency-Key. Requires scope write:deals.

  • Автентифікація: заголовок Authorization: Bearer rv_live_... (API-ключі та scopes)
  • Потрібний scope: write:deals
Опис операції, параметрів і полів походить зі специфікації OpenAPI (openapi.json) і подається англійською, як у самому API.

Параметри

ПолеДеТипОбов’язк.Опис
idempotency-keyheaderstringніMakes a retry of this POST safe for 24 hours: the same key and body returns the stored response (Idempotent-Replay: true).

Тіло запиту

ПолеТипОбов’язк.Опис
contactIdstring (uuid)ні
requestIdstring (uuid)ні
offerIdstring (uuid)ні
listingIdstring (uuid)ні
vehicleIdstring (uuid)ні
vehicleobjectні
vehicle.vinstring | nullні
vehicle.makestring | nullні
vehicle.modelstring | nullні
vehicle.trimstring | nullні
vehicle.yearinteger | nullні
vehicle.body"sedan" | "hatchback" | "wagon" | "suv" | "crossover" | "coupe" | "convertible" | "minivan" | "van" | "pickup" | "truck" | "motorcycle" | "other" | nullні
vehicle.fuel"petrol" | "diesel" | "hybrid" | "phev" | "ev" | "lpg" | "cng" | "hydrogen" | "other" | nullні
vehicle.enginestring | nullні
vehicle.engineCcinteger | nullні
vehicle.powerKwinteger | nullні
vehicle.gearbox"manual" | "automatic" | "cvt" | "robot" | "other" | nullні
vehicle.mileageKminteger | nullні
vehicle.colorstring | nullні
vehicle.sourcestringні
vehicle.sourceUrlstring | null (uri)ні
vehicle.lotIdstring | nullні
vehicle.titleStatus"clean" | "salvage" | "rebuilt" | "flood" | "junk" | "parts_only" | "certificate" | "unknown" | nullні
type"full_service" | "auction_only" | "logistics_only" | "resale"ні
route"sea" | "land"ні
currency"UAH" | "USD" | "EUR" | "PLN" | "GEL"ні
managerIdstring (uuid)ні
feeModel"fixed" | "percent"ні
feeValuenumber | stringні
destinationCountrystringні
destinationCitystringні
notestringні
notifyClientbooleanні
budgetnumber | stringні
requirementsstringні
depositobjectні
deposit.amountnumber | stringні
deposit.dueDatestring (date)ні

Відповіді

201

The created deal.

application/json · Схема: DealCreated

ПолеТипОбов’язк.Опис
dealobjectтак
deal.idstring (uuid)так
deal.numberstringтак
deal.status"lead" | "consult" | "contract_signed" | "deposit_paid" | "searching" | "bid_approved" | "won" | "paid_to_auction" | "pickup_scheduled" | "at_us_warehouse" | "loaded" | "in_transit_sea" | "at_eu_port" | "inland_to_border" | "customs_clearing" | "customs_cleared" | "certification" | "registration" | "ready_for_handover" | "handed_over" | "closed" | "lost" | "cancelled" | "on_hold" | "dispute"так
deal.pausedFrom"lead" | "consult" | "contract_signed" | "deposit_paid" | "searching" | "bid_approved" | "won" | "paid_to_auction" | "pickup_scheduled" | "at_us_warehouse" | "loaded" | "in_transit_sea" | "at_eu_port" | "inland_to_border" | "customs_clearing" | "customs_cleared" | "certification" | "registration" | "ready_for_handover" | "handed_over" | "closed" | "lost" | "cancelled" | "on_hold" | "dispute" | nullтак
deal.type"full_service" | "auction_only" | "logistics_only" | "resale"так
deal.route"sea" | "land"так
deal.currency"UAH" | "USD" | "EUR" | "PLN" | "GEL"так
deal.contactIdstring (uuid)так
deal.managerIdstring | null (uuid)так
deal.vehicleIdstring | null (uuid)так
deal.destinationCountrystring | nullтак
deal.destinationCitystring | nullтак
deal.etaDeliverystring | nullтакISO 8601 date-time (UTC).
deal.stageDatesobjectтакstage -> time of entering it.
deal.trackingTokenstring (uuid)такToken of the public tracking page (Track).
deal.trackingEnabledbooleanтак
deal.lostReasonstring | nullтак
deal.closedAtstring | nullтакISO 8601 date-time (UTC).
deal.createdAtstringтакISO 8601 date-time (UTC).
deal.updatedAtstringтакISO 8601 date-time (UTC).
taskIdsstring (uuid)[]так

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

Contact, request, offer or listing not found in this tenant.

application/problem+json · Схема: Problem

409

Conflict: duplicate contact (duplicate_ids), a request with this Idempotency-Key is still being processed, or the stage transition is blocked (missing[]).

application/problem+json · Схема: Problem

422

Well-formed but not acceptable data (unprocessable_input), or Idempotency-Key reused with a different request.

application/problem+json · Схема: Problem

429

Rate limit exceeded for the tenant plan (code rate_limited). Wait Retry-After seconds.

application/problem+json · Схема: Problem

На цій сторінці