> For the complete documentation index, see [llms.txt](https://glu.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://glu.gitbook.io/docs/api-reference/organisation-api/booking.md).

# Booking

A booking, sometimes called a reservation, is a stay associated with a contact.

## List all bookings

> Returns a list of bookings across all gift cards. The bookings are ordered by the date they were created, with the most recent first.

```json
{"openapi":"3.1.0","info":{"title":"Glu","version":"1.0.0"},"tags":[{"name":"Booking","description":"A booking, sometimes called a reservation, is a stay associated with a contact."}],"servers":[{"url":"https://api.glu.io","description":"Production API"}],"security":[{"x_api_key":[]}],"components":{"securitySchemes":{"x_api_key":{"type":"apiKey","description":"Value for the x-api-key header parameter.","name":"x-api-key","in":"header"}},"schemas":{"Booking-booking.read":{"type":"object","description":"A booking, sometimes called a reservation, is a stay associated with a contact.","properties":{"id":{"readOnly":true,"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"checkIn":{"type":"string","format":"date-time"},"checkOut":{"type":"string","format":"date-time"},"numberOfGuests":{"type":"integer"},"roomType":{"type":["string","null"]},"roomName":{"type":["string","null"]},"externalReference":{"type":["string","null"]},"total":{"type":"integer"},"currencyCode":{"type":"string"},"customerReference":{"type":"string"},"purpose":{"type":"string"},"channelNumber":{"type":["string","null"]},"origin":{"type":"string"},"direct":{"default":false,"type":"boolean"},"status":{"type":"string","enum":["Inquired","Confirmed","Started","Processed","Canceled","Optional","Requested"]}}},"Error.jsonld":{"type":"object","description":"A representation of common errors.","properties":{"title":{"readOnly":true,"description":"A short, human-readable summary of the problem.","type":["string","null"]},"detail":{"readOnly":true,"description":"A human-readable explanation specific to this occurrence of the problem.","type":["string","null"]},"status":{"type":["integer","null"],"default":400},"instance":{"readOnly":true,"description":"A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.","type":["string","null"]},"type":{"readOnly":true,"description":"A URI reference that identifies the problem type","type":"string"},"description":{"readOnly":true,"type":["string","null"]}}},"Error":{"type":"object","description":"A representation of common errors.","properties":{"title":{"readOnly":true,"description":"A short, human-readable summary of the problem.","type":["string","null"]},"detail":{"readOnly":true,"description":"A human-readable explanation specific to this occurrence of the problem.","type":["string","null"]},"status":{"type":["integer","null"],"default":400},"instance":{"readOnly":true,"description":"A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.","type":["string","null"]},"type":{"readOnly":true,"description":"A URI reference that identifies the problem type","type":"string"}}}}},"paths":{"/bookings":{"get":{"operationId":"api_bookings_get_collection","tags":["Booking"],"responses":{"200":{"description":"Booking collection","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Booking-booking.read"}}}}},"403":{"description":"Forbidden","content":{"application/ld+json":{"schema":{"$ref":"#/components/schemas/Error.jsonld"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}},"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"links":{}}},"summary":"List all bookings","description":"Returns a list of bookings across all gift cards. The bookings are ordered by the date they were created, with the most recent first.","parameters":[{"name":"page","in":"query","description":"The collection page number","required":false,"deprecated":false,"schema":{"type":"integer","default":1},"style":"form","explode":true},{"name":"createdAt[before]","in":"query","description":"","required":false,"deprecated":false,"schema":{"type":"string"},"style":"form","explode":false},{"name":"createdAt[strictly_before]","in":"query","description":"","required":false,"deprecated":false,"schema":{"type":"string"},"style":"form","explode":false},{"name":"createdAt[after]","in":"query","description":"","required":false,"deprecated":false,"schema":{"type":"string"},"style":"form","explode":false},{"name":"createdAt[strictly_after]","in":"query","description":"","required":false,"deprecated":false,"schema":{"type":"string"},"style":"form","explode":false},{"name":"updatedAt[before]","in":"query","description":"","required":false,"deprecated":false,"schema":{"type":"string"},"style":"form","explode":false},{"name":"updatedAt[strictly_before]","in":"query","description":"","required":false,"deprecated":false,"schema":{"type":"string"},"style":"form","explode":false},{"name":"updatedAt[after]","in":"query","description":"","required":false,"deprecated":false,"schema":{"type":"string"},"style":"form","explode":false},{"name":"updatedAt[strictly_after]","in":"query","description":"","required":false,"deprecated":false,"schema":{"type":"string"},"style":"form","explode":false},{"name":"checkIn[before]","in":"query","description":"","required":false,"deprecated":false,"schema":{"type":"string"},"style":"form","explode":false},{"name":"checkIn[strictly_before]","in":"query","description":"","required":false,"deprecated":false,"schema":{"type":"string"},"style":"form","explode":false},{"name":"checkIn[after]","in":"query","description":"","required":false,"deprecated":false,"schema":{"type":"string"},"style":"form","explode":false},{"name":"checkIn[strictly_after]","in":"query","description":"","required":false,"deprecated":false,"schema":{"type":"string"},"style":"form","explode":false},{"name":"checkOut[before]","in":"query","description":"","required":false,"deprecated":false,"schema":{"type":"string"},"style":"form","explode":false},{"name":"checkOut[strictly_before]","in":"query","description":"","required":false,"deprecated":false,"schema":{"type":"string"},"style":"form","explode":false},{"name":"checkOut[after]","in":"query","description":"","required":false,"deprecated":false,"schema":{"type":"string"},"style":"form","explode":false},{"name":"checkOut[strictly_after]","in":"query","description":"","required":false,"deprecated":false,"schema":{"type":"string"},"style":"form","explode":false}]}}}}
```

## Retrieve a booking

> Retrieve a booking

```json
{"openapi":"3.1.0","info":{"title":"Glu","version":"1.0.0"},"tags":[{"name":"Booking","description":"A booking, sometimes called a reservation, is a stay associated with a contact."}],"servers":[{"url":"https://api.glu.io","description":"Production API"}],"security":[{"x_api_key":[]}],"components":{"securitySchemes":{"x_api_key":{"type":"apiKey","description":"Value for the x-api-key header parameter.","name":"x-api-key","in":"header"}},"schemas":{"Booking-booking.read":{"type":"object","description":"A booking, sometimes called a reservation, is a stay associated with a contact.","properties":{"id":{"readOnly":true,"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"checkIn":{"type":"string","format":"date-time"},"checkOut":{"type":"string","format":"date-time"},"numberOfGuests":{"type":"integer"},"roomType":{"type":["string","null"]},"roomName":{"type":["string","null"]},"externalReference":{"type":["string","null"]},"total":{"type":"integer"},"currencyCode":{"type":"string"},"customerReference":{"type":"string"},"purpose":{"type":"string"},"channelNumber":{"type":["string","null"]},"origin":{"type":"string"},"direct":{"default":false,"type":"boolean"},"status":{"type":"string","enum":["Inquired","Confirmed","Started","Processed","Canceled","Optional","Requested"]}}},"Error.jsonld":{"type":"object","description":"A representation of common errors.","properties":{"title":{"readOnly":true,"description":"A short, human-readable summary of the problem.","type":["string","null"]},"detail":{"readOnly":true,"description":"A human-readable explanation specific to this occurrence of the problem.","type":["string","null"]},"status":{"type":["integer","null"],"default":400},"instance":{"readOnly":true,"description":"A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.","type":["string","null"]},"type":{"readOnly":true,"description":"A URI reference that identifies the problem type","type":"string"},"description":{"readOnly":true,"type":["string","null"]}}},"Error":{"type":"object","description":"A representation of common errors.","properties":{"title":{"readOnly":true,"description":"A short, human-readable summary of the problem.","type":["string","null"]},"detail":{"readOnly":true,"description":"A human-readable explanation specific to this occurrence of the problem.","type":["string","null"]},"status":{"type":["integer","null"],"default":400},"instance":{"readOnly":true,"description":"A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.","type":["string","null"]},"type":{"readOnly":true,"description":"A URI reference that identifies the problem type","type":"string"}}}}},"paths":{"/bookings/{id}":{"get":{"operationId":"api_bookings_id_get","tags":["Booking"],"responses":{"200":{"description":"Booking resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Booking-booking.read"}}}},"403":{"description":"Forbidden","content":{"application/ld+json":{"schema":{"$ref":"#/components/schemas/Error.jsonld"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}},"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"links":{}},"404":{"description":"Not found","content":{"application/ld+json":{"schema":{"$ref":"#/components/schemas/Error.jsonld"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}},"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"links":{}}},"summary":"Retrieve a booking","description":"Retrieve a booking","parameters":[{"name":"id","in":"path","description":"Booking identifier","required":true,"deprecated":false,"schema":{"type":"string"},"style":"simple","explode":false}]}}}}
```

## Update a booking

> Allows updating the details of a booking, such as its status or cancellation.

```json
{"openapi":"3.1.0","info":{"title":"Glu","version":"1.0.0"},"tags":[{"name":"Booking","description":"A booking, sometimes called a reservation, is a stay associated with a contact."}],"servers":[{"url":"https://api.glu.io","description":"Production API"}],"security":[{"x_api_key":[]}],"components":{"securitySchemes":{"x_api_key":{"type":"apiKey","description":"Value for the x-api-key header parameter.","name":"x-api-key","in":"header"}},"schemas":{"Booking-booking.read":{"type":"object","description":"A booking, sometimes called a reservation, is a stay associated with a contact.","properties":{"id":{"readOnly":true,"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"checkIn":{"type":"string","format":"date-time"},"checkOut":{"type":"string","format":"date-time"},"numberOfGuests":{"type":"integer"},"roomType":{"type":["string","null"]},"roomName":{"type":["string","null"]},"externalReference":{"type":["string","null"]},"total":{"type":"integer"},"currencyCode":{"type":"string"},"customerReference":{"type":"string"},"purpose":{"type":"string"},"channelNumber":{"type":["string","null"]},"origin":{"type":"string"},"direct":{"default":false,"type":"boolean"},"status":{"type":"string","enum":["Inquired","Confirmed","Started","Processed","Canceled","Optional","Requested"]}}},"Error.jsonld":{"type":"object","description":"A representation of common errors.","properties":{"title":{"readOnly":true,"description":"A short, human-readable summary of the problem.","type":["string","null"]},"detail":{"readOnly":true,"description":"A human-readable explanation specific to this occurrence of the problem.","type":["string","null"]},"status":{"type":["integer","null"],"default":400},"instance":{"readOnly":true,"description":"A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.","type":["string","null"]},"type":{"readOnly":true,"description":"A URI reference that identifies the problem type","type":"string"},"description":{"readOnly":true,"type":["string","null"]}}},"Error":{"type":"object","description":"A representation of common errors.","properties":{"title":{"readOnly":true,"description":"A short, human-readable summary of the problem.","type":["string","null"]},"detail":{"readOnly":true,"description":"A human-readable explanation specific to this occurrence of the problem.","type":["string","null"]},"status":{"type":["integer","null"],"default":400},"instance":{"readOnly":true,"description":"A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.","type":["string","null"]},"type":{"readOnly":true,"description":"A URI reference that identifies the problem type","type":"string"}}},"ConstraintViolation.jsonld":{"type":"object","description":"Unprocessable entity","properties":{"status":{"default":422,"type":"integer"},"violations":{"type":"array","items":{"type":"object","properties":{"propertyPath":{"type":"string","description":"The property path of the violation"},"message":{"type":"string","description":"The message associated with the violation"},"code":{"type":"string","description":"The code of the violation"},"hint":{"type":"string","description":"An extra hint to understand the violation"},"payload":{"type":"object","additionalProperties":true,"description":"The serialized payload of the violation"}},"required":["propertyPath","message"]}},"detail":{"readOnly":true,"type":"string"},"description":{"readOnly":true,"type":"string"},"type":{"readOnly":true,"type":"string"},"title":{"readOnly":true,"type":["string","null"]},"instance":{"readOnly":true,"type":["string","null"]}}},"ConstraintViolation":{"type":"object","description":"Unprocessable entity","properties":{"status":{"default":422,"type":"integer"},"violations":{"type":"array","items":{"type":"object","properties":{"propertyPath":{"type":"string","description":"The property path of the violation"},"message":{"type":"string","description":"The message associated with the violation"},"code":{"type":"string","description":"The code of the violation"},"hint":{"type":"string","description":"An extra hint to understand the violation"},"payload":{"type":"object","additionalProperties":true,"description":"The serialized payload of the violation"}},"required":["propertyPath","message"]}},"detail":{"readOnly":true,"type":"string"},"type":{"readOnly":true,"type":"string"},"title":{"readOnly":true,"type":["string","null"]},"instance":{"readOnly":true,"type":["string","null"]}}},"Booking-booking.write":{"type":"object","description":"A booking, sometimes called a reservation, is a stay associated with a contact.","properties":{"id":{"readOnly":true,"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"checkIn":{"type":"string","format":"date-time"},"checkOut":{"type":"string","format":"date-time"},"numberOfGuests":{"type":"integer"},"roomType":{"type":["string","null"]},"roomName":{"type":["string","null"]},"externalReference":{"type":["string","null"]},"total":{"type":"integer"},"currencyCode":{"type":"string"},"customerReference":{"type":"string"},"purpose":{"type":"string"},"channelNumber":{"type":["string","null"]},"origin":{"type":"string"},"direct":{"default":false,"type":"boolean"},"status":{"type":"string","enum":["Inquired","Confirmed","Started","Processed","Canceled","Optional","Requested"]}}}}},"paths":{"/bookings/{id}":{"put":{"operationId":"api_bookings_id_put","tags":["Booking"],"responses":{"200":{"description":"Booking resource updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Booking-booking.read"}}},"links":{}},"400":{"description":"Invalid input","content":{"application/ld+json":{"schema":{"$ref":"#/components/schemas/Error.jsonld"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}},"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"links":{}},"403":{"description":"Forbidden","content":{"application/ld+json":{"schema":{"$ref":"#/components/schemas/Error.jsonld"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}},"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"links":{}},"404":{"description":"Not found","content":{"application/ld+json":{"schema":{"$ref":"#/components/schemas/Error.jsonld"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}},"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"links":{}},"422":{"description":"An error occurred","content":{"application/ld+json":{"schema":{"$ref":"#/components/schemas/ConstraintViolation.jsonld"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/ConstraintViolation"}},"application/json":{"schema":{"$ref":"#/components/schemas/ConstraintViolation"}}},"links":{}}},"summary":"Update a booking","description":"Allows updating the details of a booking, such as its status or cancellation.","parameters":[{"name":"id","in":"path","description":"Booking identifier","required":true,"deprecated":false,"schema":{"type":"string"},"style":"simple","explode":false}],"requestBody":{"description":"The updated Booking resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Booking-booking.write"}}},"required":true}}}}}
```
