POST /v1/bookings with an Idempotency-Key header. Use the operation ID from the Location header (/v1/booking_operations/{id}) or data.reference.operationId of that response as id.404. An id that is not a positive integer returns 400. Error responses of this endpoint have no errorMessage.bookings.read scope.| Field | Description |
|---|---|
data.state | pending, processing, completed or recovery_required. completed means all processing after the booking is finished. recovery_required means Jicoo needs to check the request. pending and processing can also mean that the booking is not created yet. |
data.responseState | pending (the first response is not saved yet), available (POST with the same key returns the saved first response) or expired (the saved first response expired after 24 hours). |
data.code | The reason when the whole operation needs to be checked. Otherwise null. When a step needs to be checked, see failedSteps[].code. |
data.reference | operationId, bookingUid and statusPath. After the booking is created, use bookingUid with GET /v1/bookings/{uid}. Before that, GET /v1/bookings/{uid} returns 404. |
data.failedSteps | Steps that need to be checked. Each item has sequence, kind and code. Empty when there are none. |
data.steps | All steps in order. Each item has sequence, kind, status, attempts, dispatchAttempts and lastErrorCode. |
steps[].status is pending, enqueued, processing, completed or recovery_required.kind external_queue_transfer also has externalDeliveryState: queue_accepted or unconfirmed. queue_accepted means the request was accepted by the delivery queue (for example, a webhook). It does not mean that it reached the recipient.kind and code values may be added in the future. Do not stop processing on unknown values.