ImportOS · Docs
API reference

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.

  • Authentication: header Authorization: Bearer rv_live_... (API keys and scopes)
  • Required scope: write:deals
Descriptions of the operation, parameters and fields come from the OpenAPI specification (openapi.json).

Parameters

FieldInTypeRequiredDescription
idempotency-keyheaderstringnoMakes a retry of this POST safe for 24 hours: the same key and body returns the stored response (Idempotent-Replay: true).

Request body

FieldTypeRequiredDescription
contactIdstring (uuid)no
requestIdstring (uuid)no
offerIdstring (uuid)no
listingIdstring (uuid)no
vehicleIdstring (uuid)no
vehicleobjectno
vehicle.vinstring | nullno
vehicle.makestring | nullno
vehicle.modelstring | nullno
vehicle.trimstring | nullno
vehicle.yearinteger | nullno
vehicle.body"sedan" | "hatchback" | "wagon" | "suv" | "crossover" | "coupe" | "convertible" | "minivan" | "van" | "pickup" | "truck" | "motorcycle" | "other" | nullno
vehicle.fuel"petrol" | "diesel" | "hybrid" | "phev" | "ev" | "lpg" | "cng" | "hydrogen" | "other" | nullno
vehicle.enginestring | nullno
vehicle.engineCcinteger | nullno
vehicle.powerKwinteger | nullno
vehicle.gearbox"manual" | "automatic" | "cvt" | "robot" | "other" | nullno
vehicle.mileageKminteger | nullno
vehicle.colorstring | nullno
vehicle.sourcestringno
vehicle.sourceUrlstring | null (uri)no
vehicle.lotIdstring | nullno
vehicle.titleStatus"clean" | "salvage" | "rebuilt" | "flood" | "junk" | "parts_only" | "certificate" | "unknown" | nullno
type"full_service" | "auction_only" | "logistics_only" | "resale"no
route"sea" | "land"no
currency"UAH" | "USD" | "EUR" | "PLN" | "GEL"no
managerIdstring (uuid)no
feeModel"fixed" | "percent"no
feeValuenumber | stringno
destinationCountrystringno
destinationCitystringno
notestringno
notifyClientbooleanno
budgetnumber | stringno
requirementsstringno
depositobjectno
deposit.amountnumber | stringno
deposit.dueDatestring (date)no

Responses

201

The created deal.

application/json · Schema: DealCreated

FieldTypeRequiredDescription
dealobjectyes
deal.idstring (uuid)yes
deal.numberstringyes
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"yes
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" | nullyes
deal.type"full_service" | "auction_only" | "logistics_only" | "resale"yes
deal.route"sea" | "land"yes
deal.currency"UAH" | "USD" | "EUR" | "PLN" | "GEL"yes
deal.contactIdstring (uuid)yes
deal.managerIdstring | null (uuid)yes
deal.vehicleIdstring | null (uuid)yes
deal.destinationCountrystring | nullyes
deal.destinationCitystring | nullyes
deal.etaDeliverystring | nullyesISO 8601 date-time (UTC).
deal.stageDatesobjectyesstage -> time of entering it.
deal.trackingTokenstring (uuid)yesToken of the public tracking page (Track).
deal.trackingEnabledbooleanyes
deal.lostReasonstring | nullyes
deal.closedAtstring | nullyesISO 8601 date-time (UTC).
deal.createdAtstringyesISO 8601 date-time (UTC).
deal.updatedAtstringyesISO 8601 date-time (UTC).
taskIdsstring (uuid)[]yes

400

Invalid request parameters or body (code validation_error).

application/problem+json · Schema: Problem

401

Missing, malformed, unknown, revoked or expired API key (code unauthorized).

application/problem+json · Schema: Problem

403

The API key lacks the scope required by this endpoint (code insufficient_scope).

application/problem+json · Schema: Problem

404

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

application/problem+json · Schema: 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 · Schema: Problem

422

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

application/problem+json · Schema: Problem

429

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

application/problem+json · Schema: Problem

On this page