API V2 - How to retrieve personal and financial informations of bookings

Develper issues when using the Beds24 APi.
Post Reply
starkesangebot
Posts: 29
Joined: Mon Jan 15, 2018 10:26 am

In the https://wiki.beds24.com/index.php/API_V2.0 the following functions are described:
  • bookings
  • bookings-financial
  • bookings-personal
Unfortunatly the second and third functions are not described in the API https://api.beds24.com/v2/.

How do i retrieve personal and financial information from bookings?
ashergibson
Posts: 9
Joined: Thu Jun 25, 2020 2:20 am

Hi,

These are scopes
bookings
bookings-financial
bookings-personal

Which can be used to grant access to GET and POST /bookings.

The /bookings endpoint contains all information regarding bookings, including financial and personal information.
starkesangebot
Posts: 29
Joined: Mon Jan 15, 2018 10:26 am

When using the bookings endpoint. I do NOT receive personal or financial information.

https://snipboard.io/u3EBqy.jpg
https://snipboard.io/XV4bYW.jpg

Code: Select all

{
    "success": true,
    "type": "booking",
    "count": 100,
    "pages": {
        "nextPageExists": true,
        "nextPageLink": "https://api.beds24.com/v2/bookings?page=2"
    },
    "data": [
        {
            "id": 306XXXX,
            "masterId": null,
            "propertyId": 14XXX,
            "roomId": 316XXX,
            "unitId": 1,
            "roomQty": 1,
            "offerId": 0,
            "status": "confirmed",
            "subStatus": "none",
            "arrival": "2022-XX_XX",
            "departure": "2022-XX-XX",
            "numAdult": 8,
            "numChild": 0,
            "country": "ru",
            "country2": "RU",
            "arrivalTime": "",
            "voucher": "",
            "comments": "",
            "notes": "",
            "message": "",
            "groupNote": "",
            "custom1": "",
            "custom2": "",
            "custom3": "",
            "custom4": "",
            "custom5": "",
            "custom6": "",
            "custom7": "",
            "custom8": "",
            "custom9": "",
            "custom10": "",
            "flagColor": "",
            "flagText": "",
            "statusCode": 0,
            "lang": "ru",
            "referer": "Airbnb",
            "refererEditable": "Airbnb",
            "reference": "",
            "apiSourceId": 46,
            "apiSource": "Airbnb",
            "apiReference": "XXXXXXXX",
            "allowChannelUpdate": "all",
            "allowAutoAction": "enable",
            "allowReview": "disable",
            "invoiceeId": null,
            "bookingTime": "2022-05-05T18:54:07Z",
            "modifiedTime": "2022-05-05T18:54:07Z",
            "cancelTime": null
        },
        ...
      }    
        


Using the bookings-financial endpoint results in an error message: "Invalid URL element: bookings-financial"

https://snipboard.io/EcT5qZ.jpg


The same applies for bookings-personal.

Could you please check if the two endpoints are working and implemented?
Last edited by starkesangebot on Thu May 05, 2022 8:33 pm, edited 1 time in total.
ashergibson
Posts: 9
Joined: Thu Jun 25, 2020 2:20 am

To retrieve personal and financial information for bookings, you must at minimum select the bookings-personal/read and bookings-financial/read scopes when generating an invite code here https://beds24.com/control3.php?pagetype=apiv2
starkesangebot
Posts: 29
Joined: Mon Jan 15, 2018 10:26 am

Please have a look. I already assigned all read rights accordingly.

https://snipboard.io/LqQbMA.jpg
ashergibson
Posts: 9
Joined: Thu Jun 25, 2020 2:20 am

Please try generating a new invite code with those same scopes and use it with GET /bookings.
starkesangebot
Posts: 29
Joined: Mon Jan 15, 2018 10:26 am

With a new invite code i and using the GET bookings endpoint i do receive the name and contact information of the guest.

But i do NOTreceive invoice items or invoice sum.

Code: Select all

{
    "success": true,
    "type": "booking",
    "count": 100,
    "pages": {
        "nextPageExists": true,
        "nextPageLink": "https://api.beds24.com/v2/bookings?page=2"
    },
    "data": [
        {
            "id": 30xxxxx,
            "masterId": null,
            "propertyId": 4xxxxxxx,
            "roomId": 10xxxx,
            "unitId": 3,
            "roomQty": 1,
            "offerId": 1,
            "status": "request",
            "subStatus": "none",
            "arrival": "2022-xxx",
            "departure": "2022-xxxxx",
            "numAdult": 4,
            "numChild": 0,
            "title": "",
            "firstName": "",
            "lastName": "Paul XXXXXXXXXXXxxx",
            "email": "l.scXXXXXXXXXXXX",
            "phone": "",
            "mobile": "",
            "fax": "",
            "company": "",
            "address": "RudolfXXXXXXXXXXx",
            "city": "",
            "state": "",
            "postcode": "",
            "country": "",
            "country2": null,
            "arrivalTime": "",
            "voucher": "",
            "comments": "",
            "notes": "",
            "message": "",
            "groupNote": "",
            "custom1": "",
            "custom2": "",
            "custom3": "",
            "custom4": "",
            "custom5": "",
            "custom6": "",
            "custom7": "",
            "custom8": "",
            "custom9": "",
            "custom10": "",
            "flagColor": "",
            "flagText": "",
            "statusCode": 0,
            "lang": "de",
            "referer": "starkesaxxxxx",
            "refererEditable": "starkesxxxxx",
            "reference": "",
            "apiSourceId": 0,
            "apiSource": "Direct",
            "apiReference": "",
            "allowChannelUpdate": "all",
            "allowAutoAction": "enable",
            "allowReview": "disable",
            "invoiceeId": null,
            "bookingTime": "2022-05-06T16:51:02Z",
            "modifiedTime": "2022-05-06T16:51:43Z",
            "cancelTime": null,
            "price": 3031.6,
            "deposit": 0,
            "tax": 0,
            "commission": 0,
            "rateDescription": "XXXXXXXXXXXXXXX",
            "stripeToken": null,
            "apiMessage": ""
        }, 
        ....        
        }
ashergibson
Posts: 9
Joined: Thu Jun 25, 2020 2:20 am

To include invoice items in the response, you must include the includeInvoiceItems query parameter in your request like this:

Code: Select all

https://beds24.com/api/v2/bookings?includeInvoiceItems=true
Post Reply