Bookker API Documentation logo Bookker API Documentation

Comprobar disponibilidad de las plazas de comedor por edificio y turno

Última modificación: 25/09/2023

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/freebyshift
Headers
Header Value Required
Authorization Bearer eyJ0eXBlIjoiSldUIiwiYWxnIjoiSFM1MT… true
Params
Param Value Required
dinningAreaShiftId Identificador del turno a reservar true
bookingDays List true
maxCostPerHour BigDecimal (10.00) false
¡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:

https://localhost:9010/api/v1/users/me/buildings/328a81f3-f171-404b-b48c-c922828aed51/dinningareaseats/freebyshift?dinningAreaShiftId=78dee610-e102-478a-be6a-e2505b72fa74&bookingDays[0]=1631183105000

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/328a81f3-f171-404b-b48c-c922828aed51/dinningareaseats/freebyshift?dinningAreaShiftId=78dee610-e102-478a-be6a-e2505b72fa74&bookingDays%5B0%5D=1631183105000

Response

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

HTTPS/1.1 200 OK
Content-type: application/json

{
    "freeDinningAreaSeatsByFloor": [
        {
            "floor": {
                "id": "14ab4017-1261-46ff-af05-eadf5d3d69e8",
                "name": "Planta 1",
                "floorNumber": 1,
                "image": "https://api.develop.bookkercorp.com/api/v1/bookker/download/organizations/8aee218a-fce2-4900-9410-00f485a2729e/floors/40d25abc74f043f4afff218f02d2e024.png",
                "building": {
                    "id": "758a81f3-f171-404b-b48c-c922828aed49"
                },
                "status": "ACTIVATED",
                "type": "OFFICE",
                "visible": true
            },
            "freeResources": [
                {
                    "id": "3afd2de5-561a-4a89-be5f-91c956d5fa85",
                    "name": "Comedor 5",
                    "posterCode": "B-P1-COMEDOR-5",
                    "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",
                        "priority": 0
                    },
                    "visible": true,
                    "status": "ACTIVATED",
                    "group": {
                        "id": "4e486d90-beed-4c6a-9861-9efcfcdf9a24"
                    }
                },
                {
                    "id": "4b34b23c-0960-11eb-85fa-02e533b353cb",
                    "name": "B-P1-COMEDOR-1",
                    "posterCode": "B-P1-COMEDOR-1",
                    "image": "https://api.develop.bookkercorp.com/api/v1/bookker/download/organizations/8aee218a-fce2-4900-9410-00f485a2729e/users/5432a51ff76e4e349a0fcd6759eeaa0a.jpeg",
                    "mapCoordinates": {
                        "topLeftX": 100,
                        "topLeftY": 100,
                        "bottomRightX": 200,
                        "bottomRightY": 200
                    },
                    "approachable": false,
                    "floor": {
                        "id": "14ab4017-1261-46ff-af05-eadf5d3d69e8"
                    },
                    "subcategory": {
                        "id": "ddbf3210-e907-45eb-8b33-efb649b00b02",
                        "priority": 0
                    },
                    "visible": true,
                    "status": "ACTIVATED",
                    "group": {
                        "id": "4e486d90-beed-4c6a-9861-9efcfcdf9a24"
                    }
                },
                {
                    "id": "535ffa54-0960-11eb-85fa-02e533b353cb",
                    "name": "B-P1-COMEDOR-2",
                    "posterCode": "B-P1-COMEDOR-2",
                    "image": "https://api.develop.bookkercorp.com/api/v1/bookker/download/organizations/8aee218a-fce2-4900-9410-00f485a2729e/users/5432a51ff76e4e349a0fcd6759eeaa0a.jpeg",
                    "mapCoordinates": {
                        "topLeftX": 300,
                        "topLeftY": 300,
                        "bottomRightX": 400,
                        "bottomRightY": 400
                    },
                    "approachable": false,
                    "floor": {
                        "id": "14ab4017-1261-46ff-af05-eadf5d3d69e8"
                    },
                    "subcategory": {
                        "id": "ddbf3210-e907-45eb-8b33-efb649b00b02",
                        "priority": 0
                    },
                    "visible": true,
                    "status": "ACTIVATED",
                    "group": {
                        "id": "4e486d90-beed-4c6a-9861-9efcfcdf9a24"
                    }
                },
                {
                    "id": "57598a34-0960-11eb-85fa-02e533b353cb",
                    "name": "B-P1-COMEDOR-3",
                    "posterCode": "B-P1-COMEDOR-3",
                    "image": "https://api.develop.bookkercorp.com/api/v1/bookker/download/organizations/8aee218a-fce2-4900-9410-00f485a2729e/users/5432a51ff76e4e349a0fcd6759eeaa0a.jpeg",
                    "mapCoordinates": {
                        "topLeftX": 500,
                        "topLeftY": 500,
                        "bottomRightX": 600,
                        "bottomRightY": 600
                    },
                    "approachable": false,
                    "floor": {
                        "id": "14ab4017-1261-46ff-af05-eadf5d3d69e8"
                    },
                    "subcategory": {
                        "id": "ddbf3210-e907-45eb-8b33-efb649b00b02",
                        "priority": 0
                    },
                    "visible": true,
                    "status": "ACTIVATED",
                    "group": {
                        "id": "4e486d90-beed-4c6a-9861-9efcfcdf9a24"
                    }
                },
                {
                    "id": "8053142e-2f26-4349-8e1d-5e7cd0242a51",
                    "name": "Comedor 4",
                    "posterCode": "B-P1-COMEDOR-4",
                    "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",
                        "priority": 0
                    },
                    "visible": true,
                    "status": "ACTIVATED",
                    "group": {
                        "id": "4e486d90-beed-4c6a-9861-9efcfcdf9a24"
                    }
                },
                {
                    "id": "92e95f50-700d-48e1-81fd-3075e022070b",
                    "name": "Comedor 6",
                    "posterCode": "B-P1-COMEDOR-6",
                    "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",
                        "priority": 0
                    },
                    "visible": true,
                    "status": "ACTIVATED",
                    "group": {
                        "id": "4e486d90-beed-4c6a-9861-9efcfcdf9a24"
                    }
                }
            ]
        }
    ]
}