Connector API
Search…
Resources

Get all resources

Returns all resources of an enterprise associated with the connector integration. Note that when any of the extents is set to true, the response contains the entities that are associated to a resource. If the extent is not associated to a resource (e.g. resource category not assigned to any resource), this information is not returned.

Request

[PlatformAddress]/api/connector/v1/resources/getAll
1
{
2
"ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D",
3
"AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D",
4
"Client": "Sample Client 1.0.0",
5
"Extent": {
6
"Resources": true,
7
"ResourceCategories": false,
8
"ResourceCategoryAssignments": false,
9
"ResourceCategoryImageAssignments": false,
10
"ResourceFeatures": false,
11
"ResourceFeatureAssignments": false,
12
"Inactive": false
13
}
14
}
Copied!
Property
Type
Contract
Description
ClientToken
string
required
Token identifying the client application.
AccessToken
string
required
Access token of the client application.
Client
string
required
Name and version of the client application.
Extent
required
Extent of data to be returned.

Resource extent

Property
Type
Contract
Description
Resources
bool
optional
Whether the response should contain resources.
ResourceCategories
bool
optional
Whether the response should contain categories.
ResourceCategoryAssignments
bool
optional
Whether the response should contain assignments of the resources to categories.
ResourceCategoryImageAssignments
bool
optional
Whether the response should contain assignments of the images to categories.
ResourceFeatures
bool
optional
Whether the response should contain resource features.
ResourceFeatureAssignments
bool
optional
Whether the response should contain assignments of the resources to features.
Inactive
bool
optional
Whether the response should contain inactive entities.

Response

1
{
2
"Resources": [
3
{
4
"Id": "5ee074b1-6c86-48e8-915f-c7aa4702086f",
5
"IsActive": true,
6
"Name": "101",
7
"ParentResourceId": null,
8
"State": "Dirty",
9
"Descriptions": {},
10
"Data": {
11
"Discriminator": "Space",
12
"Value": {
13
"FloorNumber": "3",
14
"LocationNotes": "A1"
15
}
16
},
17
"CreatedUtc": "2016-03-29T15:14:06Z",
18
"UpdatedUtc": "2016-03-29T15:14:06Z"
19
},
20
{
21
"Id": "c32386aa-1cd2-414a-a823-489325842fbe",
22
"IsActive": true,
23
"Name": "102",
24
"ParentResourceId": null,
25
"State": "Inspected",
26
"Descriptions": {
27
"en-US": "Resource description"
28
},
29
"Data": {
30
"Discriminator": "Space",
31
"Value": {
32
"FloorNumber": "3",
33
"LocationNotes": "B2"
34
}
35
},
36
"CreatedUtc": "2016-03-29T15:14:06Z",
37
"UpdatedUtc": "2016-03-29T15:14:06Z"
38
}
39
],
40
"ResourceCategories": [
41
{
42
"Id": "aaed6e21-1c1f-4644-9872-e53f96a21bf9",
43
"ServiceId": "24e2ead5-65a8-4ed9-8286-abdb00f08a1f",
44
"IsActive": true,
45
"Names": {
46
"en-US": "Best Room"
47
"ShortNames":{
48
"en-US": "BR"
49
},
50
"Descriptions": {},
51
"Ordering": 0,
52
"Capacity": 2,
53
"ExtraCapacity": 0
54
}
55
],
56
"ResourceCategoryAssignments": [
57
{
58
"Id": "032298ad-b1b8-4936-9420-415a2152304a",
59
"IsActive": true,
60
"ResourceId": "5ee074b1-6c86-48e8-915f-c7aa4702086f",
61
"CategoryId": "aaed6e21-1c1f-4644-9872-e53f96a21bf9",
62
"CreatedUtc": "2016-03-29T15:14:06Z",
63
"UpdatedUtc": "2016-03-29T15:14:06Z"
64
}
65
],
66
"ResourceCategoryImageAssignments": [
67
{
68
"Id": "f3475243-5962-4fb5-bdfd-958f9c65520e",
69
"IsActive": true,
70
"CategoryId": "aaed6e21-1c1f-4644-9872-e53f96a21bf9",
71
"ImageId": "8cd435e0-f024-44a0-84fd-abe300b8ae1c",
72
"CreatedUtc": "2016-03-29T15:14:06Z",
73
"UpdatedUtc": "2016-03-29T15:14:06Z"
74
}
75
],
76
"ResourceFeatures": [
77
{
78
"Id": "a693dd8c-21fe-4dae-b450-ea3bd9ab3bb0",
79
"ServiceId": "24e2ead5-65a8-4ed9-8286-abdb00f08a1f",
80
"IsActive": true,
81
"Classification": "AccessibleBathroom",
82
"Names": {
83
"en-US": "Accessible Bathroom"
84
},
85
"ShortNames": {
86
"en-US": "AccessBath"
87
},
88
"Descriptions": {}
89
}
90
],
91
"ResourceFeatureAssignments": [
92
{
93
"Id": "ca2b5bf9-24f5-4faa-95ef-b65d38598b08",
94
"IsActive": true,
95
"ResourceId": "18019693-c66f-4be8-a893-c3d89fd291cc",
96
"FeatureId": "a693dd8c-21fe-4dae-b450-ea3bd9ab3bb0",
97
"CreatedUtc": "2016-03-29T15:14:06Z",
98
"UpdatedUtc": "2016-03-29T15:14:06Z"
99
}
100
]
101
}
Copied!
Property
Type
Contract
Description
Resources
array of Resource
optional
The resources of the enterprise.
ResourceCategories
array of Resource category
optional
Categories of resources in the enterprise.
ResourceCategoryAssignments
optional
Assignments of resources to categories.
ResourceCategoryImageAssignments
optional
Assignments of images to categories.
ResourceFeatures
array of Resource feature
optional
Features of resources in the enterprise.
ResourceFeatureAssignments
optional
Assignments of resource features to resources.

Resource

Property
Type
Contract
Description
Id
string
required
Unique identifier of the resource.
IsActive
bool
required
Whether the resource is still active.
Name
string
required
Name of the resource (e.g. room number).
ParentResourceId
string
optional
Identifier of the parent Resource (e.g. room of a bed).
State
string Resource state
required
State of the resource.
Data
required
Additional data of the resource.
CreatedUtc
string
required
Creation date and time of the resource in UTC timezone in ISO 8601 format.
UpdatedUtc
string
required
Last update date and time of the resource in UTC timezone in ISO 8601 format.

Resource state

  • Dirty
  • Clean
  • Inspected
  • OutOfService
  • OutOfOrder

Resource data

Property
Type
Contract
Description
Discriminator
required
If resource is space, object or person.
Value
object
required
Based on Resource data discriminator, e.g. Space resource data

Resource data discriminator

  • Space
  • Object
  • Person

Space resource data

Property
Type
Contract
Description
FloorNumber
string
required
Number of the floor the space is on.
LocationNotes
string
optional
Location notes for the space. It can be eg. Building number the space is located in or the Parking area the particular parking space is at.

Object resource data

Person resource data

Resource category

Property
Type
Contract
Description
Id
string
required
Unique identifier of the category.
IsActive
bool
required
Whether the category is still active.
Type
required
Type of the category.
Names
required
All translations of the name.
ShortNames
required
All translations of the short name.
Descriptions
required
All translations of the description.
Ordering
number
required
Ordering of the category, lower number corresponds to lower category (note that uniqueness nor continuous sequence is guaranteed).
Capacity
number
required
Capacity that can be served (e.g. bed count).
ExtraCapacity
number
required
Extra capacity that can be served (e.g. extra bed count).

Resource category type

  • Room
  • Dorm
  • Bed
  • ...

Resource category assignment

Property
Type
Contract
Description
Id
string
required
Unique identifier of the assignment.
IsActive
bool
required
Whether the assignment is still active.
CategoryId
string
required
Unique identifier of the Resource category.
ResourceId
string
required
Unique identifier of the Resource assigned to the Resource category.
CreatedUtc
string
required
Creation date and time of the assignment in UTC timezone in ISO 8601 format.
UpdatedUtc
string
required
Last update date and time of the assignment in UTC timezone in ISO 8601 format.

Resource category image assignment

Property
Type
Contract
Description
Id
string
required
Unique identifier of the assignment.
IsActive
bool
required
Whether the assignment is still active.
CategoryId
string
required
Unique identifier of the Resource category.
ImageId
string
required
Unique identifier of the image assigned to the Resource category.
CreatedUtc
string
required
Creation date and time of the assignment in UTC timezone in ISO 8601 format.
UpdatedUtc
string
required
Last update date and time of the assignment in UTC timezone in ISO 8601 format.

Localized text

An object where keys are the Language codes and values texts in respective languages.

Resource feature

Property
Type
Contract
Description
Id
string
required
Unique identifier of the feature.
ServiceId
string
required
Unique identifier of the Service.
IsActive
bool
required
Whether the resource feature is still active.
Classification
required
Classification of the feature.
Names
required
All translations of the name.
ShortNames
required
All translations of the short name.
Descriptions
required
All translations of the description.

Resource feature classification

  • AccessibleBathroom
  • AccessibleRoom
  • AirConditioning
  • Balcony
  • DoubleBed
  • ElevatorAccess
  • EnsuiteRoom
  • HighFloor
  • Kitchenette
  • LowerBed
  • OceanView
  • PrivateBathroom
  • PrivateJacuzzi
  • PrivateSauna
  • RiverView
  • RollawayBed
  • SharedBathroom
  • TwinBeds
  • UpperBed
  • SeaView
  • ...

Resource feature assignment

Property
Type
Contract
Description
Id
string
required
Unique identifier of the assignment.
IsActive
bool
required
Whether the assignment is still active.
ResourceId
string
required
Unique identifier of the Resource.
FeatureId
string
required
Unique identifier of the Resource feature assigned to the Resource.
CreatedUtc
string
required
Creation date and time of the assignment in UTC timezone in ISO 8601 format.
UpdatedUtc
string
required
Last update date and time of the assignment in UTC timezone in ISO 8601 format.

Update resources

Updates details of the resources.

Request

[PlatformAddress]/api/connector/v1/resources/update
1
{
2
"ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D",
3
"AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D",
4
"Client": "Sample Client 1.0.0",
5
"ResourceUpdates": [
6
{
7
"ResourceId": "5ee074b1-6c86-48e8-915f-c7aa4702086f",
8
"Name": {
9
"Value": "0101"
10
},
11
"ParentResourceId": null,
12
"Data":
13
{
14
"Discriminator": "Space",
15
"Value": {
16
"FloorNumber": {
17
"Value": "1"
18
},
19
"LocationNotes": {
20
"Value": "A1"
21
}
22
}
23
},
24
"State": {
25
"Value": "Clean"
26
},
27
"StateReason": {
28
"Value": "Sample reason"
29
}
30
}
31
]
32
}
Copied!
Property
Type
Contract
Description
ClientToken
string
required
Token identifying the client application.
AccessToken
string
required
Access token of the client application.
Client
string
required
Name and version of the client application.
ResourceUpdates
array of Resource update
required
Resource updates.

Resource update

Property
Type
Contract
Description
ResourceId
string
required
Unique identifier of the Resource which is updated.
Name
optional
New name of the resource (e.g. room number).
ParentResourceId
optional
Identifier of the new parent Resource.
Data
optional
New additional data of the resource.
State
optional
New Resource state except OutOfOrder.
StateReason
optional
New reason for the state of the resource.

Resource data update

Property
Type
Contract
Description
Discriminator
required
Defines the type of the resource.
Value
object
required
Based on Resource data discriminator, e.g. Space resource data update

Space resource data update

Property
Type
Contract
Description
FloorNumber
required
New number of the floor the space is on.
LocationNotes
optional
New location notes for the space.

String update value

Property
Type
Contract
Description
Value
string
optional
Value which is to be updated.

Response

1
{}
Copied!