Crear pre-reserva
Versión documento: v1
Creación: 26/09/2019
Última modificación: 21/01/2020
El usuario podrá pre-reservar hasta X reuniones, donde X es configurable por la compañía (por defecto es 3).
El tiempo de vida de votación hay que mandarlo en HORAS.
Los invitados externos deberán ser, por el momento, siempre OPCIONALES.
HTTP request
Spaces
POST /api/v1/users/me/bookings/spaces/findslot
POST /api/v1/users/{userId}/bookings/spaces/findslot
Headers
| Header | Value | Required |
|---|---|---|
| Authorization | Bearer eyJ0eXBlIjoiSldUIiwiYWxnIjoiSFM1MT… | true |
Request Example
POST http://localhost:9010/api/v1/users/me/bookings/spaces/findslot
{
"subject": "Prueba creeación reserva find slot",
"body": {
"content": "La descripción de la reserva bla bla bla bla bla...",
"bodyType": "TEXT"
},
"importance": "LOW",
"internalAttendees": [
{
"type": "REQUIRED",
"user": {
"id": "8bd79424-6782-473e-bcc1-8e94d550f2de"
}
},
{
"type": "OPTIONAL",
"user": {
"id": "a6cd8023-c735-4ad8-bdac-049a0c511714"
}
}
],
"externalAttendees": [
{
"type": "OPTIONAL",
"email": "usuarioexterno1@gmail.com"
}
],
"findSlotOptions": [
{
"resourceId": "381d92e1-87b0-40d2-95da-b93413701aa4",
"bookingDay": {
"startDate": 1569502800000,
"endDate": 1569513600000
}
},
{
"resourceId": "b6badb50-6497-4e51-9ec3-fc0c5a0748d5",
"bookingDay": {
"startDate": 1569510000000,
"endDate": 1569510900000
}
},
{
"resourceId": "ffa5c9c3-de4a-4bd4-bb9b-bc657749d2ca",
"bookingDay": {
"startDate": 1569575700000,
"endDate": 1569577500000
}
}
],
"votingLifeTime": 4
}
Response
Si se han conseguido procesar la petición, se devuelve un código 201 con la información de las pre-reservas.
HTTP/1.1 200 OK
Content-type: application/json
{
"bookings": [
{
"id": "c05b1d8a-c261-4a6e-b2af-a50185fc3b38",
"startDate": 1569841200000,
"endDate": 1569848400000,
"duration": 7200000,
"status": "PENDING_VOTING",
"accessControlType": "ORGANIZER",
"creator": {
"id": "8133c93f-97d7-4fef-ab87-97b1a3df9d47",
"name": "Aitor",
"surname": "Gómez",
"alias": "5de897ff3396477e8f2d1ec9dca433eb",
"email": "aitor.gomez@bookkercorp.com",
"organization": {
"id": "12acc37e-723f-43ef-8914-1de2affba3bd"
},
"userRule": {
"id": "8fe659f9-df21-44e3-8c85-4cff2703f915"
},
"mobileRole": {
"id": "5220b6a2-8920-4dae-8ff0-ba96707d439d"
},
"canBeSearched": true
},
"organizer": {
"id": "8133c93f-97d7-4fef-ab87-97b1a3df9d47",
"name": "Aitor",
"surname": "Gómez",
"alias": "5de897ff3396477e8f2d1ec9dca433eb",
"email": "aitor.gomez@bookkercorp.com",
"organization": {
"id": "12acc37e-723f-43ef-8914-1de2affba3bd"
},
"userRule": {
"id": "8fe659f9-df21-44e3-8c85-4cff2703f915"
},
"mobileRole": {
"id": "5220b6a2-8920-4dae-8ff0-ba96707d439d"
},
"canBeSearched": true
},
"resource": {
"id": "381d92e1-87b0-40d2-95da-b93413701aa4",
"name": "D09SS",
"posterCode": "D09SS",
"mapCoordinates": {
"topLeftX": 1353,
"topLeftY": 1720,
"bottomRightX": 1402,
"bottomRightY": 1769
},
"approachable": false,
"floor": {
"id": "04669277-346f-48be-b4c0-06242c0f6683"
},
"subcategory": {
"id": "e1d9af28-29ee-444c-9edd-6f0e871b18ce"
},
"resourceRule": {
"id": "8dcbdb92-ad3d-4948-ad45-43f527a7e0a0",
"advanceCheckIn": 900000,
"expirationMargin": 900000
},
"visible": true,
"capacity": 1
},
"supervisedBooking": {},
"subject": "Prueba creeación reserva find slot",
"body": {
"content": "La descripción de la reserva bla bla bla bla bla...",
"bodyType": "TEXT"
},
"importance": "LOW",
"selfInvite": false,
"attendeesCanInvite": false,
"attendeesCanModify": false,
"attendeesCanSeeOtherAttendees": false,
"findSlotId": "c8ddec4d-f352-4bc8-9227-fe8e004f6f0a",
"resourceType": "SPACE",
"internalAttendees": [
{
"id": "1d02800e-c925-42de-81e7-060ba4dbd8d6",
"type": "ORGANIZER",
"status": "ACCEPTED",
"bookingId": "c05b1d8a-c261-4a6e-b2af-a50185fc3b38",
"user": {
"id": "8133c93f-97d7-4fef-ab87-97b1a3df9d47"
}
},
{
"id": "7aa46918-ba11-4784-9210-44f9a4a209c2",
"type": "OPTIONAL",
"status": "NEEDS_ACTION",
"bookingId": "c05b1d8a-c261-4a6e-b2af-a50185fc3b38",
"user": {
"id": "a6cd8023-c735-4ad8-bdac-049a0c511714"
}
},
{
"id": "79384d14-1193-4b64-bd69-076a6ed9fdd4",
"type": "REQUIRED",
"status": "NEEDS_ACTION",
"bookingId": "c05b1d8a-c261-4a6e-b2af-a50185fc3b38",
"user": {
"id": "8bd79424-6782-473e-bcc1-8e94d550f2de"
}
}
],
"externalAttendees": [
{
"id": "d2d280e7-bf4a-4e14-97e8-5422dd6f191b",
"type": "OPTIONAL",
"status": "NEEDS_ACTION",
"bookingId": "c05b1d8a-c261-4a6e-b2af-a50185fc3b38",
"email": "usuarioexterno1@gmail.com"
}
]
},
{
"id": "85d7016f-41d8-495b-87af-137698e6148e",
"startDate": 1569857400000,
"endDate": 1569861000000,
"duration": 3600000,
"status": "PENDING_VOTING",
"accessControlType": "ORGANIZER",
"creator": {
"id": "8133c93f-97d7-4fef-ab87-97b1a3df9d47",
"name": "Aitor",
"surname": "Gómez",
"alias": "5de897ff3396477e8f2d1ec9dca433eb",
"email": "aitor.gomez@bookkercorp.com",
"organization": {
"id": "12acc37e-723f-43ef-8914-1de2affba3bd"
},
"userRule": {
"id": "8fe659f9-df21-44e3-8c85-4cff2703f915"
},
"mobileRole": {
"id": "5220b6a2-8920-4dae-8ff0-ba96707d439d"
},
"canBeSearched": true
},
"organizer": {
"id": "8133c93f-97d7-4fef-ab87-97b1a3df9d47",
"name": "Aitor",
"surname": "Gómez",
"alias": "5de897ff3396477e8f2d1ec9dca433eb",
"email": "aitor.gomez@bookkercorp.com",
"organization": {
"id": "12acc37e-723f-43ef-8914-1de2affba3bd"
},
"userRule": {
"id": "8fe659f9-df21-44e3-8c85-4cff2703f915"
},
"mobileRole": {
"id": "5220b6a2-8920-4dae-8ff0-ba96707d439d"
},
"canBeSearched": true
},
"resource": {
"id": "ffa5c9c3-de4a-4bd4-bb9b-bc657749d2ca",
"name": "D01SS",
"posterCode": "D01SS",
"mapCoordinates": {
"topLeftX": 1211,
"topLeftY": 897,
"bottomRightX": 1260,
"bottomRightY": 946
},
"approachable": false,
"floor": {
"id": "04669277-346f-48be-b4c0-06242c0f6683"
},
"subcategory": {
"id": "e1d9af28-29ee-444c-9edd-6f0e871b18ce"
},
"resourceRule": {
"id": "8dcbdb92-ad3d-4948-ad45-43f527a7e0a0",
"advanceCheckIn": 900000,
"expirationMargin": 900000
},
"visible": true,
"capacity": 1
},
"supervisedBooking": {},
"subject": "Prueba creeación reserva find slot",
"body": {
"content": "La descripción de la reserva bla bla bla bla bla...",
"bodyType": "TEXT"
},
"importance": "LOW",
"selfInvite": false,
"attendeesCanInvite": false,
"attendeesCanModify": false,
"attendeesCanSeeOtherAttendees": false,
"findSlotId": "c8ddec4d-f352-4bc8-9227-fe8e004f6f0a",
"resourceType": "SPACE",
"internalAttendees": [
{
"id": "a6f5d313-4e3d-4dc7-aacd-a25e7f41c728",
"type": "ORGANIZER",
"status": "ACCEPTED",
"bookingId": "85d7016f-41d8-495b-87af-137698e6148e",
"user": {
"id": "8133c93f-97d7-4fef-ab87-97b1a3df9d47"
}
},
{
"id": "564c6601-42ca-4e21-ab24-c9fe983e00fa",
"type": "OPTIONAL",
"status": "NEEDS_ACTION",
"bookingId": "85d7016f-41d8-495b-87af-137698e6148e",
"user": {
"id": "a6cd8023-c735-4ad8-bdac-049a0c511714"
}
},
{
"id": "d6b25168-96f2-4caf-8dd0-ee2c1b2c9bdc",
"type": "REQUIRED",
"status": "NEEDS_ACTION",
"bookingId": "85d7016f-41d8-495b-87af-137698e6148e",
"user": {
"id": "8bd79424-6782-473e-bcc1-8e94d550f2de"
}
}
],
"externalAttendees": [
{
"id": "de902729-4507-4685-b6e8-89e752be10e3",
"type": "OPTIONAL",
"status": "NEEDS_ACTION",
"bookingId": "85d7016f-41d8-495b-87af-137698e6148e",
"email": "usuarioexterno1@gmail.com"
}
]
},
{
"id": "7a982275-14a0-4bd4-b891-7ce5ba33cee4",
"startDate": 1569850200000,
"endDate": 1569853800000,
"duration": 3600000,
"status": "PENDING_VOTING",
"accessControlType": "ORGANIZER",
"creator": {
"id": "8133c93f-97d7-4fef-ab87-97b1a3df9d47",
"name": "Aitor",
"surname": "Gómez",
"alias": "5de897ff3396477e8f2d1ec9dca433eb",
"email": "aitor.gomez@bookkercorp.com",
"organization": {
"id": "12acc37e-723f-43ef-8914-1de2affba3bd"
},
"userRule": {
"id": "8fe659f9-df21-44e3-8c85-4cff2703f915"
},
"mobileRole": {
"id": "5220b6a2-8920-4dae-8ff0-ba96707d439d"
},
"canBeSearched": true
},
"organizer": {
"id": "8133c93f-97d7-4fef-ab87-97b1a3df9d47",
"name": "Aitor",
"surname": "Gómez",
"alias": "5de897ff3396477e8f2d1ec9dca433eb",
"email": "aitor.gomez@bookkercorp.com",
"organization": {
"id": "12acc37e-723f-43ef-8914-1de2affba3bd"
},
"userRule": {
"id": "8fe659f9-df21-44e3-8c85-4cff2703f915"
},
"mobileRole": {
"id": "5220b6a2-8920-4dae-8ff0-ba96707d439d"
},
"canBeSearched": true
},
"resource": {
"id": "b6badb50-6497-4e51-9ec3-fc0c5a0748d5",
"name": "D14SS",
"posterCode": "D14SS",
"phone": "898798",
"mapCoordinates": {
"topLeftX": 969,
"topLeftY": 1649,
"bottomRightX": 1018,
"bottomRightY": 1698
},
"approachable": false,
"floor": {
"id": "04669277-346f-48be-b4c0-06242c0f6683"
},
"subcategory": {
"id": "e1d9af28-29ee-444c-9edd-6f0e871b18ce"
},
"resourceRule": {
"id": "8dcbdb92-ad3d-4948-ad45-43f527a7e0a0",
"advanceCheckIn": 900000,
"expirationMargin": 900000
},
"visible": true,
"capacity": 1
},
"supervisedBooking": {},
"subject": "Prueba creeación reserva find slot",
"body": {
"content": "La descripción de la reserva bla bla bla bla bla...",
"bodyType": "TEXT"
},
"importance": "LOW",
"selfInvite": false,
"attendeesCanInvite": false,
"attendeesCanModify": false,
"attendeesCanSeeOtherAttendees": false,
"findSlotId": "c8ddec4d-f352-4bc8-9227-fe8e004f6f0a",
"resourceType": "SPACE",
"internalAttendees": [
{
"id": "0f85a7e4-b5b8-4df3-aa0d-d0077641ddd3",
"type": "ORGANIZER",
"status": "ACCEPTED",
"bookingId": "7a982275-14a0-4bd4-b891-7ce5ba33cee4",
"user": {
"id": "8133c93f-97d7-4fef-ab87-97b1a3df9d47"
}
},
{
"id": "c54d90d2-4f5c-454e-9f02-f538bdbc9a25",
"type": "OPTIONAL",
"status": "NEEDS_ACTION",
"bookingId": "7a982275-14a0-4bd4-b891-7ce5ba33cee4",
"user": {
"id": "a6cd8023-c735-4ad8-bdac-049a0c511714"
}
},
{
"id": "0b7cc227-2e03-4cd2-a19a-c5e8b9de0351",
"type": "REQUIRED",
"status": "NEEDS_ACTION",
"bookingId": "7a982275-14a0-4bd4-b891-7ce5ba33cee4",
"user": {
"id": "8bd79424-6782-473e-bcc1-8e94d550f2de"
}
}
],
"externalAttendees": [
{
"id": "a61ad46c-23b9-47b2-8c8e-f628424cb86b",
"type": "OPTIONAL",
"status": "NEEDS_ACTION",
"bookingId": "7a982275-14a0-4bd4-b891-7ce5ba33cee4",
"email": "usuarioexterno1@gmail.com"
}
]
}
]
}