Viviot.Api

<back to all web services

GetReservationAccessTemplates

Requires Authentication
Requires any of the roles:Admin, TenantAdmin, AccessAdmin, Receptionist
The following routes are available for this service:
GET/reservation/accessTemplatesGets a list of access templates with corresponding smartspaces and availability status for the reservation screen.
GetReservationAccessTemplates Parameters:
NameParameterData TypeRequiredDescription
AvailableFromquerystringYesGets or sets the available from time in UTC.
AvailableToquerystringNoGets or sets the available to time in UTC.
ThingTypeIdquerystringNoFilter result by thing type ID (optional).
AvailableOnlyquerystringNoWhether to return access templates with available things only. Default FALSE.
BaseRequest Parameters:
NameParameterData TypeRequiredDescription
VersionformintegerNoApi version
ReservationAccessTemplatesResponse Parameters:
NameParameterData TypeRequiredDescription
DataformList<ReservationAccessTemplateView>No
BaseResponse Parameters:
NameParameterData TypeRequiredDescription
ResponseStatusformResponseStatusNo
ReservationAccessTemplateView Parameters:
NameParameterData TypeRequiredDescription
IdformGuidNo
NameformstringNo
DescriptionformstringNo
IsAvailableformboolNo
TagsformList<TagDto>No
SmartspacesformList<ReservationSmartSpaceDto>No
TagDto Parameters:
NameParameterData TypeRequiredDescription
IdformGuidNo
NameformstringNo
TagGroupIdformGuidNo
ReservationSmartSpaceDto Parameters:
NameParameterData TypeRequiredDescription
IdformGuidNo
NameformstringNo
AccessFromformTimeSpan?No
AccessToformTimeSpan?No
AccessCountformint?No
AccessCardNumbersformstringNo

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

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /reservation/accessTemplates HTTP/1.1 
Host: api.4spaces.io 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	data: 
	[
		{
			id: 00000000000000000000000000000000,
			name: String,
			description: String,
			isAvailable: False,
			tags: 
			[
				{
					id: 00000000000000000000000000000000,
					name: String,
					tagGroupId: 00000000000000000000000000000000
				}
			],
			smartspaces: 
			[
				{
					id: 00000000000000000000000000000000,
					name: String,
					accessFrom: PT0S,
					accessTo: PT0S,
					accessCount: 0,
					accessCardNumbers: String
				}
			]
		}
	],
	responseStatus: 
	{
		errorCode: String,
		message: String,
		stackTrace: String,
		errors: 
		[
			{
				errorCode: String,
				fieldName: String,
				message: String,
				meta: 
				{
					String: String
				}
			}
		],
		meta: 
		{
			String: String
		}
	}
}