# BeMyGuest API v2.0

The BeMyGuest API is the industry benchmark preferred by online travel agents, designed solely for Asia's attractions, tours and activities. This comprehensive API provides real-time access to a vast inventory of travel products.

### Key Features:
*   **Product Discovery**: Search and retrieve detailed information for a wide range of travel products, including attractions, tours, and activities.
*   **Real-Time Availability and Pricing**: Check live availability and get up-to-date pricing for specific product types and dates.
*   **End-to-End Booking Management**: Create, confirm, and cancel bookings seamlessly.
*   **Voucher Retrieval**: Access and download booking vouchers directly through the API.
*   **Configuration**: Fetch essential configuration data such as supported languages, currencies, and locations to customize your integration.


Version: 2.1

## Servers

Api Demo Server
```
https://api.demo.bemyguest.com.sg
```

Variables:

Api Production Server
```
https://api.bemyguest.com.sg
```

Variables:

## Security

### Authorization

Api Key

Type: apiKey
In: header
Name: X-Authorization

## Download OpenAPI description

[BeMyGuest API v2.0](https://docs.bemyguest.com.sg/_bundle/openapi.yaml)

## Products

Endpoints for searching and retrieving product details.

### Get product list

 - [GET /v2/products](https://docs.bemyguest.com.sg/openapi/products/getproductlist.md): Retrieves a comprehensive list of all available products. This endpoint supports various filtering and sorting options to help you narrow down the results. 

You can filter by product type, category, country, and city. Pagination is available using the page and per_page parameters. 

You can also specify the sort order and the language for the response.

### Get product details

 - [GET /v2/products/{uuid}](https://docs.bemyguest.com.sg/openapi/products/getproductdetails.md): Fetches detailed information for a specific product using its unique identifier (UUID). 

You can specify which fields to return and the desired language for the response content.

### Get origin restrictions for a product

 - [GET /v2/products/{uuid}/restrictions](https://docs.bemyguest.com.sg/openapi/products/getproductrestrictions.md): Returns the origin restrictions configured for a product, scoped to the authenticated distribution partner.

Restrictions control which customer origins (by country) are allowed or excluded from purchasing this product through your distribution channel.

The response uses an extensible format — each entry has a type (currently country) and a value (the ISO 3166-1 alpha-2 country code). Future versions may add additional types such as region or continent.

## Product-Types

Endpoints for retrieving product type information, pricing, and availability.

### Get product types for product

 - [GET /v2/products/{uuid}/product-types](https://docs.bemyguest.com.sg/openapi/product-types/getproducttypesforproduct.md): Returns a list of all available product-types for a given product UUID. 

This is useful for understanding the different variations or options available for a single product.

### Get product-type details

 - [GET /v2/product-types/{uuid}](https://docs.bemyguest.com.sg/openapi/product-types/getproducttypedetails.md): Retrieves the full details of a specific product-type using its UUID. 

This includes information about pricing, availability, and booking requirements. You can specify which fields to return and the language for the response.

### Get price and availability calendar

 - [GET /v2/product-types/{uuid}/price-lists](https://docs.bemyguest.com.sg/openapi/product-types/getpricelistcalendar.md): Provides a calendar view of pricing and availability for a specific product-type. 

You must provide a date_start and date_end to define the period you are interested in. The date range cannot exceed six months.

### Check availability and price for a single date

 - [GET /v2/product-types/{uuid}/price-lists/{date}](https://docs.bemyguest.com.sg/openapi/product-types/checkavailabilityandprice.md): Checks the real-time availability and price for a specific product-type on a single given date. 

> It is highly recommended to use this endpoint to confirm availability before proceeding with a booking.

## Bookings

Endpoints for creating and managing bookings.

### Create a booking

 - [POST /v2/bookings](https://docs.bemyguest.com.sg/openapi/bookings/createbooking.md): Creates a new booking. 

> Before creating a booking, you should always check the availability and price using the /v2/product-types/{uuid}/price-lists/{date} endpoint. 

The request body must contain all the necessary information for the booking, including customer details and product options.

### Get bookings

 - [GET /v2/bookings](https://docs.bemyguest.com.sg/openapi/bookings/getbookings.md): Retrieves a list of your bookings. You can filter the results by date_start, date_end, guest information (first_name, last_name, email, phone), partner_reference, and status. 

Pagination is also supported.

### Get booking details

 - [GET /v2/bookings/{uuid}](https://docs.bemyguest.com.sg/openapi/bookings/getbookingdetails.md): Retrieves the current status and details of a specific booking using its UUID.

### Confirm or cancel booking

 - [PUT /v2/bookings/{uuid}/{status}](https://docs.bemyguest.com.sg/openapi/bookings/updatebookingstatus.md): Updates the status of a booking to either confirm or cancel. 

- A new booking starts with the reserved status. 
- To confirm the booking and lock the inventory, you must update the status to waiting. 
- Bookings in the waiting status will expire if not actioned within 5 days.
- To cancel a booking, a cancellation request is created and is subject to approval.

### Get vouchers

 - [GET /v2/bookings/{bookingUuid}/vouchers](https://docs.bemyguest.com.sg/openapi/bookings/getvouchers.md): Retrieves the vouchers for a specific booking. 

> Please note that the download links provided require authorization and should not be sent directly to the end customer. You must download the vouchers and distribute them yourself.

## Configuration

Endpoints for retrieving API configuration data.

### Get configuration

 - [GET /v2/config](https://docs.bemyguest.com.sg/openapi/configuration/getconfig.md): Fetches essential configuration data for the API, including supported languages, currencies, locations, timezones, and the base URL for images.

## Other

### Product available

 - [POST product_available](https://docs.bemyguest.com.sg/openapi/webhooks/productavailable.md): This webhook is triggered when a new product becomes available.

### Product updated

 - [POST product_updated](https://docs.bemyguest.com.sg/openapi/webhooks/productupdated.md): This webhook is triggered when a product's information is updated.

### Product-type available

 - [POST product_type_available](https://docs.bemyguest.com.sg/openapi/webhooks/producttypeavailable.md): This webhook is triggered when a new product type becomes available.

### Product-type not available

 - [POST product_type_not_available](https://docs.bemyguest.com.sg/openapi/webhooks/producttypenotavailable.md): This webhook is triggered when a product type is no longer available.

### Product-type content updated

 - [POST product_type_content_updated](https://docs.bemyguest.com.sg/openapi/webhooks/producttypecontentupdated.md): This webhook is triggered when the content of a product type is updated.

### Booking status updated

 - [POST booking_status_updated](https://docs.bemyguest.com.sg/openapi/webhooks/bookingstatusupdated.md): This webhook is triggered when a booking's status is updated.

### Booking data updated

 - [POST booking_data_updated](https://docs.bemyguest.com.sg/openapi/webhooks/bookingdataupdated.md): This webhook is triggered when a booking's data is updated.

### Booking tickets updated

 - [POST booking_tickets_updated](https://docs.bemyguest.com.sg/openapi/webhooks/bookingticketsupdated.md): This webhook is triggered when a booking's tickets are updated.

