# Xenia Connect API Situ's API for seamless integration with Situ's workflow. Version: 1.0.1 ## Servers Production ``` https://api-xenia.staysitu.com ``` Sandbox ``` https://api-xenia-cisandbox.staysitu.com ``` ## Security ### apiKey Type: apiKey In: header Name: X-Api-Key ## Download OpenAPI description [Xenia Connect API](https://docs.xenia.staysitu.com/_bundle/xenia-connect/spec.yaml) ## Bookings Bookings are the next step in the booking journey after an enquiry has been created. Bookings are created when a quote is accepted by the client. ### Booking Pending - [POST booking-pending-event](https://docs.xenia.staysitu.com/xenia-connect/spec/bookings/webhookbookingpendingevent.md): This event payload is sent to the eligible registered webhooks when a booking is pending confirmation. ### Booking Confirmation Details sent to Partner - [POST booking-partner-confirmation-details-sent-event](https://docs.xenia.staysitu.com/xenia-connect/spec/bookings/webhookbookingconfirmationdetailssenttopartnerevent.md): This event payload is sent to the eligible registered webhooks when the booking confirmation details email is sent to the partner. ### Booking Confirmation Details sent to Client - [POST booking-client-confirmation-details-sent-event](https://docs.xenia.staysitu.com/xenia-connect/spec/bookings/webhookbookingconfirmationdetailssenttoclientevent.md): This event payload is sent to the eligible registered webhooks when the booking confirmation details email is sent to the client. ### Booking Check-In Details Sent - [POST booking-check-in-details-sent-event](https://docs.xenia.staysitu.com/xenia-connect/spec/bookings/webhookbookingcheckindetailssentevent.md): This event payload is sent to the eligible registered webhooks when check-in details are sent for a booking. ### Booking Cancelled - [POST booking-cancelled-event](https://docs.xenia.staysitu.com/xenia-connect/spec/bookings/webhookbookingcancelledevent.md): This event payload is sent to the eligible registered webhooks when a booking is cancelled. ## Enquiries Enquiries are the start point in the booking journey. Providing as much information as possible upfront about an enquiry will increase its conversion rate and reduce touchpoints. We are constantly looking for what we can add to our set of information to make our process easier for everybody. If you have any suggestions get in contact! ### Create a new enquiry - [POST /external-api/v1/enquiries](https://docs.xenia.staysitu.com/xenia-connect/spec/enquiries/createenquiry.md): Create a new enquiry for Situ to begin the quoting process on. ### Get an enquiry - [GET /external-api/v1/enquiries/{id}](https://docs.xenia.staysitu.com/xenia-connect/spec/enquiries/getenquiry.md) ### Enquiry Created - [POST enquiry-created-event](https://docs.xenia.staysitu.com/xenia-connect/spec/enquiries/webhookenquirycreatedevent.md): This event payload is sent to the eligible registered webhooks when a new enquiry is created. ### Enquiry Shortlisting - [POST enquiry-shortlisting-event](https://docs.xenia.staysitu.com/xenia-connect/spec/enquiries/webhookenquiryshortlistingevent.md): This event payload is sent to the eligible registered webhooks when a specialist starts shortlisting properties for an enquiry. ### Enquiry Specialist Assigned - [POST enquiry-specialist-assigned-event](https://docs.xenia.staysitu.com/xenia-connect/spec/enquiries/webhookenquiryspecialistassignedevent.md): This event payload is sent to the eligible registered webhooks when a specialist is assigned to an enquiry. ### Enquiry Quoted - [POST enquiry-quoted-event](https://docs.xenia.staysitu.com/xenia-connect/spec/enquiries/webhookenquiryquotedevent.md): This event payload is sent to the eligible registered webhooks when a quote is sent for an enquiry. ### Enquiry Closed - [POST enquiry-closed-event](https://docs.xenia.staysitu.com/xenia-connect/spec/enquiries/webhookenquiryclosedevent.md): This event payload is sent to the eligible registered webhooks when an enquiry is closed. ### Enquiry Reopened - [POST enquiry-reopened-event](https://docs.xenia.staysitu.com/xenia-connect/spec/enquiries/webhookenquiryreopenedevent.md): This event payload is sent to the eligible registered webhooks when a closed enquiry is reopened. ## Quotes Quotes are the 2nd stage of the booking journey. Quotes are created when a specialist has found properties that match the enquiry requirements and send shortlisted properties to the client. ### Get a paginated list of quotes - [GET /external-api/v1/quotes](https://docs.xenia.staysitu.com/xenia-connect/spec/quotes/getquotes.md): Get a paginated list of quotes, optionally filtered by Situ enquiry id or the external id provided when calling the create enquiry endpoint. ### Quote Created - [POST quote-created-event](https://docs.xenia.staysitu.com/xenia-connect/spec/quotes/webhookquotecreatedevent.md): This event payload is sent to the eligible registered webhooks when a new quote is created. ### Quote Invalidated - [POST quote-invalidated-event](https://docs.xenia.staysitu.com/xenia-connect/spec/quotes/webhookquoteinvalidatedevent.md): This event payload is sent to the eligible registered webhooks when a quote is invalidated. ## Sandbox Operations Operations that only exist within the sandbox environment. These are not available in production. You can use these operations to trigger state changes in the sandbox environment to test your webhooks and other operations. ### Change Enquiry State - [POST /external-api/v1/sandbox/enquiries/{id}/change-state](https://docs.xenia.staysitu.com/xenia-connect/spec/sandbox/changeenquirystate.md): Change the state of an enquiry in the sandbox environment, triggering its relevant event as well. You cannot go back to a previous state. If you specify QUOTED then it will trigger all eligible states before it, so in this example it would be SHORTLISTING and then finally QUOTED. Some states will be exceptions such as CLOSED which can happen in any of the previous states. This is not available in production. ### Trigger Enquiry Webhook Event - [POST /external-api/v1/sandbox/enquiries/{id}/trigger-webhook-event](https://docs.xenia.staysitu.com/xenia-connect/spec/sandbox/triggerenquirywebhookevent.md): Trigger a webhook event for an enquiry in the sandbox environment. This is not available in production. ## Webhook Operations Manage your webhooks with this set of operations. The maximum limit for webhooks per environment is 5. If you need more than this please contact us. ### Get all webhooks - [GET /external-api/v1/webhooks](https://docs.xenia.staysitu.com/xenia-connect/spec/webhooks/listwebhooks.md): Get all webhooks for the current environment. ### Create a new webhook - [POST /external-api/v1/webhooks](https://docs.xenia.staysitu.com/xenia-connect/spec/webhooks/createwebhook.md): Create a new webhook for Xenia to send events to. ### Delete a webhook - [DELETE /external-api/v1/webhooks/{id}](https://docs.xenia.staysitu.com/xenia-connect/spec/webhooks/deletewebhook.md): Delete a webhook by ID. ### Get a webhook - [GET /external-api/v1/webhooks/{id}](https://docs.xenia.staysitu.com/xenia-connect/spec/webhooks/getwebhook.md): Get a webhook by ID. ### Update a webhook - [PUT /external-api/v1/webhooks/{id}](https://docs.xenia.staysitu.com/xenia-connect/spec/webhooks/updatewebhook.md): Update an existing webhook. ### Get webhook signature verification public key - [GET /external-api/v1/webhook-verification-key](https://docs.xenia.staysitu.com/xenia-connect/spec/webhooks/getwebhookpublickey.md): Get the public key used to verify webhook signatures. Use this key to verify that webhook payloads are authentically from Situ by validating the X-Signature header against the webhook body using HMAC-SHA256.