Calendar

Retrieve the calendar for a single listing

Changed on

Use this endpoint to retrieve daily calendar availability and pricing for a given listing ID and date range.

IMPORTANT: Multi-unit calendar availability is determined by unit allotment, not its status field. To calculate if a multi-unit has availability, use the following formula:

const isAvailable = _.isNumber(currentDay.allotment)?
currentDay.allotment > 0 : currentDay.status === 'available';
get/availability-pricing/api/calendar/listings/{id}

Request

  • Base URL
    https://open-api.guesty.com/v1
  • URL
    https://open-api.guesty.com/v1/availability-pricing/api/calendar/listings/{id}
  • Auth
    API key in header authorization

Path parameters

idstring required

Listing ID

Query parameters

startDatestring date required

First day to be returned (format: YYYY-MM-DD)

endDatestring date required

Last day to be returned (format: YYYY-MM-DD)

includeAllotmentboolean

Return day objects including allotment

ignoreInactiveChildAllotmentboolean

Specify ignoreInactiveChildAllotment=true to exclude inactive sub-units from the allotment calculation. Default value is false.

ignoreUnlistedChildAllotmentboolean

Specify ignoreUnlistedChildAllotment=true to exclude unlisted sub-units from the allotment calculation. Default value is false.

Response

Calendar with available/unavailable dates

datestring

Date with format YYYY-MM-DD

listingIdstring
currencystring

Listing's currency value.

pricenumber

Price in the listing's currency.

isBasePriceboolean

Flag which shows whether listing is set to base price.

minNightsnumber

Min nights value.

isBaseMinNightsboolean

Flag which shows whether listing is set to base min night.

statusstring

Status value, enum: available, unavailable, booked, reserved.

allotmentnumber

Allotment value for parent listing.

blocksobject
blockRefsstring[]
reservationIdstring
reservationobject
ctaboolean

Closed To Arrival value

ctdboolean

Closed To Departure value

Example response

{
  "date": "2021-01-01",
  "listingId": "5988346d3c31bf0f00747eb6",
  "currency": "EUR",
  "price": 50,
  "isBasePrice": true,
  "minNights": 2,
  "isBaseMinNights": true,
  "status": "booked",
  "allotment": 0,
  "blocks": {
    "m": false,
    "r": false,
    "b": true,
    "bd": false,
    "sr": false,
    "abl": false,
    "a": false,
    "bw": false,
    "o": false,
    "pt": false
  },
  "blockRefs": [
    {
      "_id": "5fe9c819a141ab0026c901c7",
      "reservation": {
        "listing": {
          "timezone": "Asia/Jerusalem",
          "defaultCheckInTime": "15:00"
        },
        "money": {
          "currency": "EUR",
          "hostPayout": 367.55,
          "totalPaid": 0,
          "balanceDue": 367.55
        },
        "guest": {
          "_id": "5fe9c81834209c002c8ecd80"
        },
        "integration": {
          "platform": "manual"
        },
        "_id": "5fe9c81934209c002c8ecd8b",
        "status": "confirmed",
        "checkIn": "2020-12-30T13:00:00.000Z",
        "checkOut": "2021-01-02T08:00:00.000Z",
        "nightsCount": 3,
        "guestsCount": 2,
        "listingId": "5988346d3c31bf0f00747eb6",
        "checkInDateLocalized": "2020-12-30",
        "checkOutDateLocalized": "2021-01-02",
        "accountId": "596f6fe706112710005d96ff",
        "guestId": "5fe9c81834209c002c8ecd80",
        "source": "Manual",
        "confirmationCode": "J86mAAAM2"
      },
      "listingId": "5988346d3c31bf0f00747eb6",
      "startDate": "2020-12-30T00:00:00.000Z",
      "endDate": "2021-01-01T00:00:00.000Z",
      "type": "b",
      "reservationId": "5fe9c81934209c002c8ecd8b"
    }
  ],
  "reservationId": "5fe9c81934209c002c8ecd8b",
  "reservation": {
    "listing": {
      "timezone": "Asia/Jerusalem",
      "defaultCheckInTime": "15:00"
    },
    "money": {
      "currency": "EUR",
      "hostPayout": 367.55,
      "totalPaid": 0,
      "balanceDue": 367.55
    },
    "guest": {
      "_id": "5fe9c81834209c002c8ecd80"
    },
    "integration": {
      "platform": "manual"
    },
    "_id": "5fe9c81934209c002c8ecd8b",
    "status": "confirmed",
    "checkIn": "2020-12-30T13:00:00.000Z",
    "checkOut": "2021-01-02T08:00:00.000Z",
    "nightsCount": 3,
    "guestsCount": 2,
    "listingId": "5988346d3c31bf0f00747eb6",
    "checkInDateLocalized": "2020-12-30",
    "checkOutDateLocalized": "2021-01-02",
    "accountId": "596f6fe706112710005d96ff",
    "guestId": "5fe9c81834209c002c8ecd80",
    "source": "Manual",
    "confirmationCode": "J86mAAAM2"
  },
  "cta": false,
  "ctd": false
}

Changes