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

# Hotel Booking

API methods to manage hotel bookings (Find/Add) Standard API Responses 200 Success 401 Unauthorized (no valid access token provided) 403 Forbidden Forbidden (indicates you do not have access to this method) 404 Not Found (indicates invalid parameters or missing API endpoint) 500 Internal Server Error (indicates something went wrong on our end) for 200-level responses there is a field named ResponseStatus which will give you the status of the call : true Success false there is an error (you will find the error code and the description in the object Errors ) Possible Errors 1 Missing mandatory fields 2 Internal Error 45 No Supplier found for the user 46 HotelBookingRef already exists 47 Invalid booking status 48 Missing mandatory fields for rooms parameter 49 Rooms contains invalid RoomStatus parameter 50 No Booking Found With Such Details

## FindHotelBooking

> Find hotel bookings

```json
{"openapi":"3.0.3","info":{"title":"Atreemo API","version":"0.1.0"},"tags":[{"name":"HotelBooking","description":"API methods to manage hotel bookings (Find/Add) Standard API Responses 200 Success 401 Unauthorized (no valid access token provided) 403 Forbidden Forbidden (indicates you do not have access to this method) 404 Not Found (indicates invalid parameters or missing API endpoint) 500 Internal Server Error (indicates something went wrong on our end) for 200-level responses there is a field named ResponseStatus which will give you the status of the call : true Success false there is an error (you will find the error code and the description in the object Errors ) Possible Errors 1 Missing mandatory fields 2 Internal Error 45 No Supplier found for the user 46 HotelBookingRef already exists 47 Invalid booking status 48 Missing mandatory fields for rooms parameter 49 Rooms contains invalid RoomStatus parameter 50 No Booking Found With Such Details"}],"servers":[{"url":"https://apim-hospitality-dev-uksouth.azure-api.net/atreemo-api","description":"Local DEV APIM import draft only; not a deployed endpoint announcement."}],"security":[{"AtreemoBearer":[]}],"components":{"securitySchemes":{"AtreemoBearer":{"type":"http","scheme":"bearer","description":"Atreemo access token obtained by the caller from the Atreemo instance `POST /token` endpoint (OAuth2 password grant) and sent as `Authorization: Bearer <token>`. See the Authorisation guide."}},"schemas":{"FindHotelBookingPayLoad":{"type":"object","properties":{"ExternalBookingReference":{"type":"string","description":"External Booking Reference"},"HotelBookerCtcID":{"type":"integer","format":"int32","description":"Hotel Booker Ctcid"},"HotelBookerRef":{"type":"string","description":"Hotel Booker Reference"},"HotelBookingID":{"type":"integer","format":"int64","nullable":true,"description":"Hotel Booking Acteol ID"},"HotelBookingRef":{"type":"string","description":"Internal PMS Hotel Booking Reference"}}},"FindHotelBookingOutput":{"type":"object","properties":{"Errors":{"type":"array","items":{"$ref":"#/components/schemas/APICallError"},"description":"Collection of errors if exist"},"ResponseStatus":{"type":"boolean","description":"True: if the action was succsessfully treated False: if there is an error"}}},"APICallError":{"type":"object","properties":{"ErrorCode":{"type":"integer","format":"int32","description":"The error code"},"ErrorDescription":{"type":"string","description":"The error description"}}}},"responses":{"401":{"description":"Unauthorized (no valid access token provided). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"403":{"description":"Forbidden (indicates you do not have access to this method). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"404":{"description":"Not Found (indicates invalid parameters or missing API endpoint). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"500":{"description":"Internal Server Error (indicates something went wrong on our end). Wording from the Atreemo folder documentation; the response body for this status is not documented."}}},"paths":{"/api/HotelBooking/FindHotelBooking":{"post":{"operationId":"HotelBookingFindHotelBooking","summary":"FindHotelBooking","tags":["HotelBooking"],"description":"Find hotel bookings","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FindHotelBookingPayLoad"}}}},"responses":{"200":{"description":"OK (sample status in the public collection).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FindHotelBookingOutput"}}}},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Patch

> Patch hotel booking

```json
{"openapi":"3.0.3","info":{"title":"Atreemo API","version":"0.1.0"},"tags":[{"name":"HotelBooking","description":"API methods to manage hotel bookings (Find/Add) Standard API Responses 200 Success 401 Unauthorized (no valid access token provided) 403 Forbidden Forbidden (indicates you do not have access to this method) 404 Not Found (indicates invalid parameters or missing API endpoint) 500 Internal Server Error (indicates something went wrong on our end) for 200-level responses there is a field named ResponseStatus which will give you the status of the call : true Success false there is an error (you will find the error code and the description in the object Errors ) Possible Errors 1 Missing mandatory fields 2 Internal Error 45 No Supplier found for the user 46 HotelBookingRef already exists 47 Invalid booking status 48 Missing mandatory fields for rooms parameter 49 Rooms contains invalid RoomStatus parameter 50 No Booking Found With Such Details"}],"servers":[{"url":"https://apim-hospitality-dev-uksouth.azure-api.net/atreemo-api","description":"Local DEV APIM import draft only; not a deployed endpoint announcement."}],"security":[{"AtreemoBearer":[]}],"components":{"securitySchemes":{"AtreemoBearer":{"type":"http","scheme":"bearer","description":"Atreemo access token obtained by the caller from the Atreemo instance `POST /token` endpoint (OAuth2 password grant) and sent as `Authorization: Bearer <token>`. See the Authorisation guide."}},"schemas":{"HotelBookingPatch":{"type":"object","properties":{"BookingNightsNumber":{"type":"integer","format":"int32","nullable":true,"description":"Hotel booking number of nights."},"ChannelID":{"type":"string","description":"Hotel booking channel ID."},"CheckInDate":{"type":"string","format":"date-time","nullable":true,"description":"Hotel booking checkin date."},"CheckOutDate":{"type":"string","format":"date-time","nullable":true,"description":"Hotel booking checkout date."},"CreationDate":{"type":"string","format":"date-time","nullable":true,"description":"Hotel booking creation date."},"CustomFields":{"type":"array","items":{"$ref":"#/components/schemas/HotelBookingCustomFields"},"description":"Hotel booking list of custom fields."},"LastUpdatedDate":{"type":"string","format":"date-time","nullable":true,"description":"Hotel booking last updated date."},"Location":{"allOf":[{"$ref":"#/components/schemas/ApiLocation"}],"description":"Hotel booking location."},"Rooms":{"type":"array","items":{"$ref":"#/components/schemas/HotelBookingRoomPatch"},"description":"Hotel booking list of rooms."},"Spend":{"type":"number","format":"double","nullable":true,"description":"Hotel booking spend."},"Status":{"description":"Hotel booking status. (Documented as type `BookingStatus`. No values are listed on this property; the published description of `HotelBooking.Status` lists values for the same type name, which is not evidence that the same list applies here.)","type":"integer","format":"int32"}}},"HotelBookingCustomFields":{"type":"object","properties":{"FieldName":{"type":"string","description":"Field name"},"FieldValue":{"type":"string","description":"Field value"}}},"ApiLocation":{"type":"object","properties":{"ActeolSiteID":{"type":"integer","format":"int32","description":"the ID of the site visited (Acteol id)"},"ExternalLocationID":{"type":"string","description":"the ID of the site visited (supplier site id if the user in mapped with a supplier) this field will be ignored if ActeolSiteID is populated"}}},"HotelBookingRoomPatch":{"type":"object","nullable":true,"properties":{"RoomRef":{"type":"string","nullable":true},"RoomStatus":{"allOf":[{"$ref":"#/components/schemas/BookingStatus"}],"type":"integer","nullable":true},"RoomType":{"type":"string","nullable":true},"RoomCapacity":{"type":"string","nullable":true},"RoomCheckInDate":{"type":"string","format":"date-time","nullable":true},"RoomCheckOutDate":{"type":"string","format":"date-time","nullable":true},"RoomDiningNumber":{"type":"integer","format":"int32","nullable":true},"RoomNightsNumber":{"type":"integer","format":"int32","nullable":true},"RoomAdultsNumber":{"type":"integer","format":"int32","nullable":true},"RoomChildrenNumber":{"type":"integer","format":"int32","nullable":true},"RoomInfantsNumber":{"type":"integer","format":"int32","nullable":true},"RoomPetsNumber":{"type":"integer","format":"int32","nullable":true},"RoomRatePlan":{"type":"string","nullable":true},"RoomVoucherCode":{"type":"string","nullable":true},"RoomEstimatedSpend":{"type":"number","format":"double","nullable":true},"Guests":{"type":"array","items":{"$ref":"#/components/schemas/Guest"},"nullable":true},"Revenues":{"type":"array","items":{"$ref":"#/components/schemas/RoomRevenue"},"nullable":true},"GuaranteeCode":{"type":"string","nullable":true},"SpecialRequests":{"type":"array","items":{"$ref":"#/components/schemas/RoomSpecialRequest"},"nullable":true},"CancelPenalties":{"type":"array","items":{"$ref":"#/components/schemas/RoomCancelPenalty"},"nullable":true},"CustomFields":{"type":"array","items":{"$ref":"#/components/schemas/HotelBookingCustomFields"},"nullable":true}},"description":"Source-backed JSON members, including inheritance and JSON naming/ignore attributes. No property is required solely because its CLR value type is non-nullable. Runtime and deployment alignment are unverified. Omit a field to leave it unchanged; provided-null handling is controlled by the custom patch binder. Internal *Provided flags are excluded from JSON."},"BookingStatus":{"type":"integer","format":"int32","description":"Named CLR enum values at the pinned source. Default Json.NET serialization is numeric; no StringEnumConverter was found in the inspected startup/model path. These names do not prove that undefined integers are rejected, so this is not a closed validation enum. Runtime-unverified."},"Guest":{"type":"object","properties":{"GuestCtcID":{"type":"integer","format":"int32","description":"Hotel Room Guest Ctcid"},"GuestDetails":{"allOf":[{"$ref":"#/components/schemas/CustomerPayload"}],"description":"Hotel Room Guest Details"},"GuestRef":{"type":"string","description":"Hotel Room Guest Reference"}}},"CustomerPayload":{"type":"object","properties":{"CustomerNotes":{"type":"array","items":{"$ref":"#/components/schemas/CustomerNote"},"description":"collection Notes linked to this customer"},"CustomerPicture":{"allOf":[{"$ref":"#/components/schemas/CustomerPicture"}],"description":"The picture of the customer"},"ExternalIdentifier":{"allOf":[{"$ref":"#/components/schemas/CustomerExtenalIdentifier"}],"description":"The combination of the external id and External Source should be unique in the database. These values can be used for future Get calls to pull back the contacts data."},"MarketingOptin":{"allOf":[{"$ref":"#/components/schemas/MarketingOptin"}],"description":"Marketing optin preferences"},"PersonalInfo":{"allOf":[{"$ref":"#/components/schemas/CustomerPD"}],"description":"Customer personal details"},"SupInfo":{"type":"array","items":{"$ref":"#/components/schemas/SupInfo"},"description":"Collection of customer supplementary information"}},"required":["ExternalIdentifier"]},"CustomerNote":{"type":"object","properties":{"CreateDate":{"type":"string","format":"date-time","description":"Creation Date :if empty ,we will use the current datetime"},"Note":{"type":"string","description":"copy text of the note"}}},"CustomerPicture":{"type":"object","properties":{"PictureData":{"type":"string","description":"The data of the customer picture"},"PictureExtension":{"type":"string","description":"The extension of the customer picture"},"PictureName":{"type":"string","description":"The name of the customer picture"}}},"CustomerExtenalIdentifier":{"type":"object","properties":{"ExternalID":{"type":"string","description":"External unique ID"},"ExternalSource":{"type":"string","description":"External Source"}}},"MarketingOptin":{"type":"object","properties":{"AppOptin":{"type":"boolean","nullable":true,"description":"True if contact opted into receiving Atreemo app messages . If no clear opt out was made then value should be null"},"ChangeDate":{"type":"string","format":"date-time","nullable":true,"description":"Change date (we use customer ModifiedDate if empty)"},"EmailOptin":{"type":"boolean","nullable":true,"description":"True if contact opted into receiving emails. If no clear opt out was made then value should be null"},"MailOptin":{"type":"boolean","nullable":true,"description":"True if contact opted into receiving post. If no clear opt out was made then value should be null"},"PhoneOptin":{"type":"boolean","nullable":true,"description":"True if contact opted into receiving phone calls. If no clear opt out was made then value should be null"},"PushNotificationOptin":{"type":"boolean","nullable":true,"description":"True if contact opted into receiving app push notifications. If no clear opt out was made then value should be null"},"SmsOptin":{"type":"boolean","nullable":true,"description":"True if contact opted into receiving text messages. If no clear opt out was made then value should be null"},"WebPushNotificationOptin":{"type":"boolean","nullable":true,"description":"True if contact opted into receiving web push notifications. If no clear opt out was made then value should be null"},"WhatsAppOptin":{"type":"boolean","nullable":true,"description":"True if contact opted into receiving app Whatsapp messages . If no clear opt out was made then value should be null"}}},"CustomerPD":{"type":"object","properties":{"BirthDate":{"type":"string","format":"date-time","nullable":true,"description":"Date of birth"},"CustomerAddress":{"allOf":[{"$ref":"#/components/schemas/CustomerAddress"}],"description":"The postal address of the customer"},"DoNotExport":{"type":"boolean","nullable":true},"Email":{"type":"string","description":"Email address"},"FirstName":{"type":"string","description":"First Name"},"Gender":{"description":"Gender : 0 : Unknown, 1 : Male, 2 : Female, 3 : PreferNotToSay, (Documented as type `GenderCollection`. The published description lists the values captured in `x-atreemo-documented-values`; their wire representation (number or name) and whether the list is exhaustive are not documented.)","type":"integer","format":"int32"},"JobTitle":{"type":"string","description":"Job title"},"LastName":{"type":"string","description":"Last Name"},"MobilePhone":{"type":"string","description":"Mobile number (start with 00[international code]). Example : UK 0044 xxx xxx xxxx"},"ParentEmailAddress":{"type":"string","description":"Parent Email Address"},"Phone":{"type":"string","description":"Landline number (start with 00[international code]). Example : UK 0044 xxx xxx xxxx"},"Title":{"type":"string","description":"Person title"}}},"CustomerAddress":{"type":"object","properties":{"Address1":{"type":"string","description":"Address 1"},"Address2":{"type":"string","description":"Address 2"},"Address3":{"type":"string","description":"Address 3"},"City":{"type":"string","description":"City"},"CountryCode":{"type":"string","description":"this should contain the ISO country code with two characters (UK,TN,...)"},"PostCode":{"type":"string","description":"Postcode"},"StateName":{"type":"string","description":"County"}}},"SupInfo":{"type":"object","nullable":true,"properties":{"FieldContent":{"type":"string","nullable":true,"description":"Field value"},"FieldName":{"type":"string","nullable":true,"description":"Field name"}}},"RoomRevenue":{"type":"object","properties":{"AnalysisCode":{"type":"string","description":"Room Revenue Analysis Code"},"GrossAmount":{"type":"number","format":"double","nullable":true,"description":"Room Revenue Gross Amount"},"RevenueType":{"type":"string","description":"Room Revenue Type"},"TaxAmount":{"type":"number","format":"double","nullable":true,"description":"Room Revenue Tax Amount"},"TotalAmount":{"type":"number","format":"double","nullable":true,"description":"Room Revenue Total Amount"}}},"RoomSpecialRequest":{"type":"object","nullable":true,"properties":{"RequestCode":{"type":"string","nullable":true}},"description":"Source-backed JSON members, including inheritance and JSON naming/ignore attributes. No property is required solely because its CLR value type is non-nullable. Runtime and deployment alignment are unverified."},"RoomCancelPenalty":{"type":"object","nullable":true,"properties":{"Code":{"type":"string","nullable":true},"Deadline":{"type":"string","format":"date-time","nullable":true},"AmountPercent":{"type":"number","format":"double","nullable":true}},"description":"Source-backed JSON members, including inheritance and JSON naming/ignore attributes. No property is required solely because its CLR value type is non-nullable. Runtime and deployment alignment are unverified."},"HotelBookingOutput":{"type":"object","properties":{"Errors":{"type":"array","items":{"$ref":"#/components/schemas/APICallError"},"description":"Collection of errors if exist"},"ResponseStatus":{"type":"boolean","description":"True: if the action was succsessfully treated False: if there is an error"}}},"APICallError":{"type":"object","properties":{"ErrorCode":{"type":"integer","format":"int32","description":"The error code"},"ErrorDescription":{"type":"string","description":"The error description"}}}},"responses":{"401":{"description":"Unauthorized (no valid access token provided). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"403":{"description":"Forbidden (indicates you do not have access to this method). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"404":{"description":"Not Found (indicates invalid parameters or missing API endpoint). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"500":{"description":"Internal Server Error (indicates something went wrong on our end). Wording from the Atreemo folder documentation; the response body for this status is not documented."}}},"paths":{"/api/HotelBooking/Patch":{"patch":{"operationId":"HotelBookingPatch","summary":"Patch","tags":["HotelBooking"],"description":"Patch hotel booking","parameters":[{"name":"HotelBookingRef","in":"query","schema":{"type":"string","nullable":true},"description":"Native query parameter. CLR string HotelBookingRef in the pinned controller signature.","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HotelBookingPatch"}}}},"responses":{"200":{"description":"OK (sample status in the public collection).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HotelBookingOutput"}}}},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Post

> Post hotel booking

```json
{"openapi":"3.0.3","info":{"title":"Atreemo API","version":"0.1.0"},"tags":[{"name":"HotelBooking","description":"API methods to manage hotel bookings (Find/Add) Standard API Responses 200 Success 401 Unauthorized (no valid access token provided) 403 Forbidden Forbidden (indicates you do not have access to this method) 404 Not Found (indicates invalid parameters or missing API endpoint) 500 Internal Server Error (indicates something went wrong on our end) for 200-level responses there is a field named ResponseStatus which will give you the status of the call : true Success false there is an error (you will find the error code and the description in the object Errors ) Possible Errors 1 Missing mandatory fields 2 Internal Error 45 No Supplier found for the user 46 HotelBookingRef already exists 47 Invalid booking status 48 Missing mandatory fields for rooms parameter 49 Rooms contains invalid RoomStatus parameter 50 No Booking Found With Such Details"}],"servers":[{"url":"https://apim-hospitality-dev-uksouth.azure-api.net/atreemo-api","description":"Local DEV APIM import draft only; not a deployed endpoint announcement."}],"security":[{"AtreemoBearer":[]}],"components":{"securitySchemes":{"AtreemoBearer":{"type":"http","scheme":"bearer","description":"Atreemo access token obtained by the caller from the Atreemo instance `POST /token` endpoint (OAuth2 password grant) and sent as `Authorization: Bearer <token>`. See the Authorisation guide."}},"schemas":{"PostHotelBookingPayLoad":{"type":"object","properties":{"BookerCtcID":{"type":"integer","format":"int32","description":"Hotel Booker Ctcid"},"BookerDetails":{"allOf":[{"$ref":"#/components/schemas/CustomerPayload"}],"description":"Hotel Booker Details"},"BookerRef":{"type":"string","description":"Hotel Booker Reference"},"BookingNightsNumber":{"type":"integer","format":"int32","description":"Booking Nights Number"},"ChannelID":{"type":"string","description":"Hotel Booking Channel ID"},"CheckInDate":{"type":"string","format":"date-time","description":"Hotel Booking CheckIn Date"},"CheckOutDate":{"type":"string","format":"date-time","description":"Hotel Booking CheckOut Date"},"CreationDate":{"type":"string","format":"date-time","description":"Hotel Booking Date"},"CustomFields":{"type":"array","items":{"$ref":"#/components/schemas/HotelBookingCustomFields"},"description":"Collection of extra booking informations"},"EstimatedSpend":{"type":"number","format":"double","nullable":true,"description":"Hotel Booking Estimated Spend"},"ExternalBookingReference":{"type":"string","description":"External Booking Reference"},"HotelBookingRef":{"type":"string","description":"Internal PMS Hotel Booking Reference"},"IsOTA":{"type":"boolean","description":"Hotel Booking Is OTA"},"LastUpdatedDate":{"type":"string","format":"date-time","nullable":true,"description":"Hotel Booking Last Updated Date"},"LinkedBookings":{"type":"array","items":{"$ref":"#/components/schemas/LinkedBooking"},"description":"Other Bookings"},"Location":{"allOf":[{"$ref":"#/components/schemas/ApiLocation"}],"description":"Hotel Booking Location"},"MarketSegment":{"type":"string","description":"Hotel Booking Market Segment"},"ModifyURL":{"type":"string","description":"Hotel Booking Modify URL"},"Notes":{"type":"array","items":{"type":"string"},"description":"Booking Notes"},"OrderUniqueID":{"type":"integer","format":"int64","nullable":true,"description":"Hotel Booking Transaction ID"},"Reason":{"type":"string","description":"Hotel Booking Reason"},"Rooms":{"type":"array","items":{"$ref":"#/components/schemas/HotelBookingRoom"},"description":"List of Rooms"},"Spend":{"type":"number","format":"double","nullable":true,"description":"Hotel Booking Spend"},"Status":{"description":"Booked = 1, Completed = 2, Cancelled = 3, NoShow = 4, Enquiry = 5 (Documented as type `BookingStatus`. The published description lists the values captured in `x-atreemo-documented-values`; their wire representation (number or name) and whether the list is exhaustive are not documented.)","type":"integer","format":"int32"}},"required":["CheckInDate","CheckOutDate","CreationDate","HotelBookingRef","Status"]},"CustomerPayload":{"type":"object","properties":{"CustomerNotes":{"type":"array","items":{"$ref":"#/components/schemas/CustomerNote"},"description":"collection Notes linked to this customer"},"CustomerPicture":{"allOf":[{"$ref":"#/components/schemas/CustomerPicture"}],"description":"The picture of the customer"},"ExternalIdentifier":{"allOf":[{"$ref":"#/components/schemas/CustomerExtenalIdentifier"}],"description":"The combination of the external id and External Source should be unique in the database. These values can be used for future Get calls to pull back the contacts data."},"MarketingOptin":{"allOf":[{"$ref":"#/components/schemas/MarketingOptin"}],"description":"Marketing optin preferences"},"PersonalInfo":{"allOf":[{"$ref":"#/components/schemas/CustomerPD"}],"description":"Customer personal details"},"SupInfo":{"type":"array","items":{"$ref":"#/components/schemas/SupInfo"},"description":"Collection of customer supplementary information"}},"required":["ExternalIdentifier"]},"CustomerNote":{"type":"object","properties":{"CreateDate":{"type":"string","format":"date-time","description":"Creation Date :if empty ,we will use the current datetime"},"Note":{"type":"string","description":"copy text of the note"}}},"CustomerPicture":{"type":"object","properties":{"PictureData":{"type":"string","description":"The data of the customer picture"},"PictureExtension":{"type":"string","description":"The extension of the customer picture"},"PictureName":{"type":"string","description":"The name of the customer picture"}}},"CustomerExtenalIdentifier":{"type":"object","properties":{"ExternalID":{"type":"string","description":"External unique ID"},"ExternalSource":{"type":"string","description":"External Source"}}},"MarketingOptin":{"type":"object","properties":{"AppOptin":{"type":"boolean","nullable":true,"description":"True if contact opted into receiving Atreemo app messages . If no clear opt out was made then value should be null"},"ChangeDate":{"type":"string","format":"date-time","nullable":true,"description":"Change date (we use customer ModifiedDate if empty)"},"EmailOptin":{"type":"boolean","nullable":true,"description":"True if contact opted into receiving emails. If no clear opt out was made then value should be null"},"MailOptin":{"type":"boolean","nullable":true,"description":"True if contact opted into receiving post. If no clear opt out was made then value should be null"},"PhoneOptin":{"type":"boolean","nullable":true,"description":"True if contact opted into receiving phone calls. If no clear opt out was made then value should be null"},"PushNotificationOptin":{"type":"boolean","nullable":true,"description":"True if contact opted into receiving app push notifications. If no clear opt out was made then value should be null"},"SmsOptin":{"type":"boolean","nullable":true,"description":"True if contact opted into receiving text messages. If no clear opt out was made then value should be null"},"WebPushNotificationOptin":{"type":"boolean","nullable":true,"description":"True if contact opted into receiving web push notifications. If no clear opt out was made then value should be null"},"WhatsAppOptin":{"type":"boolean","nullable":true,"description":"True if contact opted into receiving app Whatsapp messages . If no clear opt out was made then value should be null"}}},"CustomerPD":{"type":"object","properties":{"BirthDate":{"type":"string","format":"date-time","nullable":true,"description":"Date of birth"},"CustomerAddress":{"allOf":[{"$ref":"#/components/schemas/CustomerAddress"}],"description":"The postal address of the customer"},"DoNotExport":{"type":"boolean","nullable":true},"Email":{"type":"string","description":"Email address"},"FirstName":{"type":"string","description":"First Name"},"Gender":{"description":"Gender : 0 : Unknown, 1 : Male, 2 : Female, 3 : PreferNotToSay, (Documented as type `GenderCollection`. The published description lists the values captured in `x-atreemo-documented-values`; their wire representation (number or name) and whether the list is exhaustive are not documented.)","type":"integer","format":"int32"},"JobTitle":{"type":"string","description":"Job title"},"LastName":{"type":"string","description":"Last Name"},"MobilePhone":{"type":"string","description":"Mobile number (start with 00[international code]). Example : UK 0044 xxx xxx xxxx"},"ParentEmailAddress":{"type":"string","description":"Parent Email Address"},"Phone":{"type":"string","description":"Landline number (start with 00[international code]). Example : UK 0044 xxx xxx xxxx"},"Title":{"type":"string","description":"Person title"}}},"CustomerAddress":{"type":"object","properties":{"Address1":{"type":"string","description":"Address 1"},"Address2":{"type":"string","description":"Address 2"},"Address3":{"type":"string","description":"Address 3"},"City":{"type":"string","description":"City"},"CountryCode":{"type":"string","description":"this should contain the ISO country code with two characters (UK,TN,...)"},"PostCode":{"type":"string","description":"Postcode"},"StateName":{"type":"string","description":"County"}}},"SupInfo":{"type":"object","nullable":true,"properties":{"FieldContent":{"type":"string","nullable":true,"description":"Field value"},"FieldName":{"type":"string","nullable":true,"description":"Field name"}}},"HotelBookingCustomFields":{"type":"object","properties":{"FieldName":{"type":"string","description":"Field name"},"FieldValue":{"type":"string","description":"Field value"}}},"LinkedBooking":{"type":"object","properties":{"LinkedBookingRef":{"type":"string","description":"Linked Booking Reference"},"SupplierCode":{"type":"integer","format":"int32","nullable":true,"description":"Linked Booking Supplier"}},"required":["LinkedBookingRef"]},"ApiLocation":{"type":"object","properties":{"ActeolSiteID":{"type":"integer","format":"int32","description":"the ID of the site visited (Acteol id)"},"ExternalLocationID":{"type":"string","description":"the ID of the site visited (supplier site id if the user in mapped with a supplier) this field will be ignored if ActeolSiteID is populated"}}},"HotelBookingRoom":{"type":"object","properties":{"Guests":{"type":"array","items":{"$ref":"#/components/schemas/Guest"},"description":"Room Guests"},"Revenues":{"type":"array","items":{"$ref":"#/components/schemas/RoomRevenue"},"description":"Room Revenues"},"RoomAdultsNumber":{"type":"integer","format":"int32","description":"Room Adults Number"},"RoomCapacity":{"type":"string","description":"Hotel Booking Room Capacity"},"RoomCheckInDate":{"type":"string","format":"date-time","description":"Room CheckIn Date"},"RoomCheckOutDate":{"type":"string","format":"date-time","description":"Room CheckOut Date"},"RoomChildrenNumber":{"type":"integer","format":"int32","description":"Room Children Number"},"RoomDiningNumber":{"type":"integer","format":"int32","description":"Room Dining Number"},"RoomEstimatedSpend":{"type":"number","format":"double","nullable":true,"description":"Room Estimated Spend"},"RoomInfantsNumber":{"type":"integer","format":"int32","description":"Room Infants Number"},"RoomNightsNumber":{"type":"integer","format":"int32","description":"Room Nights Number"},"RoomPetsNumber":{"type":"integer","format":"int32","description":"Room Pets Number"},"RoomRatePlan":{"type":"string","description":"Room Rate Plan"},"RoomRef":{"type":"string","description":"Hotel Booking Room Reference"},"RoomStatus":{"description":"Hotel Booking Room Status Booked = 1, Completed = 2, Cancelled = 3, NoShow = 4, Enquiry = 5 (Documented as type `BookingStatus`. The published description lists the values captured in `x-atreemo-documented-values`; their wire representation (number or name) and whether the list is exhaustive are not documented.)","type":"integer","format":"int32"},"RoomType":{"type":"string","description":"Hotel Booking Room Type"},"RoomVoucherCode":{"type":"string","description":"Room Voucher Code"}},"required":["RoomRef"]},"Guest":{"type":"object","properties":{"GuestCtcID":{"type":"integer","format":"int32","description":"Hotel Room Guest Ctcid"},"GuestDetails":{"allOf":[{"$ref":"#/components/schemas/CustomerPayload"}],"description":"Hotel Room Guest Details"},"GuestRef":{"type":"string","description":"Hotel Room Guest Reference"}}},"RoomRevenue":{"type":"object","properties":{"AnalysisCode":{"type":"string","description":"Room Revenue Analysis Code"},"GrossAmount":{"type":"number","format":"double","nullable":true,"description":"Room Revenue Gross Amount"},"RevenueType":{"type":"string","description":"Room Revenue Type"},"TaxAmount":{"type":"number","format":"double","nullable":true,"description":"Room Revenue Tax Amount"},"TotalAmount":{"type":"number","format":"double","nullable":true,"description":"Room Revenue Total Amount"}}},"HotelBookingOutput":{"type":"object","properties":{"Errors":{"type":"array","items":{"$ref":"#/components/schemas/APICallError"},"description":"Collection of errors if exist"},"ResponseStatus":{"type":"boolean","description":"True: if the action was succsessfully treated False: if there is an error"}}},"APICallError":{"type":"object","properties":{"ErrorCode":{"type":"integer","format":"int32","description":"The error code"},"ErrorDescription":{"type":"string","description":"The error description"}}}},"responses":{"401":{"description":"Unauthorized (no valid access token provided). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"403":{"description":"Forbidden (indicates you do not have access to this method). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"404":{"description":"Not Found (indicates invalid parameters or missing API endpoint). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"500":{"description":"Internal Server Error (indicates something went wrong on our end). Wording from the Atreemo folder documentation; the response body for this status is not documented."}}},"paths":{"/api/HotelBooking/Post":{"post":{"operationId":"HotelBookingPost","summary":"Post","tags":["HotelBooking"],"description":"Post hotel booking","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostHotelBookingPayLoad"}}}},"responses":{"200":{"description":"OK (sample status in the public collection).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HotelBookingOutput"}}}},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Put

> Put hotel booking

```json
{"openapi":"3.0.3","info":{"title":"Atreemo API","version":"0.1.0"},"tags":[{"name":"HotelBooking","description":"API methods to manage hotel bookings (Find/Add) Standard API Responses 200 Success 401 Unauthorized (no valid access token provided) 403 Forbidden Forbidden (indicates you do not have access to this method) 404 Not Found (indicates invalid parameters or missing API endpoint) 500 Internal Server Error (indicates something went wrong on our end) for 200-level responses there is a field named ResponseStatus which will give you the status of the call : true Success false there is an error (you will find the error code and the description in the object Errors ) Possible Errors 1 Missing mandatory fields 2 Internal Error 45 No Supplier found for the user 46 HotelBookingRef already exists 47 Invalid booking status 48 Missing mandatory fields for rooms parameter 49 Rooms contains invalid RoomStatus parameter 50 No Booking Found With Such Details"}],"servers":[{"url":"https://apim-hospitality-dev-uksouth.azure-api.net/atreemo-api","description":"Local DEV APIM import draft only; not a deployed endpoint announcement."}],"security":[{"AtreemoBearer":[]}],"components":{"securitySchemes":{"AtreemoBearer":{"type":"http","scheme":"bearer","description":"Atreemo access token obtained by the caller from the Atreemo instance `POST /token` endpoint (OAuth2 password grant) and sent as `Authorization: Bearer <token>`. See the Authorisation guide."}},"schemas":{"HotelBooking":{"type":"object","properties":{"BookingNightsNumber":{"type":"integer","format":"int32","description":"Booking Nights Number"},"ChannelID":{"type":"string","description":"Hotel Booking Channel ID"},"CheckInDate":{"type":"string","format":"date-time","description":"Hotel Booking CheckIn Date"},"CheckOutDate":{"type":"string","format":"date-time","description":"Hotel Booking CheckOut Date"},"CreationDate":{"type":"string","format":"date-time","description":"Hotel Booking Date"},"CustomFields":{"type":"array","items":{"$ref":"#/components/schemas/HotelBookingCustomFields"},"description":"Collection of extra booking informations"},"EstimatedSpend":{"type":"number","format":"double","nullable":true,"description":"Hotel Booking Estimated Spend"},"ExternalBookingReference":{"type":"string","description":"External Booking Reference"},"HotelBookingRef":{"type":"string","description":"Internal PMS Hotel Booking Reference"},"IsOTA":{"type":"boolean","description":"Hotel Booking Is OTA"},"LastUpdatedDate":{"type":"string","format":"date-time","nullable":true,"description":"Hotel Booking Last Updated Date"},"LinkedBookings":{"type":"array","items":{"$ref":"#/components/schemas/LinkedBooking"},"description":"Other Bookings"},"Location":{"allOf":[{"$ref":"#/components/schemas/ApiLocation"}],"description":"Hotel Booking Location"},"MarketSegment":{"type":"string","description":"Hotel Booking Market Segment"},"ModifyURL":{"type":"string","description":"Hotel Booking Modify URL"},"Notes":{"type":"array","items":{"type":"string"},"description":"Booking Notes"},"OrderUniqueID":{"type":"integer","format":"int64","nullable":true,"description":"Hotel Booking Transaction ID"},"Reason":{"type":"string","description":"Hotel Booking Reason"},"Rooms":{"type":"array","items":{"$ref":"#/components/schemas/HotelBookingRoom"},"description":"List of Rooms"},"Spend":{"type":"number","format":"double","nullable":true,"description":"Hotel Booking Spend"},"Status":{"description":"Booked = 1, Completed = 2, Cancelled = 3, NoShow = 4, Enquiry = 5 (Documented as type `BookingStatus`. The published description lists the values captured in `x-atreemo-documented-values`; their wire representation (number or name) and whether the list is exhaustive are not documented.)","type":"integer","format":"int32"}},"required":["CheckInDate","CheckOutDate","CreationDate","HotelBookingRef","Status"]},"HotelBookingCustomFields":{"type":"object","properties":{"FieldName":{"type":"string","description":"Field name"},"FieldValue":{"type":"string","description":"Field value"}}},"LinkedBooking":{"type":"object","properties":{"LinkedBookingRef":{"type":"string","description":"Linked Booking Reference"},"SupplierCode":{"type":"integer","format":"int32","nullable":true,"description":"Linked Booking Supplier"}},"required":["LinkedBookingRef"]},"ApiLocation":{"type":"object","properties":{"ActeolSiteID":{"type":"integer","format":"int32","description":"the ID of the site visited (Acteol id)"},"ExternalLocationID":{"type":"string","description":"the ID of the site visited (supplier site id if the user in mapped with a supplier) this field will be ignored if ActeolSiteID is populated"}}},"HotelBookingRoom":{"type":"object","properties":{"Guests":{"type":"array","items":{"$ref":"#/components/schemas/Guest"},"description":"Room Guests"},"Revenues":{"type":"array","items":{"$ref":"#/components/schemas/RoomRevenue"},"description":"Room Revenues"},"RoomAdultsNumber":{"type":"integer","format":"int32","description":"Room Adults Number"},"RoomCapacity":{"type":"string","description":"Hotel Booking Room Capacity"},"RoomCheckInDate":{"type":"string","format":"date-time","description":"Room CheckIn Date"},"RoomCheckOutDate":{"type":"string","format":"date-time","description":"Room CheckOut Date"},"RoomChildrenNumber":{"type":"integer","format":"int32","description":"Room Children Number"},"RoomDiningNumber":{"type":"integer","format":"int32","description":"Room Dining Number"},"RoomEstimatedSpend":{"type":"number","format":"double","nullable":true,"description":"Room Estimated Spend"},"RoomInfantsNumber":{"type":"integer","format":"int32","description":"Room Infants Number"},"RoomNightsNumber":{"type":"integer","format":"int32","description":"Room Nights Number"},"RoomPetsNumber":{"type":"integer","format":"int32","description":"Room Pets Number"},"RoomRatePlan":{"type":"string","description":"Room Rate Plan"},"RoomRef":{"type":"string","description":"Hotel Booking Room Reference"},"RoomStatus":{"description":"Hotel Booking Room Status Booked = 1, Completed = 2, Cancelled = 3, NoShow = 4, Enquiry = 5 (Documented as type `BookingStatus`. The published description lists the values captured in `x-atreemo-documented-values`; their wire representation (number or name) and whether the list is exhaustive are not documented.)","type":"integer","format":"int32"},"RoomType":{"type":"string","description":"Hotel Booking Room Type"},"RoomVoucherCode":{"type":"string","description":"Room Voucher Code"}},"required":["RoomRef"]},"Guest":{"type":"object","properties":{"GuestCtcID":{"type":"integer","format":"int32","description":"Hotel Room Guest Ctcid"},"GuestDetails":{"allOf":[{"$ref":"#/components/schemas/CustomerPayload"}],"description":"Hotel Room Guest Details"},"GuestRef":{"type":"string","description":"Hotel Room Guest Reference"}}},"CustomerPayload":{"type":"object","properties":{"CustomerNotes":{"type":"array","items":{"$ref":"#/components/schemas/CustomerNote"},"description":"collection Notes linked to this customer"},"CustomerPicture":{"allOf":[{"$ref":"#/components/schemas/CustomerPicture"}],"description":"The picture of the customer"},"ExternalIdentifier":{"allOf":[{"$ref":"#/components/schemas/CustomerExtenalIdentifier"}],"description":"The combination of the external id and External Source should be unique in the database. These values can be used for future Get calls to pull back the contacts data."},"MarketingOptin":{"allOf":[{"$ref":"#/components/schemas/MarketingOptin"}],"description":"Marketing optin preferences"},"PersonalInfo":{"allOf":[{"$ref":"#/components/schemas/CustomerPD"}],"description":"Customer personal details"},"SupInfo":{"type":"array","items":{"$ref":"#/components/schemas/SupInfo"},"description":"Collection of customer supplementary information"}},"required":["ExternalIdentifier"]},"CustomerNote":{"type":"object","properties":{"CreateDate":{"type":"string","format":"date-time","description":"Creation Date :if empty ,we will use the current datetime"},"Note":{"type":"string","description":"copy text of the note"}}},"CustomerPicture":{"type":"object","properties":{"PictureData":{"type":"string","description":"The data of the customer picture"},"PictureExtension":{"type":"string","description":"The extension of the customer picture"},"PictureName":{"type":"string","description":"The name of the customer picture"}}},"CustomerExtenalIdentifier":{"type":"object","properties":{"ExternalID":{"type":"string","description":"External unique ID"},"ExternalSource":{"type":"string","description":"External Source"}}},"MarketingOptin":{"type":"object","properties":{"AppOptin":{"type":"boolean","nullable":true,"description":"True if contact opted into receiving Atreemo app messages . If no clear opt out was made then value should be null"},"ChangeDate":{"type":"string","format":"date-time","nullable":true,"description":"Change date (we use customer ModifiedDate if empty)"},"EmailOptin":{"type":"boolean","nullable":true,"description":"True if contact opted into receiving emails. If no clear opt out was made then value should be null"},"MailOptin":{"type":"boolean","nullable":true,"description":"True if contact opted into receiving post. If no clear opt out was made then value should be null"},"PhoneOptin":{"type":"boolean","nullable":true,"description":"True if contact opted into receiving phone calls. If no clear opt out was made then value should be null"},"PushNotificationOptin":{"type":"boolean","nullable":true,"description":"True if contact opted into receiving app push notifications. If no clear opt out was made then value should be null"},"SmsOptin":{"type":"boolean","nullable":true,"description":"True if contact opted into receiving text messages. If no clear opt out was made then value should be null"},"WebPushNotificationOptin":{"type":"boolean","nullable":true,"description":"True if contact opted into receiving web push notifications. If no clear opt out was made then value should be null"},"WhatsAppOptin":{"type":"boolean","nullable":true,"description":"True if contact opted into receiving app Whatsapp messages . If no clear opt out was made then value should be null"}}},"CustomerPD":{"type":"object","properties":{"BirthDate":{"type":"string","format":"date-time","nullable":true,"description":"Date of birth"},"CustomerAddress":{"allOf":[{"$ref":"#/components/schemas/CustomerAddress"}],"description":"The postal address of the customer"},"DoNotExport":{"type":"boolean","nullable":true},"Email":{"type":"string","description":"Email address"},"FirstName":{"type":"string","description":"First Name"},"Gender":{"description":"Gender : 0 : Unknown, 1 : Male, 2 : Female, 3 : PreferNotToSay, (Documented as type `GenderCollection`. The published description lists the values captured in `x-atreemo-documented-values`; their wire representation (number or name) and whether the list is exhaustive are not documented.)","type":"integer","format":"int32"},"JobTitle":{"type":"string","description":"Job title"},"LastName":{"type":"string","description":"Last Name"},"MobilePhone":{"type":"string","description":"Mobile number (start with 00[international code]). Example : UK 0044 xxx xxx xxxx"},"ParentEmailAddress":{"type":"string","description":"Parent Email Address"},"Phone":{"type":"string","description":"Landline number (start with 00[international code]). Example : UK 0044 xxx xxx xxxx"},"Title":{"type":"string","description":"Person title"}}},"CustomerAddress":{"type":"object","properties":{"Address1":{"type":"string","description":"Address 1"},"Address2":{"type":"string","description":"Address 2"},"Address3":{"type":"string","description":"Address 3"},"City":{"type":"string","description":"City"},"CountryCode":{"type":"string","description":"this should contain the ISO country code with two characters (UK,TN,...)"},"PostCode":{"type":"string","description":"Postcode"},"StateName":{"type":"string","description":"County"}}},"SupInfo":{"type":"object","nullable":true,"properties":{"FieldContent":{"type":"string","nullable":true,"description":"Field value"},"FieldName":{"type":"string","nullable":true,"description":"Field name"}}},"RoomRevenue":{"type":"object","properties":{"AnalysisCode":{"type":"string","description":"Room Revenue Analysis Code"},"GrossAmount":{"type":"number","format":"double","nullable":true,"description":"Room Revenue Gross Amount"},"RevenueType":{"type":"string","description":"Room Revenue Type"},"TaxAmount":{"type":"number","format":"double","nullable":true,"description":"Room Revenue Tax Amount"},"TotalAmount":{"type":"number","format":"double","nullable":true,"description":"Room Revenue Total Amount"}}},"HotelBookingOutput":{"type":"object","properties":{"Errors":{"type":"array","items":{"$ref":"#/components/schemas/APICallError"},"description":"Collection of errors if exist"},"ResponseStatus":{"type":"boolean","description":"True: if the action was succsessfully treated False: if there is an error"}}},"APICallError":{"type":"object","properties":{"ErrorCode":{"type":"integer","format":"int32","description":"The error code"},"ErrorDescription":{"type":"string","description":"The error description"}}}},"responses":{"401":{"description":"Unauthorized (no valid access token provided). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"403":{"description":"Forbidden (indicates you do not have access to this method). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"404":{"description":"Not Found (indicates invalid parameters or missing API endpoint). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"500":{"description":"Internal Server Error (indicates something went wrong on our end). Wording from the Atreemo folder documentation; the response body for this status is not documented."}}},"paths":{"/api/HotelBooking/Put":{"put":{"operationId":"HotelBookingPut","summary":"Put","tags":["HotelBooking"],"description":"Put hotel booking","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HotelBooking"}}}},"responses":{"200":{"description":"OK (sample status in the public collection).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HotelBookingOutput"}}}},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.hos.accessacloud.com/atreemo-api/api-reference/atreemo-api-reference/hotel-booking.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
