Bookker API Documentation logo Bookker API Documentation

DEPRECATED - Comprobar disponibilidad de las plazas de comedor

Última modificación: 08/09/2021

Comprobar disponibilidad

Comprueba la disponibilidad de las plazas de comedor teniendo en cuenta los siguientes criterios:

Request

HTTP request
GET /api/v1/users/me/buildings/{buildingId}/dinningareaseats/free
Headers
Header Value Required
Authorization Bearer eyJ0eXBlIjoiSldUIiwiYWxnIjoiSFM1MT… true
Params
Param Value Required
bookingDays List<BookingDay> true
¡Importante! - Ejemplo de uso del parámetro bookingDays.

Para utilizar una lista en los parámetros de una petición GET hay que hacerlo de la siguiente forma:

http://localhost:9010/api/v1/users/{userId}/buildings/{buildingId}/workstations/subcategories/{subcategoryId}/free?bookingDays[0].startDate=1561708800000&bookingDays[0].endDate=1561712400000&bookingDays[1].startDate=1561723200000&bookingDays[1].endDate=1561730400000

Sin embargo, para poder realizar la petición correctamente hay que encodear la URL ya que los corchetes "[]" son carácteres no válidos.

Request Example
GET https://localhost:9010/api/v1/users/me/buildings/758a81f3-f171-404b-b48c-c922828aed49/dinningareaseats/free?bookingDays%5B0%5D.startDate=1602058371000&bookingDays%5B0%5D.endDate=1596541558000

Response

Si se han conseguido procesar la petición, se devuelve un código 200 con la información de los recursos disponibles.

HTTPS/1.1 200 OK
Content-type: application/json
{
    "freeSeatsMap": [
        {
            "dinningAreaRuleShift": {
                "id": "81667bfc-697f-458d-a7dc-50f08aa920b7",
                "dinningAreaRuleId": "758a81f3-f171-404b-b48c-c922828aed49",
                "startMs": 50400000,
                "endMs": 54000000
            },
            "freeResources": [
                {
                    "id": "729ec5ec-76df-41a7-bf82-9c6b8296b237",
                    "name": "B-P1-COMEDOR-10",
                    "posterCode": "B-P1-COMEDOR-10",
           	 		"image": "https://api.develop.bookkercorp.com/api/v1/bookker/download/organizations/8aee218a-fce2-4900-9410-00f485a2729e/users/5432a51ff76e4e349a0fcd6759eeaa0a.jpeg",
                    "approachable": false,
                    "floor": {
                        "id": "14ab4017-1261-46ff-af05-eadf5d3d69e8"
                    },
                    "subcategory": {
                        "id": "ddbf3210-e907-45eb-8b33-efb649b00b02"
                    },
                    "visible": true
                }
            ]
        },
        {
            "dinningAreaRuleShift": {
                "id": "9f30d5ac-1d49-4789-b35d-c67f44ab529c",
                "dinningAreaRuleId": "758a81f3-f171-404b-b48c-c922828aed49",
                "startMs": 54000000,
                "endMs": 57600000
            },
            "freeResources": [
                {
                    "id": "729ec5ec-76df-41a7-bf82-9c6b8296b237",
                    "name": "B-P1-COMEDOR-10",
                    "posterCode": "B-P1-COMEDOR-10",
           	 		"image": "https://api.develop.bookkercorp.com/api/v1/bookker/download/organizations/8aee218a-fce2-4900-9410-00f485a2729e/users/5432a51ff76e4e349a0fcd6759eeaa0a.jpeg",
                    "approachable": false,
                    "floor": {
                        "id": "14ab4017-1261-46ff-af05-eadf5d3d69e8"
                    },
                    "subcategory": {
                        "id": "ddbf3210-e907-45eb-8b33-efb649b00b02"
                    },
                    "visible": true
                }
            ]
        },
        {
            "dinningAreaRuleShift": {
                "id": "e5e5db75-be33-4d27-b36b-48b3a32fa731",
                "dinningAreaRuleId": "758a81f3-f171-404b-b48c-c922828aed49",
                "startMs": 57600000,
                "endMs": 61200000
            },
            "freeResources": []
        },
        {
            "dinningAreaRuleShift": {
                "id": "f8876802-45d6-4b2c-8057-c74311782440",
                "dinningAreaRuleId": "758a81f3-f171-404b-b48c-c922828aed49",
                "startMs": 46800000,
                "endMs": 50400000
            },
            "freeResources": []
        }
    ]
}

BookingDay

Properties

Name Type Description
startDate Long Fecha y hora en milisegundos del inicio de la reserva.
endDate Long Fecha y hora en milisegundos del fin de la reserva.
{
    "startDate": 1561557600000,
    "endDate": 1561559400000
}