Guest Services: How to connect to Beds24 using API V2

Guest services, such as lock systems, concierge services and cleaner management, can retrieve booking information from Beds24 through API V2 to use in their own system. Your developer builds the integration between your system and Beds24.

Quick Guide

  1. Create a test property with prices and some bookings in Beds24.
  2. Generate an invite code on the API page and exchange it for a refresh token with GET /authentication/setup.
  3. Retrieve bookings with GET /bookings, adding parameters to include extra data or filter the results.

Before you start

  • Get a basic understanding of how Beds24 works: go through the Introduction and create a test property with prices and some bookings, along with any other data you intend to use.
  • Use API V2. Beds24 has two API versions, V1 and V2, and recommends V2 for any new projects. See the API V2 documentation.
  • Try the examples in the interactive Swagger documentation.

Authenticate with API V2

API V2 uses refresh tokens, which generate access tokens. Include the token as a header in your requests in this format: token: {token}

  1. Go to the API page in the control panel and click Generate invite code.
  2. Select the scopes you need, then click Generate invite code again.
  3. Copy the invite code.
  4. Exchange it for a refresh token with the GET /authentication/setup endpoint. You can try this yourself on the Swagger page for GET /authentication/setup.

Expected result: The response contains a short-term access token to authenticate other API calls, expiresIn (how many seconds the token lasts) and a refreshToken to generate more tokens in the future. For the full request and response, see Get a refresh token in API V2.

Retrieve booking data from Beds24

Retrieve booking data with the GET /bookings endpoint.

  1. Make a booking, either in the control panel or with the API, and note the booking's ID.
  2. GET it with the API:
    https://beds24.com/api/v2/bookings?id=1234567

Expected result: The JSON response shows information about your booking.

Tip: In Swagger, click Schema under GET /bookings to see all the fields you can get with this endpoint.

Include additional data

By default, not all booking data is returned. To include additional information in the response, add parameters. For example, to include all of a booking's invoice data, add ?includeInvoiceItems=true to the request URL:

https://beds24.com/api/v2/bookings?id=1234567&includeInvoiceItems=true

Filter bookings

You can filter the bookings you retrieve in many ways. For example, use ?status=new to get only new bookings, or ?filter=arrivals to get bookings arriving today. For the full list of parameters, see the GET /bookings section of Swagger.

Related Articles

Was this article helpful?
0 out of 0 found this helpful

How to Contact us :