Skip to main content

Getting Started with Autohost Integration

This guide outlines the essential steps for successfully integrating your system with Autohost, providing a clear roadmap for our partners. The API Reference documentation is available here. However, we highly recommend starting with this guide to build a foundational understanding of the integration process.

Before You Begin

Before initiating the integration process with Autohost, it's essential to create an account. Your account allows you to generate an API key and offers flexibility in customizing your account settings and user experience. This foundational step is crucial for accessing Autohost's full suite of features and tailoring them to your specific requirements.

If you don't have an account yet, click here to contact our Sales team and open an account. If you already have an account set up, this guide will help you seamlessly integrate with Autohost.

Getting Familiar with the Autohost API

How to Create an API Key

Autohost provides a self-service approach to create and manage API keys through our Dashboard. Follow these steps:

  1. Log in to Autohost Dashboard.
  2. Navigate to Settings > API.
  3. Select Create API Key.
  4. (Optional) Rename the key to an appropriate name for your control and organization.
  5. Copy the key and securely store it.

You can also explore and test the Autohost Public Postman collection here.

Authentication

All API requests require authentication using the API key generated in the previous step. Send this key in the x-api-key request header. To test your API key, call the account endpoint:

curl -X GET 'https://data.autohost.ai/v1/accounts/me' -H 'x-api-key: YOUR_API_KEY'

More details about the account endpoint can be found here.

Rate Limiting

Our API has a rate limit of 50 requests per minute to ensure equitable access and system reliability. Exceeding this limit results in a 429 Too Many Requests error. This rate limiting prevents server overloads and ensures a stable service for all users. We recommend structuring your requests to stay within this limit for uninterrupted API access.

Pagination

Autohost API supports pagination, allowing efficient data retrieval. Use the limit and from query parameters to specify the page size and starting point of your data set. For example, to fetch the first 10 records, append ?from=0&limit=10 to your query. This approach optimizes data handling and aligns with our rate-limiting strategy.

API Versioning

Understanding Versioning in Our API

Autohost employs API versioning to maintain a stable user experience. The version number is included in the endpoint URL, facilitating changes and compatibility.

Current Version

  • Our current API version is indicated as /v1 in the endpoint URL. For example, https://data.autohost.com/v1/{endpoint}.

Handling Changes

  1. Non-Breaking Changes: Minor updates and improvements within the current version that do not affect existing API contracts will not disrupt your integration.
  2. Breaking Changes: Significant changes that alter the API's fundamental behavior will be released as a new version, e.g., /v2. Your current integrations remain stable, and you can migrate to newer versions at your own pace with clear communication and documentation.

Building Your Autohost Integration

To seamlessly integrate your application with Autohost, follow these four essential steps:

  1. Create a Listing
  2. Create a Reservation
  3. Utilize the Guest Portal
  4. Get Reservation Summary

1. Create a Listing

Begin by setting up a listing or property in our system, providing comprehensive details such as name, type, location, and more. Refer to our API documentation for detailed information.

curl -X POST "https://data.autohost.ai/v1/listings" \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"my_id": "1001",
"status": "ACTIVE",
"name": "Beautiful Downtown View for Two",
"nickname": "DT PH 100",
"property_type": "Condominium",
"accommodates": 2,
"bedrooms": 1,
"bathrooms": 1,
"beds": 1,
"check_in_time": 15,
"check_out_time": 10,
"location": {
"street": "100 King West",
"city": "Toronto",
"country": "Canada",
"state": "ON",
"zipcode": "M5X 1C9"
}
}'

Once the listing is established, you can update it via the API or the Autohost Dashboard under the 'Listings' section.

2. Create a Reservation

Record reservation details and set up additional validations as needed. Reservations can be created synchronously or asynchronously, depending on your requirements.

Example API request using cURL:

curl -X POST "https://data.autohost.ai/v1/reservations" \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"status": "INQUIRY",
"source": "Airbnb",
"confirmation_code": "X1BYGHDL",
"number_of_guests": 2,
"nights": 3,
"total_price": 459,
"listing_id": "<Autohost Listing ID>",
"check_in_date": "2020-11-15T20:00:00.000Z",
"check_out_date": "2020-11-16T16:00:00.000Z",
"guest": {
"first_name": "John",
"last_name": "Doe",
"birth_date": "1980-01-01",
"email": "guest@example.com",
"phone": "+44857993444",
"location": "London, UK"
}
}'

3. Utilize the Guest Portal

After creating a reservation, access the Guest Portal through the provided guest_portal_url link. This step completes the reservation process, allowing guests to interact with their booking details.

4. Get Reservation Summary

Retrieve all details, including Autohost verification results, from a given reservation using the appropriate API. More information can be found here.

Configuring Autohost Webhooks

Webhooks are user-defined HTTP callbacks triggered by specific events in Autohost. They provide real-time updates to your system, enhancing automation and responsiveness. Available webhooks include guest

data, verification status, reservation events, listing events, and account events. You can configure webhooks in two ways:

  1. Autohost Dashboard: Log in to Autohost Dashboard, go to Settings > Advanced > Webhooks, and optionally set up the HTTP Authorization header.

  2. API: Use the API endpoint /accounts/webhooks to register webhooks. Full API documentation is available here.

Get Started with Autohost SDK

The Autohost SDK seamlessly integrates Autohost's user interface components into your application. It offers an effortless way to display reservation and guest information without the need for direct API calls. The SDK key, distinct from the API key, is used for client-side operations.

Generating an SDK Key

To create and manage SDK keys, follow these steps in Autohost Dashboard:

  1. Log in to Autohost Dashboard.
  2. Go to Settings > API.
  3. Select Create SDK Key.
  4. (Optional) Rename the key for clarity.
  5. Copy and securely store the SDK key.

For details on using and implementing our client SDK, refer to our SDK documentation.