Bookker API Documentation logo Bookker API Documentation

Creación de reserva supervisada v2

Última modificación: 12/02/2024

Crear reserva supervisada v2

A tener en cuenta:

Request

HTTP Request
POST /api/v2/users/{userId}/supervisedbookings
Headers
Header Value Required
Authorization Bearer eyJ0eXBlIjoiSldUIiwiYWxnIjoiSFM1MT… true
x-on-behalf-of 7c008797-7ce7-4b6b-9907-8692f855f538 false
Body
{
    "bookingDays": [
        {
            "startDate": 1707901200000,
            "endDate": 1707902100000
        }
    ],
    "resourceIds": [
        "b79898e1-144d-4e58-91d1-c9449c711414"
    ],
    "title": "Test Supervised v2",
    "accessControlType": "NONE",
    "allDayBookings": false
}

Response

Si se han conseguido crear las reservas, se devuelve un código 201 con el Id de la reserva supervisada

{
    "supervisedBookingId": "dcb7402a-044a-4791-9fe4-7b84ef086eae",
    "assignedResources": [
        {
            "organizer": {
                "id": "7c008797-7ce7-4b6b-9907-8692f855f538",
                "name": "Alex",
                "surname": "Jupiter",
                "upn": "alex@bookker.es",
                "email": "alexander.fernandez@bookkercorp.com",
                "userRule": {
                    "id": "2c31a312-b2c8-4ed4-9b3c-93580d5f0ac8",
                    "name": "Regla de usuario prueba, sin límite semanal",
                    "workingDay": {
                        "time": 604800000,
                        "workingDayType": "WEEKLY"
                    },
                    "requiresApproval": false,
                    "allowAutomaticWorkstationBooking": true,
                    "allowManualWorkstationBooking": true
                },
                "type": "BOOKKER_INTERNAL",
                "acceptedBookkerPolicy": true,
                "acceptedCustomPolicy": true,
                "status": "ACTIVATED",
                "userRuleId": "2c31a312-b2c8-4ed4-9b3c-93580d5f0ac8"
            },
            "resource": {
                "id": "521f1ffb-9974-49f8-b7ed-257d69ab9efb",
                "name": "B-P1-PUESTO-114",
                "posterCode": "B-P1-PUESTO-114",
                "mapCoordinates": {
                    "topLeftX": 309,
                    "topLeftY": 2318,
                    "bottomRightX": 359,
                    "bottomRightY": 2368
                },
                "approachable": false,
                "floor": {
                    "id": "14ab4017-1261-46ff-af05-eadf5d3d69e8",
                    "name": "Planta 1",
                    "image": "https://api.develop.bookkercorp.com/api/v1/bookker/download/organizations/8aee218a-fce2-4900-9410-00f485a2729e/floors/40d25abc74f043f4afff218f02d2e024.png",
                    "status": "ACTIVATED",
                    "type": "OFFICE",
                    "visible": true
                },
                "subcategory": {
                    "id": "db5d3245-1df2-42e2-9c6e-51bfadba948b",
                    "name": "Puesto de trabajo",
                    "category": "WORKSTATION",
                    "priority": 0
                },
                "visible": true,
                "status": "ACTIVATED",
                "group": {
                    "id": "4e486d90-beed-4c6a-9861-9efcfcdf9a24",
                    "name": "Grupo PLANTA 1",
                    "description": "",
                    "type": "OFFICE",
                    "buildingId": "758a81f3-f171-404b-b48c-c922828aed49"
                }
            },
            "bookingId": "d2137616-329d-4e07-b8b0-915cbdcf58dd",
            "bookingStatus": "UNDETERMINED",
            "startDate": 1711267200000,
            "endDate": 1711268100000
        }
    ]
}