# Connections API Overview

Use the Connections API to manage your connections with partners and connection requests from them.

## What are connections?

Before you can start managing a partners' accommodation unit through Booking.com APIs, you must get permission from the partner on what you can manage.
For example, some properties would want providers to manage their property inventories while others might just want a provider to manage their property content such as photos.
Your connection with a partner represents the access granted to you by the partner, with the exact scope represented by a set of [connection types.](#what-are-connection-types)

## What are Connection types?

Each connection consists of one or more connection types.
A connection type represents a granular permission and grants access to a collection of APIs that fulfill a specific business need.

Booking.com currently supports the following connections types, with names as used in Provider portal and as returned by [OTA_HotelSearch](/connectivity/docs/tsk-retrieve-property-attributes):

- Reservations
- Rates and Availability
- Guest reviews
- Reporting
- Content
- Photos
- Promotions
- Messaging
- Performance data and insights
- Payments by Booking.com onboarding

More connection types will be added in the future as we introduce new APIs.
When integrating with Connections API, you should make sure your implementation is prepared to handle unexpected future connection types.

## What are connection requests?

Using the extranet, a property can initiate a request such that once the request is approved, a provider can manage certain aspects of the property for the property.
A connection request is addressed to a specific provider and contains details of what the property wants the provider to manage as connection types.
For example, a property can send a request that provider manage the following:

- Availability: Manage the rates and availability for your property.
- Reservations: Manage your existing and future reservations.
- Photos: Add, manage, and organize property photos.

The provider can either accept or reject the connection request.

Pending connection requests don't expire. A request stays pending until you accept or reject it, or until the property cancels it.

### Supported connection states

The following are the possible connection states:

- `pending`: The state when a property initiates a connection request to a provider pending a provider's accept or reject action.
- `connected`: The state when a provider accepts a pending connection request. In other words, the property has an active connection with one or more connection types with the provider.
- `not found`: The state when a provider rejects a pending connection request, when a property has no active connection or pending connection request with the provider, or when the property isn't linked to the machine account making the call. For more information, see [Connections and machine accounts](#connections-and-machine-accounts).

## Connections and machine accounts

Unlike the Provider Portal that lists all your pending connection requests at any given time, the Connections API only returns requests and connections for properties linked to the machine account you use to call it.

This means a property can appear as pending in the Provider Portal while the Connections API behaves as if no request exists:

- `GET /properties/{property_id}/status` returns `not found`.
- `GET /properties/-/requests` doesn't include the request.
- Accepting or rejecting the request returns `HTTP 403` with error code `635`.

This also applies to active connections, including connections created automatically when auto-connect is on in the Provider Portal. Auto-connect doesn't add the property to your machine account. Until you add it, `GET /properties/{property_id}/status` returns `not found`, `GET /properties/{property_id}/connection` returns an empty `data` object, and `GET /properties/-/connections` doesn't include the property.

For production properties, **Change settings** on the production machine account lets you enable **Assign new properties to this machine account**, which automatically assigns newly added properties to that account when possible. This automatic assignment is separate from auto-connect, which connects the property to the provider.

To see and act on the request or connection through the API, ensure the property is linked to the machine account. If it isn't assigned automatically, add it under **Machine Accounts** in the [Provider Portal](https://connect.booking.com/hotels), then call the endpoint again.

**Property IDs are removed when a connection ends**

When you deactivate a connection or reject a connection request, the property ID is automatically removed from your machine account. If the property sends a new connection request later, the Connections API doesn't return it until you add the property to your machine account again.

## What can you do with the Connections API?

Using the Connections API, you can:

- [Accept](/connectivity/docs/connections-api/managing-connections-api/#accept-a-connection-request)  or [reject connection requests.](/connectivity/docs/connections-api/managing-connections-api/#reject-a-pending-connection-request) Accepted connection requests become active connections.
- [Deactivate an active connection.](/connectivity/docs/connections-api/managing-connections-api/#deactivate-an-active-connection)
- [Retrieve active connections.](/connectivity/docs/connections-api/managing-connections-api/#get-all-active-connections)
- [Retrieve pending connection requests.](/connectivity/docs/connections-api/managing-connections-api/#get-connection-requests-from-any-property)
- [Check the status of connections.](/connectivity/docs/connections-api/managing-connections-api/#get-property-connection-request-status)
- [Retrieve disconnection summaries.](/connectivity/docs/connections-api/managing-connections-api/#get-disconnection-summaries-of-all-properties)

## Going live

Before you go live with your API integration, you'll need to meet certain requirements. For more information, see [Going Live.](/connectivity/docs/going_live/)
