Price and Price Rules

Develper issues when using the Beds24 APi.
Post Reply
developer_villafinder
Posts: 4
Joined: Fri Mar 15, 2024 7:35 am

Hello!

It seems that the price calculation from API endpoint: /inventory/rooms/calendar
and price check: https://beds24.com/control2.php?ajax=pricecheck
is different

I have created a price rules
Image

the price is showing properly and correct in the calendar page
Image

when I check the price in price-check page, its working properly.
the standard price
Image

and min-stay 4 price are correct
Image

however, when I hit the calendar endpoint, even if the minimum stay is not correct, the linked price are still showing
Image

what are the best practices?
ashergibson
Posts: 14
Joined: Thu Jun 25, 2020 2:20 am

Hello,

The API equivalent to the price check tool is the inventory/rooms/offers endpoint. The inventory/rooms/calendar endpoint retrieves values set in your calendar and may be different from the price check tool depending on your setup.

Best regards,
Asher.
developer_villafinder
Posts: 4
Joined: Fri Mar 15, 2024 7:35 am

Thanks for the pointer Asher, however, I am still facing an issue.

I have created another offer:
Image

Which the price is shown correctly in price checker:
Image

When I hit the endpoint:

Code: Select all

https://beds24.com/api/v2/inventory/rooms/offers?offerId=1&offerId=2&offerId=3&arrival=2024-05-02&departure=2024-06-18&numAdults=1
I got this response, without any offers

Code: Select all

{
  "success": true,
  "type": "offer",
  "count": 6,
  "pages": {
    "nextPageExists": false,
    "nextPageLink": null
  },
  "data": [
    {
      "roomId": 472836,
      "propertyId": 222452
    },
    {
      "roomId": 480767,
      "propertyId": 226394
    },
    {
      "roomId": 482252,
      "propertyId": 227030
    },
    {
      "roomId": 484603,
      "propertyId": 222452
    },
    {
      "roomId": 484604,
      "propertyId": 222452
    },
    {
      "roomId": 484605,
      "propertyId": 222452
    }
  ]
}
ashergibson
Posts: 14
Joined: Thu Jun 25, 2020 2:20 am

Hello,

It looks like there were no available offers based on the parameters you set, if you try different dates you may be able to get some valid offers.
E.g. I tried this query with your account and received some offers in response:
GET /inventory/rooms/offers?arrival=2024-04-05&departure=2024-04-13&numAdults=2&numChildren=0

Best regards,
Asher.
Post Reply