Viviot.Api

<back to all web services

InsertReservation

Requires Authentication
Requires any of the roles:Admin, TenantAdmin, AccessAdmin, Receptionist
The following routes are available for this service:
POST/reservationInserts a new reservation by a business user.
InsertReservation Parameters:
NameParameterData TypeRequiredDescription
GuestsbodyList<ReservationGuestDto>YesList of reservation guests.
AdditionalDatabodyReservationAdditionalDataDtoYesConfiguration of license plates, guest comments/requests and etc.
VisitDatabodyReservationVisitDataDtoYesConfiguration of visit type and checkin/checkout dates.
AccessTemplatesbodyList<ReservationAccessTemplateDto>YesList of selected access templates with configured smart space accesses.
BaseRequest Parameters:
NameParameterData TypeRequiredDescription
VersionformintegerNoApi version
ReservationGuestDto Parameters:
NameParameterData TypeRequiredDescription
IdformGuid?No
ViviotIdformstringNo
GuestFirstNameformstringNo
GuestLastNameformstringNo
EmailformstringNo
PhoneformstringNo
GuestTypeformGuestTypeNo
Iso3166alpha2CodeformstringNo
SendInvitationformboolNo
SendAccountActivationEmailformboolNo
GuestType Enum:
NameValue
Business1
Leisure2
ReservationAdditionalDataDto Parameters:
NameParameterData TypeRequiredDescription
LicensePlatesformList<string>No
CommentformstringNo
WelcomeMessageformstringNo
CompanyformstringNo
AccessCardsformList<AccessCardDataDto>No
AccessCardDataDto Parameters:
NameParameterData TypeRequiredDescription
CardNumberformstringNo
ThingIdsformList<Guid>No
ReservationVisitDataDto Parameters:
NameParameterData TypeRequiredDescription
VisitTypeformVisitTypeNo
CheckinformDateTime?No
CheckoutformDateTime?No
DoesNotContainTimeInfoformbool?No
VisitType Enum:
NameValue
DateTime1
AccessCount2
ReservationAccessTemplateDto Parameters:
NameParameterData TypeRequiredDescription
IdformGuidNo
NameformstringNo
DescriptionformstringNo
IsAvailableformboolNo
OccupiedUntilformDateTime?No
ReservationIdentifierformstringNo
AccessCodeInitializationStrategyformintNo
TagsformList<TagDto>No
SmartspacesformList<ReservationSmartSpaceDto>No
ThingsformList<ThingAccessTemplateDto>No
TagDto Parameters:
NameParameterData TypeRequiredDescription
IdformGuidNo
NameformstringNo
TagGroupIdformGuidNo
ReservationSmartSpaceDto Parameters:
NameParameterData TypeRequiredDescription
IdformGuidNo
NameformstringNo
AccessFromformTimeSpan?No
AccessToformTimeSpan?No
AccessCountformint?No
AccessCardNumbersformstringNo
ThingAccessTemplateDto Parameters:
NameParameterData TypeRequiredDescription
IdformGuid?No
OrganizationIdformGuidNo
ThingIdformGuidNo
ThingNameformstringNo
ThingTypeNameformstringNo
ExclusiveformboolNo
AvailableFromformint?No
AvailableToformint?No
AccessCountformint?No
AccessLevelformstringNo
PermissionformList<string>No
ReservationResponse Parameters:
NameParameterData TypeRequiredDescription
DataformReservationViewNo
BaseResponse Parameters:
NameParameterData TypeRequiredDescription
ResponseStatusformResponseStatusNo
ReservationView Parameters:
NameParameterData TypeRequiredDescription
IdformGuidNo
StateformReservationStateNo
ReasonDeniedformstringNo
GuestsformList<ReservationGuestDto>No
AdditionalDataformReservationAdditionalDataDtoNo
VisitDataformReservationVisitDataDtoNo
AccessTemplatesformList<ReservationAccessTemplateDto>No
ExternalIdformstringNo
HasReservationQrCodeformboolNo
ReservationGuestInfosformList<ReservationGuestInfoDto>No
ReservationState Enum:
NameValue
New0
Assigned10
WaitingForConfirmation15
PendingActivation20
Active30
Expired40
Denied50
Cancelled60
ReservationGuestInfoDto Parameters:
NameParameterData TypeRequiredDescription
GuestFirstNameformstringNo
GuestLastNameformstringNo
CountryformstringNo
DateOfBirthformDateTimeNo
DocumentTypeformIdDocumentTypeNo
DocumentNumberformstringNo
GenderformGenderNo
TimestampformDateTimeNo
EmailformstringNo
IdDocumentType Enum:
NameValue
ObmejnaPrepustnica1
PotneListinePoMednarodniPogodbi2
OsebnaIzkaznica3
OrozniList4
PotniList5
UpravneListine6
VozniskoDovoljenje7
Gender Enum:
NameValue
Male1
Female2

To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv

HTTP + CSV

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: text/csv
Content-Type: text/csv
Content-Length: length

{Unable to show example output for type 'InsertReservation' using the custom 'csv' filter}One or more errors occurred. (Unable to cast object of type 'ServiceStack.Host.BasicResponse' to type 'ServiceStack.Host.NetCore.NetCoreResponse'.)
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{Unable to show example output for type 'ReservationResponse' using the custom 'csv' filter}One or more errors occurred. (Unable to cast object of type 'ServiceStack.Host.BasicResponse' to type 'ServiceStack.Host.NetCore.NetCoreResponse'.)