# \BookingsApi
All URIs are relative to *https://s3p-osdm.cloud.sqills.com*
[**delete_bookings_id**](BookingsApi.md#delete_bookings_id) | **DELETE** /bookings/{bookingId} | Deletes a booking.
[**get_bookings_id**](BookingsApi.md#get_bookings_id) | **GET** /bookings/{bookingId} | Returns a booking.
[**get_bookings_id_history**](BookingsApi.md#get_bookings_id_history) | **GET** /bookings/{bookingId}/history | Returns the history of changes to a booking.
[**post_booking_cleanup**](BookingsApi.md#post_booking_cleanup) | **POST** /bookings/{bookingId}/cleanup | Performs a complete cleanup of a booking in a single step
[**post_bookings**](BookingsApi.md#post_bookings) | **POST** /bookings | Creates a booking based on a previously requested offer.
[**update_booking**](BookingsApi.md#update_booking) | **PATCH** /bookings/{bookingId} | Updates a booking but does *not* confirm the booking.
## delete_bookings_id
> delete_bookings_id(booking_id, requestor, accept_language, traceparent, tracestate)
Deletes a booking.
It is only possible before the booking is confirmed.
### Parameters
**booking_id** | **String** | id of the booking to delete. | [required] |
**requestor** | Option<**String**> | The requestor header contains detailed information about who is calling the API. It can include information such as channel, organization, sales unit or workstation id and be used to configure e.g. the fare range provided to the caller. The content of the string is part of a bilateral contract by the two parties and not standardized by OSDM. It is recommend to encrypt the information transferred. | |
**accept_language** | Option<**String**> | Describes the set of natural languages that are preferred for localized text in the response to the request (see RFC9110). Supporting English (en) is a must. | |
**traceparent** | Option<**String**> | The traceparent header describes the position of the incoming request in its trace graph in a portable, fixed-length format. Its design focuses on fast parsing. Every tracing tool MUST properly set traceparent even when it only relies on vendor-specific information in tracestate (see W3C Trace Context). | |
**tracestate** | Option<**String**> | The tracestate extends traceparent with vendor-specific data represented by a set of name/value pairs. Storing information in tracestate is optional (see W3C Trace Context). | |
### Return type
(empty response body)
### Authorization
[oAuth2ClientCredentials](../README.md#oAuth2ClientCredentials)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/problem+json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## get_bookings_id
> models::BookingResponse get_bookings_id(booking_id, requestor, accept_language, traceparent, tracestate, x_accept_namespace, embed)
Returns a booking.
### Parameters
**booking_id** | **String** | id of the booking to get. | [required] |
**requestor** | Option<**String**> | The requestor header contains detailed information about who is calling the API. It can include information such as channel, organization, sales unit or workstation id and be used to configure e.g. the fare range provided to the caller. The content of the string is part of a bilateral contract by the two parties and not standardized by OSDM. It is recommend to encrypt the information transferred. | |
**accept_language** | Option<**String**> | Describes the set of natural languages that are preferred for localized text in the response to the request (see RFC9110). Supporting English (en) is a must. | |
**traceparent** | Option<**String**> | The traceparent header describes the position of the incoming request in its trace graph in a portable, fixed-length format. Its design focuses on fast parsing. Every tracing tool MUST properly set traceparent even when it only relies on vendor-specific information in tracestate (see W3C Trace Context). | |
**tracestate** | Option<**String**> | The tracestate extends traceparent with vendor-specific data represented by a set of name/value pairs. Storing information in tracestate is optional (see W3C Trace Context). | |
**x_accept_namespace** | Option<**String**> | The x-accept-namespace HTTP header indicates the URN namespace that the client prefers. The provider uses content-negotiation to apply the corresponding namespace(s) where applicable. | |
**embed** | Option<[**Vec<models::BookingResponseContent>**](models::BookingResponseContent.md)> | Influences whether referenced resources are returned in full or as references only. Default value: ALL | |
### Return type
[**models::BookingResponse**](BookingResponse.md)
### Authorization
[oAuth2ClientCredentials](../README.md#oAuth2ClientCredentials)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/problem+json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## get_bookings_id_history
> models::BookingHistoryResponse get_bookings_id_history(booking_id, requestor, accept_language, traceparent, tracestate)
Returns the history of changes to a booking.
### Parameters
**booking_id** | **String** | id of the booking to get. | [required] |
**requestor** | Option<**String**> | The requestor header contains detailed information about who is calling the API. It can include information such as channel, organization, sales unit or workstation id and be used to configure e.g. the fare range provided to the caller. The content of the string is part of a bilateral contract by the two parties and not standardized by OSDM. It is recommend to encrypt the information transferred. | |
**accept_language** | Option<**String**> | Describes the set of natural languages that are preferred for localized text in the response to the request (see RFC9110). Supporting English (en) is a must. | |
**traceparent** | Option<**String**> | The traceparent header describes the position of the incoming request in its trace graph in a portable, fixed-length format. Its design focuses on fast parsing. Every tracing tool MUST properly set traceparent even when it only relies on vendor-specific information in tracestate (see W3C Trace Context). | |
**tracestate** | Option<**String**> | The tracestate extends traceparent with vendor-specific data represented by a set of name/value pairs. Storing information in tracestate is optional (see W3C Trace Context). | |
### Return type
[**models::BookingHistoryResponse**](BookingHistoryResponse.md)
### Authorization
[oAuth2ClientCredentials](../README.md#oAuth2ClientCredentials)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/problem+json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## post_booking_cleanup
> models::WarningCollection post_booking_cleanup(booking_id, booking_cleanup_request, requestor, traceparent, tracestate, idempotency_key)
Performs a complete cleanup of a booking in a single step
The booking is cleaned up completely: confirmed items are refunded, and unconfirmed items are deleted. -- Attention point: refundDate and overruleCode are deprecated request attributes and will be ignored
### Parameters
**booking_id** | **String** | id of the booking. | [required] |
**booking_cleanup_request** | [**BookingCleanupRequest**](BookingCleanupRequest.md) | | [required] |
**requestor** | Option<**String**> | The requestor header contains detailed information about who is calling the API. It can include information such as channel, organization, sales unit or workstation id and be used to configure e.g. the fare range provided to the caller. The content of the string is part of a bilateral contract by the two parties and not standardized by OSDM. It is recommend to encrypt the information transferred. | |
**traceparent** | Option<**String**> | The traceparent header describes the position of the incoming request in its trace graph in a portable, fixed-length format. Its design focuses on fast parsing. Every tracing tool MUST properly set traceparent even when it only relies on vendor-specific information in tracestate (see W3C Trace Context). | |
**tracestate** | Option<**String**> | The tracestate extends traceparent with vendor-specific data represented by a set of name/value pairs. Storing information in tracestate is optional (see W3C Trace Context). | |
**idempotency_key** | Option<**uuid::Uuid**> | The HTTP Idempotency request header field can be used to carry idempotency key in order to make non-idempotent HTTP methods such as POST or PATCH fault-tolerant. Servers should keep the idempotency key for as long as the result of the underlying operation is valid. Idempotency keys should be globally unique. | |
### Return type
[**models::WarningCollection**](WarningCollection.md)
### Authorization
[oAuth2ClientCredentials](../README.md#oAuth2ClientCredentials)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json, application/problem+json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## post_bookings
> models::BookingResponse post_bookings(booking_request, requestor, accept_language, traceparent, tracestate, idempotency_key, x_accept_namespace)
Creates a booking based on a previously requested offer.
### Parameters
**booking_request** | [**BookingRequest**](BookingRequest.md) | | [required] |
**requestor** | Option<**String**> | The requestor header contains detailed information about who is calling the API. It can include information such as channel, organization, sales unit or workstation id and be used to configure e.g. the fare range provided to the caller. The content of the string is part of a bilateral contract by the two parties and not standardized by OSDM. It is recommend to encrypt the information transferred. | |
**accept_language** | Option<**String**> | Describes the set of natural languages that are preferred for localized text in the response to the request (see RFC9110). Supporting English (en) is a must. | |
**traceparent** | Option<**String**> | The traceparent header describes the position of the incoming request in its trace graph in a portable, fixed-length format. Its design focuses on fast parsing. Every tracing tool MUST properly set traceparent even when it only relies on vendor-specific information in tracestate (see W3C Trace Context). | |
**tracestate** | Option<**String**> | The tracestate extends traceparent with vendor-specific data represented by a set of name/value pairs. Storing information in tracestate is optional (see W3C Trace Context). | |
**idempotency_key** | Option<**uuid::Uuid**> | The HTTP Idempotency request header field can be used to carry idempotency key in order to make non-idempotent HTTP methods such as POST or PATCH fault-tolerant. Servers should keep the idempotency key for as long as the result of the underlying operation is valid. Idempotency keys should be globally unique. | |
**x_accept_namespace** | Option<**String**> | The x-accept-namespace HTTP header indicates the URN namespace that the client prefers. The provider uses content-negotiation to apply the corresponding namespace(s) where applicable. | |
### Return type
[**models::BookingResponse**](BookingResponse.md)
### Authorization
[oAuth2ClientCredentials](../README.md#oAuth2ClientCredentials)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json, application/problem+json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## update_booking
> models::BookingResponse update_booking(booking_id, booking_patch_request, requestor, accept_language, traceparent, tracestate, x_accept_namespace)
Updates a booking but does *not* confirm the booking.
Updates fulfillment types, place selection and add payment. Does *not* confirm the booking. The booking is confirmed by calling 'POST /bookings/{bookingId}/fulfillments'.
### Parameters
**booking_id** | **String** | id of the booking to be patched | [required] |
**booking_patch_request** | [**BookingPatchRequest**](BookingPatchRequest.md) | | [required] |
**requestor** | Option<**String**> | The requestor header contains detailed information about who is calling the API. It can include information such as channel, organization, sales unit or workstation id and be used to configure e.g. the fare range provided to the caller. The content of the string is part of a bilateral contract by the two parties and not standardized by OSDM. It is recommend to encrypt the information transferred. | |
**accept_language** | Option<**String**> | Describes the set of natural languages that are preferred for localized text in the response to the request (see RFC9110). Supporting English (en) is a must. | |
**traceparent** | Option<**String**> | The traceparent header describes the position of the incoming request in its trace graph in a portable, fixed-length format. Its design focuses on fast parsing. Every tracing tool MUST properly set traceparent even when it only relies on vendor-specific information in tracestate (see W3C Trace Context). | |
**tracestate** | Option<**String**> | The tracestate extends traceparent with vendor-specific data represented by a set of name/value pairs. Storing information in tracestate is optional (see W3C Trace Context). | |
**x_accept_namespace** | Option<**String**> | The x-accept-namespace HTTP header indicates the URN namespace that the client prefers. The provider uses content-negotiation to apply the corresponding namespace(s) where applicable. | |
### Return type
[**models::BookingResponse**](BookingResponse.md)
### Authorization
[oAuth2ClientCredentials](../README.md#oAuth2ClientCredentials)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json, application/problem+json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)