MyEZToll
POST/api/partner/v1/bookings

Create booking

Create a rental record.

Authorization

X-Api-Key header

Send your partner key on every request. The key is bound to exactly one owner account.

Body

application/json
externalIdstring

Your own booking id — recorded so you can use it everywhere.

carIdstringrequired

Our car id OR your external car id.

renterIdstringrequired

One of YOUR drivers — our driver id or your external driver id (see POST /drivers).

dateFromstring <date-time>required
dateTostring <date-time>required
statusinteger

BookingStatus code. Defaults to 6 (Approved).

pricenumber

Optional

Response

200 · application/json
successbooleanrequired
dataobject
idstring
externalIdstringnullable

Your own booking id

carIdstring
carExternalIdstringnullable
renterIdstring
renterExternalIdstringnullable
dateFromstring <date-time>
dateTostring <date-time>
statusinteger

0=Init, 1=PendingApproval, 6=Approved, 7=Completed, 8=Draft, 17=Canceled.

statusNamestring
pricenumber
isApprovedboolean
errorstringnullable

Status 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.