Skip to navigation

Create a reservation

Records a reservation request as PENDING; reserve or reject it next. Retrying with the same Idempotency-Key returns the first result.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Headers

Idempotency-KeystringRequired1-255 characters
A unique key you choose for this call, e.g. a UUID. Retrying with the same key returns the first result instead of acting twice.

Request

This endpoint expects an object.
booking_idstringRequired1-36 characters
request_idstringRequired1-36 characters
location_idstringRequired1-36 characters
periodobjectRequired
When the reservation may be used.
authorization_referencestringRequired1-36 characters
booking_termsobjectRequired
Terms accepted for the reservation.
booking_requestslist of objectsRequired
roleenumRequired
country_codestringRequiredformat: "^[A-Za-z]{2}$"=2 characters
party_idstringRequiredformat: "^[A-Za-z]{3}$"=3 characters
booking_optionobject or nullOptional
OCPI booking option. The gateway stores the object it received.
booking_tokenslist of objects or nullOptional
tariff_idslist of strings or nullOptional
canceledobject or nullOptional
OCPI cancellation object.
access_informationlist of objects or nullOptional
last_updateddatetime or nullOptional
originenum or nullOptionalDefaults to LOCAL
Allowed values:
ocpi_versionenum or nullOptionalDefaults to 2.3.0
Allowed values:

Response

The created reservation, PENDING.
idinteger
booking_idstring
request_idstring
location_idstring
periodobject
When the reservation may be used.
reservation_statusenum or any
authorization_referencestring
booking_termsobject
Terms accepted for the reservation.
booking_requestslist of objects
last_updateddatetime
roleenum or any
originenum or any
organization_idstring
country_codestring
party_idstring
ocpi_versionenum or any
created_atdatetime
updated_atdatetime
booking_optionmap from strings to any or nullOptional
booking_tokenslist of objects or nullOptional
tariff_idslist of strings or nullOptional
canceledmap from strings to any or nullOptional
access_informationlist of objects or nullOptional
deleted_atdatetime or nullOptional

Errors

401
Unauthorized Error
409
Conflict Error
422
Unprocessable Entity Error
429
Too Many Requests Error
502
Bad Gateway Error
504
Gateway Timeout Error