| Requires any of the roles: | Admin, TenantAdmin, AccessAdmin, Receptionist |
| POST | /reservation | Inserts a new reservation by a business user. |
|---|
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Guests | body | List<ReservationGuestDto> | Yes | List of reservation guests. |
| AdditionalData | body | ReservationAdditionalDataDto | Yes | Configuration of license plates, guest comments/requests and etc. |
| VisitData | body | ReservationVisitDataDto | Yes | Configuration of visit type and checkin/checkout dates. |
| AccessTemplates | body | List<ReservationAccessTemplateDto> | Yes | List of selected access templates with configured smart space accesses. |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Version | form | integer | No | Api version |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Id | form | Guid? | No | |
| ViviotId | form | string | No | |
| GuestFirstName | form | string | No | |
| GuestLastName | form | string | No | |
| form | string | No | ||
| Phone | form | string | No | |
| GuestType | form | GuestType | No | |
| Iso3166alpha2Code | form | string | No | |
| SendInvitation | form | bool | No | |
| SendAccountActivationEmail | form | bool | No |
| Name | Value |
|---|---|
| Business | 1 |
| Leisure | 2 |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| LicensePlates | form | List<string> | No | |
| Comment | form | string | No | |
| WelcomeMessage | form | string | No | |
| Company | form | string | No | |
| AccessCards | form | List<AccessCardDataDto> | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| CardNumber | form | string | No | |
| ThingIds | form | List<Guid> | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| VisitType | form | VisitType | No | |
| Checkin | form | DateTime? | No | |
| Checkout | form | DateTime? | No | |
| DoesNotContainTimeInfo | form | bool? | No |
| Name | Value |
|---|---|
| DateTime | 1 |
| AccessCount | 2 |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Id | form | Guid | No | |
| Name | form | string | No | |
| Description | form | string | No | |
| IsAvailable | form | bool | No | |
| OccupiedUntil | form | DateTime? | No | |
| ReservationIdentifier | form | string | No | |
| AccessCodeInitializationStrategy | form | int | No | |
| Tags | form | List<TagDto> | No | |
| Smartspaces | form | List<ReservationSmartSpaceDto> | No | |
| Things | form | List<ThingAccessTemplateDto> | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Id | form | Guid | No | |
| Name | form | string | No | |
| TagGroupId | form | Guid | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Id | form | Guid | No | |
| Name | form | string | No | |
| AccessFrom | form | TimeSpan? | No | |
| AccessTo | form | TimeSpan? | No | |
| AccessCount | form | int? | No | |
| AccessCardNumbers | form | string | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Id | form | Guid? | No | |
| OrganizationId | form | Guid | No | |
| ThingId | form | Guid | No | |
| ThingName | form | string | No | |
| ThingTypeName | form | string | No | |
| Exclusive | form | bool | No | |
| AvailableFrom | form | int? | No | |
| AvailableTo | form | int? | No | |
| AccessCount | form | int? | No | |
| AccessLevel | form | string | No | |
| Permission | form | List<string> | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Data | form | ReservationView | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| ResponseStatus | form | ResponseStatus | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Id | form | Guid | No | |
| State | form | ReservationState | No | |
| ReasonDenied | form | string | No | |
| Guests | form | List<ReservationGuestDto> | No | |
| AdditionalData | form | ReservationAdditionalDataDto | No | |
| VisitData | form | ReservationVisitDataDto | No | |
| AccessTemplates | form | List<ReservationAccessTemplateDto> | No | |
| ExternalId | form | string | No | |
| ReservationGuestInfos | form | List<ReservationGuestInfoDto> | No |
| Name | Value |
|---|---|
| New | 0 |
| Assigned | 10 |
| WaitingForConfirmation | 15 |
| PendingActivation | 20 |
| Active | 30 |
| Expired | 40 |
| Denied | 50 |
| Cancelled | 60 |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| GuestFirstName | form | string | No | |
| GuestLastName | form | string | No | |
| Country | form | string | No | |
| DateOfBirth | form | DateTime | No | |
| DocumentType | form | IdDocumentType | No | |
| DocumentNumber | form | string | No | |
| Gender | form | Gender | No | |
| Timestamp | form | DateTime | No | |
| form | string | No |
| Name | Value |
|---|---|
| ObmejnaPrepustnica | 1 |
| PotneListinePoMednarodniPogodbi | 2 |
| OsebnaIzkaznica | 3 |
| OrozniList | 4 |
| PotniList | 5 |
| UpravneListine | 6 |
| VozniskoDovoljenje | 7 |
| Name | Value |
|---|---|
| Male | 1 |
| Female | 2 |
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /reservation HTTP/1.1
Host: api.4spaces.io
Accept: application/json
Content-Type: application/json
Content-Length: length
{"guests":[{"id":"00000000000000000000000000000000","viviotId":"String","guestFirstName":"String","guestLastName":"String","email":"String","phone":"String","guestType":1,"iso3166alpha2Code":"String","sendInvitation":false,"sendAccountActivationEmail":false}],"additionalData":{"licensePlates":["String"],"comment":"String","welcomeMessage":"String","company":"String","accessCards":[{"cardNumber":"String","thingIds":["00000000000000000000000000000000"]}]},"visitData":{"visitType":1,"checkin":-62135596800000,"checkout":-62135596800000,"doesNotContainTimeInfo":false},"accessTemplates":[{"id":"00000000000000000000000000000000","name":"String","description":"String","isAvailable":false,"occupiedUntil":-62135596800000,"reservationIdentifier":"String","accessCodeInitializationStrategy":0,"tags":[{"id":"00000000000000000000000000000000","name":"String","tagGroupId":"00000000000000000000000000000000"}],"smartspaces":[{"id":"00000000000000000000000000000000","name":"String","accessFrom":"00:00:00","accessTo":"00:00:00","accessCount":0,"accessCardNumbers":"String"}],"things":[{"id":"00000000000000000000000000000000","organizationId":"00000000000000000000000000000000","thingId":"00000000000000000000000000000000","thingName":"String","thingTypeName":"String","exclusive":false,"availableFrom":0,"availableTo":0,"accessCount":0,"accessLevel":"String","permission":["String"]}]}],"version":0}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"data":{"id":"00000000000000000000000000000000","state":0,"reasonDenied":"String","guests":[{"id":"00000000000000000000000000000000","viviotId":"String","guestFirstName":"String","guestLastName":"String","email":"String","phone":"String","guestType":1,"iso3166alpha2Code":"String","sendInvitation":false,"sendAccountActivationEmail":false}],"additionalData":{"licensePlates":["String"],"comment":"String","welcomeMessage":"String","company":"String","accessCards":[{"cardNumber":"String","thingIds":["00000000000000000000000000000000"]}]},"visitData":{"visitType":1,"checkin":-62135596800000,"checkout":-62135596800000,"doesNotContainTimeInfo":false},"accessTemplates":[{"id":"00000000000000000000000000000000","name":"String","description":"String","isAvailable":false,"occupiedUntil":-62135596800000,"reservationIdentifier":"String","accessCodeInitializationStrategy":0,"tags":[{"id":"00000000000000000000000000000000","name":"String","tagGroupId":"00000000000000000000000000000000"}],"smartspaces":[{"id":"00000000000000000000000000000000","name":"String","accessFrom":"00:00:00","accessTo":"00:00:00","accessCount":0,"accessCardNumbers":"String"}],"things":[{"id":"00000000000000000000000000000000","organizationId":"00000000000000000000000000000000","thingId":"00000000000000000000000000000000","thingName":"String","thingTypeName":"String","exclusive":false,"availableFrom":0,"availableTo":0,"accessCount":0,"accessLevel":"String","permission":["String"]}]}],"externalId":"String","reservationGuestInfos":[{"guestFirstName":"String","guestLastName":"String","country":"String","dateOfBirth":-62135596800000,"documentType":1,"documentNumber":"String","gender":1,"timestamp":-62135596800000,"email":"String"}]},"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}