Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Version History

« Previous Version 2 Next »

To set availability for certain Room Types you need to use API method PUT /availability.

  1. In order to add availability for a certain Room Type, it is required:

  • to specify for which contact it is to be done (GET /contracts method);

  • to specify for which room (categoryId and serviceId) availability is to be added (method GET /availability).

Example of the request PUT /availability  API method to add availability as certain number of rooms:

[{

  "dayOfWeek": [

    true,

    true,

    true,

    true,

    true,

    true,

    true

  ],

  "amount": 10,

  "dateFrom": "2023-01-02",

  "dateTo": "2023-12-31",

  "categoryId": 6025430,

  "serviceId": 6025431,

  "operation": "SET"

}

]

Response Body

{

  "items": [

    {

      "operation": "SET",

      "inventoryInstanceId": 1,

      "contractId": 6025425,

      "dateFrom": "2023-01-19",

      "dateTo": "2023-12-31",

      "serviceId": 6025431,

      "categoryId": 6025430,

      "amount": 10,

      "dayOfWeek": [

        true,

        true,

        true,

        true,

        true,

        true,

        true

      ]

    }

  ],

  "asynchronous": false

}

  • No labels