Create a Carpool Booking
POST/carpool/bookings
Creates a Carpool booking for a driver. This operation is available to the main account only.
Availability, the account's Carpool settings and the driver's existing
bookings are all checked before the booking is written, the way the Carpool
booking screen checks them. Which fields are required depends on those
settings. The account's approval setting decides whether the new booking
is BOOKING_STATUS_APPROVED, BOOKING_STATUS_REQUESTED or
BOOKING_STATUS_RETURNED.
Every request must carry an Idempotency-Key header. A retry with the same
key and body within 24 hours returns the original booking instead of
creating a second one.
The Creating a Booking
guide covers the settings that apply, the booking window, the booking
form, the returned status and notifications, idempotency and every
reason_code.
Request
Responses
- 200
- 401
- 403
- 409
- 422
- 500
The created booking, or, for a retry within 24 hours, the booking created by the earlier request with the same Idempotency-Key and body.
Unauthorized access. Authentication is required.
The operation requires main account credentials. Valid subusers receive this response.
The driver already holds an overlapping booking (CARPOOL_DRIVER_SCHEDULE_CONFLICT), or a request with the same Idempotency-Key is still being processed (CARPOOL_IDEMPOTENCY_IN_PROGRESS).
Request field validation or Carpool business validation failed.
Internal server error.