Get Resource Availability

Get Resource Availability

POST [PlatformAddress]/api/1.0/venue?action=getResourceAvailability

Return the availability for resources.

Request Body

Name
Type
Description

venueId*

integer

The id of the venue

startDate*

date

The start date of the period from which to include the resource availability details.

endDate*

date

The end date of the period from which to include the resource availability details.

resourceIds*

array

The end date of the period from which to include the resource availability details.

quantity

integer

Specifies the quantity to check for resource availability.

{
    "meta": {
        "totalResults": 2,
        "start": 0,
        "perPage": 100,
        "count": 2
    },
    "results": [
        {
            "id": 1,
            "unAvailableTimes": [
                {
                    "startDate": "2021-06-24 00:00:00",
                    "endDate": "2021-06-24 23:59:00",
                    "quantity": 10
                }
            ],
            "isAvailable": true,
            "conflict": null
        },
        {
            "id": 25,
            "unAvailableTimes": [
                {
                    "startDate": "2021-06-24 00:00:00",
                    "endDate": "2021-06-24 23:59:00",
                    "quantity": 10
                }
            ],
            "isAvailable": false,
            "conflict": {
                "venueId": 1,
                "bookingId": 20815,
                "sessionId": 11544,
                "spaceId": 288,
                "resourceId": 25,
                "startDate": "2021-06-24 00:00:00",
                "endDate": "2021-06-24 23:59:00",
                "quantity": 10
            }
        }
    ]
}

Example Request

Get Resource Availability

{
    "venueId": 1,
    "startDate": "2021-06-24 00:00:00",
    "endDate": "2021-06-25 00:00:00",
    "resourceIds": [1, 25],
    "quantity": 10
}

Returns

A collection object with the following properties in the results

Property
Description

id

The unique resource identifier

unAvailableTimes

The reserved date time ranges for resource with quantity

isAvailble

Whether or not resource is available for given time range and quantity. (Only when request contains quantity)

conflict

If resource is not available (i.e. isAvailable to false), then it gives conflicted session details (Only when request contains quantity)

Last updated