POST
/api/partner/v1/bookingsCreate booking
Create a rental record.
Authorization
X-Api-Key headerSend your partner key on every request. The key is bound to exactly one owner account.
Body
application/jsonexternalIdstringYour own booking id — recorded so you can use it everywhere.
carIdstringrequiredOur car id OR your external car id.
renterIdstringrequiredOne of YOUR drivers — our driver id or your external driver id (see POST /drivers).
dateFromstring <date-time>requireddateTostring <date-time>requiredstatusintegerBookingStatus code. Defaults to 6 (Approved).
pricenumberOptional
Response
200 · application/jsonsuccessbooleanrequireddataobjectidstringexternalIdstringnullableYour own booking id
carIdstringcarExternalIdstringnullablerenterIdstringrenterExternalIdstringnullabledateFromstring <date-time>dateTostring <date-time>statusinteger0=Init, 1=PendingApproval, 6=Approved, 7=Completed, 8=Draft, 17=Canceled.
statusNamestringpricenumberisApprovedbooleanerrorstringnullableStatus codes
200The created booking.
400Validation error.
401Missing, unknown or revoked API key.
404The resource does not exist under this owner.
409The dates overlap another live booking — of the same VEHICLE, or of the same DRIVER with another of your vehicles. One car cannot be with two drivers at once, and one driver cannot be out with two of your cars at once, so a rental record covering hours another one already covers is rejected — a toll incurred in that stretch could only be attributed to one of them, and the other driver would be billed for it. There is no override: adjust the window so it does not run into the other booking.
error names the conflicting booking, its window (UTC) and which of the two rules it breaks. Reservations that merely touch (one ends exactly when the next begins) do NOT overlap, and the same driver renting from a DIFFERENT owner over the same days is allowed.
