Page 1 of 1

Price and Price Rules

Posted: Tue Apr 02, 2024 7:17 am
by developer_villafinder
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?

Re: Price and Price Rules

Posted: Tue Apr 02, 2024 9:34 am
by ashergibson
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.

Re: Price and Price Rules

Posted: Tue Apr 02, 2024 4:24 pm
by developer_villafinder
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
    }
  ]
}

Re: Price and Price Rules

Posted: Fri Apr 05, 2024 8:12 am
by ashergibson
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.