Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Pricing Information is specific to unit types within a listing. e.g.: a 1 room apartment will have different prices and a maximum number of guests compared to a 2 room apartment.

Integration Steps

Endpoints Available

Status
colourBlue
titleGET

/v1/updates/pricing

Status
colourBlue
titleGET

/v1/listings/{listingId}/unit-types/{unitTypeId}/pricing

Step 1: Fetching the Pricing Updates

  • Make an API call to route

    Status
    colourBlue
    titleGET
    /v1/updates/pricing to fetch the latest pricing updates.

  • As this is a paginated API, you have to pass the following parameters:

Parameter

Description

cursor

Each response returns you a next cursor, that you can then use to retrieve next page of updates.

limit

The maximum number of pricing updates returned by API.

  • If you are integrating with this API for the first time, the cursor parameter should be omitted. Every subsequent request should contain the cursor that is provided to you in the previous call’s next field. That way you can poll for listing updates that happened after the last successful pull.

...

Code Block
curl -X 'GET' \
  'https://chapi.bookiplyholidu.com/v1/updates/pricing?cursor=asJ34sgt&limit=3' \
  -H 'Accept: application/json'
  -H 'Authorization: Bearer SIGNED_JWT'

...

Code Block
languagejson
{
  "updates": [
    {
      "listingId": "1386b2ba-eca5-4adf-9e04-62fc521273f9",
      "unitTypeId": "fc033fae-191e-4618-80be-a8ffd48f25fc",
      "pricingUrl": "/listings/1386b2ba-eca5-4adf-9e04-62fc521273f9/unit-types/fc033fae-191e-4618-80be-a8ffd48f25fc/pricing",
      "version": "951"
    },
    {
      "listingId": "7b1cb9d9-9c58-47ee-8435-72a536eadedc",
      "unitTypeId": "507e2397-11a8-455f-b845-e7224d09093b",
      "pricingUrl": "/listings/7b1cb9d9-9c58-47ee-8435-72a536eadedc/unit-types/507e2397-11a8-455f-b845-e7224d09093b/pricing",
      "version": "956"
    },
    {
      "listingId": "cd7adf70-6be7-4b6a-a0f9-924fabe442e2",
      "unitTypeId": "b7fc3c34-749f-419c-bb32-c3de5e59767d",
      "pricingUrl": "/listings/cd7adf70-6be7-4b6a-a0f9-924fabe442e2/unit-types/b7fc3c34-749f-419c-bb32-c3de5e59767d/pricing",
      "version": "957"
    }
  ],
  "next": "JSMjIwtNQ1sNAJRykxRsjK0MD"
}

Parameter

Description

listingId

Unique id of the listing

unitTypeId

Unique id of the unit type under the listing

pricingUrl

The pricing URL which can be used to fetch the pricing

version

An unique identifier, specifying the update version in a global incremental series for every update.

If version is 20, this means that this is the 20th update on Listing or Pricing in our inventory.

Step 2: Processing the Pricing Update

...

Code Block
curl -X 'GET' \
  'https://chapi.bookiplyholidu.com/v1/listings/1386b2ba-eca5-4adf-9e04-62fc521273f9/unit-types/fc033fae-191e-4618-80be-a8ffd48f25fc/pricing' \
  -H 'Accept: application/json'
  -H 'Authorization: Bearer SIGNED_JWT'

...