Slots availables for reservation

Supported Formats

json

GET /open_api/v1/availabilities
Availabilities index

Index of reservable availabilities and their slots, paginated. Ordered by start_at descendant.

Supported Formats

json

Examples

# /open_api/v1/availabilities?available_type=Machine&page=1&per_page=3
{
  "availabilities": [
    {
        "id": 5115,
        "start_at": "2023-07-13T14:00:00.000+02:00",
        "end_at": "2023-07-13T18:00:00.000+02:00",
        "created_at": "2023-01-24T12:28:25.905+01:00",
        "available_type": "Machine",
        "available_ids": [
            5,
            9,
            10,
            15,
            8,
            12,
            17,
            16,
            3,
            2,
            14,
            18
        ],
        "slots": [
            {
                "id": 17792,
                "start_at": "2023-07-13T14:00:00.000+02:00",
                "end_at": "2023-07-13T15:00:00.000+02:00"
            },
            {
                "id": 17793,
                "start_at": "2023-07-13T15:00:00.000+02:00",
                "end_at": "2023-07-13T16:00:00.000+02:00"
            },
            {
                "id": 17794,
                "start_at": "2023-07-13T16:00:00.000+02:00",
                "end_at": "2023-07-13T17:00:00.000+02:00"
            },
            {
                "id": 17795,
                "start_at": "2023-07-13T17:00:00.000+02:00",
                "end_at": "2023-07-13T18:00:00.000+02:00"
            }
        ]
    },
    {
        "id": 5112,
        "start_at": "2023-07-07T14:00:00.000+02:00",
        "end_at": "2023-07-07T18:00:00.000+02:00",
        "created_at": "2023-01-24T12:26:45.997+01:00",
        "available_type": "Machine",
        "available_ids": [
            5,
            9,
            10,
            15,
            8,
            12,
            17,
            16,
            3,
            2,
            14,
            18
        ],
        "slots": [
            {
                "id": 17786,
                "start_at": "2023-07-07T14:00:00.000+02:00",
                "end_at": "2023-07-07T15:00:00.000+02:00"
            },
            {
                "id": 17787,
                "start_at": "2023-07-07T15:00:00.000+02:00",
                "end_at": "2023-07-07T16:00:00.000+02:00"
            },
            {
                "id": 17788,
                "start_at": "2023-07-07T16:00:00.000+02:00",
                "end_at": "2023-07-07T17:00:00.000+02:00"
            },
            {
                "id": 17789,
                "start_at": "2023-07-07T17:00:00.000+02:00",
                "end_at": "2023-07-07T18:00:00.000+02:00"
            }
        ]
    },
    {
        "id": 5111,
        "start_at": "2023-07-06T14:00:00.000+02:00",
        "end_at": "2023-07-06T18:00:00.000+02:00",
        "created_at": "2023-01-24T12:26:37.189+01:00",
        "available_type": "Machine",
        "available_ids": [
            5,
            9,
            10,
            15,
            8,
            12,
            17,
            16,
            3,
            2,
            14,
            18
        ],
        "slots": [
            {
                "id": 17782,
                "start_at": "2023-07-06T14:00:00.000+02:00",
                "end_at": "2023-07-06T15:00:00.000+02:00"
            },
            {
                "id": 17783,
                "start_at": "2023-07-06T15:00:00.000+02:00",
                "end_at": "2023-07-06T16:00:00.000+02:00"
            },
            {
                "id": 17784,
                "start_at": "2023-07-06T16:00:00.000+02:00",
                "end_at": "2023-07-06T17:00:00.000+02:00"
            },
            {
                "id": 17785,
                "start_at": "2023-07-06T17:00:00.000+02:00",
                "end_at": "2023-07-06T18:00:00.000+02:00"
            }
        ]
    }
]
}

Params

Param name Description
page
optional

Page number

Validations:

  • Must be a Integer

per_page
optional

Number of objects per page. Default is 20.

Validations:

  • Must be a Integer

after
optional

Filter availabilities to those starting after the given date.

Validations:

  • Must be a DateTime

before
optional

Filter availabilities to those ending before the given date.

Validations:

  • Must be a DateTime

user_id
optional

Scope the request to one or various users.

Validations:

  • Must be one of: Integer, Array.

available_type
optional

Scope the request to a specific type of reservable.

Validations:

  • Must be one of: Event, Machine, Space, Training.

available_id
optional

Scope the request to one or various reservables.
WARNING: filtering by available_id is only available if filter available_type is provided

Validations:

  • Must be one of: Integer, Array.