Connector API
Search
K

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. Note this operation uses Pagination and supports Portfolio Access Tokens.

Request

[PlatformAddress]/api/connector/v1/resources/getAll
{
"ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D",
"AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D",
"Client": "Sample Client 1.0.0",
"EnterpriseIds": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6",
"4d0201db-36f5-428b-8d11-4f0a65e960cc"
],
"ResourceIds": [
"5ee074b1-6c86-48e8-915f-c7aa4702086f",
"c32386aa-1cd2-414a-a823-489325842fbe"
],
"CreatedUtc": {
"StartUtc": "2022-10-15T00:00:00Z",
"EndUtc": "2022-10-20T00:00:00Z"
},
"UpdatedUtc": {
"StartUtc": "2022-10-15T00:00:00Z",
"EndUtc": "2022-10-20T00:00:00Z"
},
"Extent": {
"Resources": true,
"ResourceCategories": false,
"ResourceCategoryAssignments": false,
"ResourceCategoryImageAssignments": false,
"ResourceFeatures": false,
"ResourceFeatureAssignments": false,
"Inactive": false
},
"Limitation": { "Count": 10 }
}
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.
EnterpriseIds
array of string
optional, max 1000 items
Unique identifiers of the Enterprises. If not specified, the operation returns data for all enterprises within scope of the Access Token.
ResourceIds
string
optional, max 1000 items
Unique identifiers of the requested Resources.
CreatedUtc
optional, max length 3 months
Interval in which the Resources were created.
UpdatedUtc
optional, max length 3 months
Interval in which the Resources were updated.
Extent
required
Extent of data to be returned.
Limitation
required
Limitation on the quantity of data 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. Deprecated! Please use Get all resource categories
ResourceCategoryAssignments
bool
optional
Whether the response should contain assignments of the resources to categories. Deprecated! Please use Get all resource category assignments
ResourceCategoryImageAssignments
bool
optional
Whether the response should contain assignments of the images to categories. Deprecated! Please use Get all resource category image assignments
ResourceFeatures
bool
optional
Whether the response should contain resource features. Deprecated! Please use Get all resource features
ResourceFeatureAssignments
bool
optional
Whether the response should contain assignments of the resources to features. Deprecated! Please use Get all resource feature assignments
Inactive
bool
optional
Whether the response should contain inactive entities.

Response

{
"Resources": [
{
"Id": "5ee074b1-6c86-48e8-915f-c7aa4702086f",
"EnterpriseId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"IsActive": true,
"Name": "101",
"ParentResourceId": null,
"State": "Dirty",
"Descriptions": {},
"Data": {
"Discriminator": "Space",
"Value": {
"FloorNumber": "3",
"LocationNotes": "A1"
}
},
"CreatedUtc": "2016-03-29T15:14:06Z",
"UpdatedUtc": "2016-03-29T15:14:06Z"
},
{
"Id": "c32386aa-1cd2-414a-a823-489325842fbe",
"EnterpriseId": "4d0201db-36f5-428b-8d11-4f0a65e960cc",
"IsActive": true,
"Name": "102",
"ParentResourceId": null,
"State": "Inspected",
"Descriptions": {
"en-US": "Resource description"
},
"Data": {
"Discriminator": "Space",
"Value": {
"FloorNumber": "3",
"LocationNotes": "B2"
}
},
"CreatedUtc": "2016-03-29T15:14:06Z",
"UpdatedUtc": "2016-03-29T15:14:06Z"
}
],
"ResourceCategories": [
"Id": "aaed6e21-1c1f-4644-9872-e53f96a21bf9",
"ServiceId": "24e2ead5-65a8-4ed9-8286-abdb00f08a1f",
"IsActive": true,
"Names": {
"en-US": "Best Room"
}
"ShortNames":{
"en-US": "BR"
},
"Descriptions": {},
"Ordering": 0,
"Capacity": 2,
"ExtraCapacity": 0,
"ExternalIdentifier": "RT001-BestRoom"
],
"ResourceCategoryAssignments": [
{
"Id": "032298ad-b1b8-4936-9420-415a2152304a",
"IsActive": true,
"ResourceId": "5ee074b1-6c86-48e8-915f-c7aa4702086f",
"CategoryId": "aaed6e21-1c1f-4644-9872-e53f96a21bf9",
"CreatedUtc": "2016-03-29T15:14:06Z",
"UpdatedUtc": "2016-03-29T15:14:06Z"
}
],
"ResourceCategoryImageAssignments": [
{
"Id": "f3475243-5962-4fb5-bdfd-958f9c65520e",
"IsActive": true,
"CategoryId": "aaed6e21-1c1f-4644-9872-e53f96a21bf9",
"ImageId": "8cd435e0-f024-44a0-84fd-abe300b8ae1c",
"CreatedUtc": "2016-03-29T15:14:06Z",
"UpdatedUtc": "2016-03-29T15:14:06Z"
}
],
"ResourceFeatures": [
{
"Id": "a693dd8c-21fe-4dae-b450-ea3bd9ab3bb0",
"ServiceId": "24e2ead5-65a8-4ed9-8286-abdb00f08a1f",
"IsActive": true,
"Classification": "AccessibleBathroom",
"Names": {
"en-US": "Accessible Bathroom"
},
"ShortNames": {
"en-US": "AccessBath"
},
"Descriptions": {}
}
],
"ResourceFeatureAssignments": [
{
"Id": "ca2b5bf9-24f5-4faa-95ef-b65d38598b08",
"IsActive": true,
"ResourceId": "18019693-c66f-4be8-a893-c3d89fd291cc",
"FeatureId": "a693dd8c-21fe-4dae-b450-ea3bd9ab3bb0",
"CreatedUtc": "2016-03-29T15:14:06Z",
"UpdatedUtc": "2016-03-29T15:14:06Z"
}
],
"Cursor": "c32386aa-1cd2-414a-a823-489325842fbe"
}
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. Deprecated!
ResourceCategoryAssignments
optional
Assignments of resources to categories. Deprecated!
ResourceCategoryImageAssignments
optional
Assignments of images to categories. Deprecated!
ResourceFeatures
array of Resource feature
optional
Features of resources in the enterprise. Deprecated!
ResourceFeatureAssignments
optional
Assignments of resource features to resources. Deprecated!
Cursor
string
optional
Unique identifier of the item one newer in time order than the items to be returned. If Cursor is not specified, i.e. null, then the latest or most recent items will be returned.

Resource

Property
Type
Contract
Description
Id
string
required
Unique identifier of the resource.
EnterpriseId
string
required
Unique identifier of the Enterprise.
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 neither uniqueness nor continuous sequence is guaranteed).
ExtraCapacity
number
required
Extra capacity that can be served (e.g. extra bed count).
ExternalIdentifier
string
optional, max 255 characters
Identifier of the resource category from external system.

Resource category type

  • Room
  • Dorm
  • Bed
  • ...

Update resources

Updates details of the resources.

Request

[PlatformAddress]/api/connector/v1/resources/update
{
"ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D",
"AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D",
"Client": "Sample Client 1.0.0",
"ResourceUpdates": [
{
"ResourceId": "5ee074b1-6c86-48e8-915f-c7aa4702086f",
"Name": {
"Value": "0101"
},
"ParentResourceId": null,
"Data":
{
"Discriminator": "Space",
"Value": {
"FloorNumber": {
"Value": "1"
},
"LocationNotes": {
"Value": "A1"
}
}
},
"State": {
"Value": "Clean"
},
"StateReason": {
"Value": "Sample reason"
}
}
]
}
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.

Response

{}