Sub-user places
Which of the master account's places a sub-user can see.
These operations set which places a sub-user can see. Places are scoped separately from trackers, so a sub-user's place list is bound here rather than following from their trackers.
Two list operations exist because they answer different questions: list_ids returns only the IDs, which is what a permissions screen needs, and list returns the place objects themselves.
API actions
API base path: /subuser/places.
Every operation on this page needs the multilevel_access tariff feature on all trackers, and the admin right, which is available only to master users. Failing either returns error 13 for the right and error 236 for the feature, so those two are not repeated per operation below.
Every operation here also returns error 201, Not found in the database, when the sub-user does not exist or belongs to another master user.
Give a sub-user access to places, either a named set or all of them.
Give either access_to_all or place_ids. A request with neither reports a missing parameter named has_at_least_one_parameter, which is the internal name of the validation group rather than a parameter you can send; it carries a message naming the two real choices.
Master users only, and the account needs the multilevel_access plan feature on all trackers. A sub-user calling this gets error 13, and an account without the feature gets error 236.
Requires the admin right.
Either a user session hash or an API key, with the "NVX " prefix, for example "NVX 22eac1c27af4be7b9d04da2ce1af111b". Obtain a session hash from the userAuth operation, or create an API key from the API keys operations. A small number of operations accept a session hash only and reject an API key with error code 4; each says so in its description.
ID of a sub-user belonging to the current account.
When true, the sub-user gets access to every place of the master account. Use this or place_ids.
IDs of the places to associate with the sub-user. All must belong to the current master account. Use this or access_to_all.
Places bound
true if request finished successfully.
trueBad request. The response body carries the API-level error code in status.code. Validation failures also include an errors array naming each offending parameter.
Error 236: the account lacks the multilevel_access feature.
Error 13: the caller is a sub-user.
Error response object
POST /v2/subuser/places/bind HTTP/1.1
Host: api.eu.navixy.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 53
{
"subuser_id": 1,
"access_to_all": true,
"place_ids": [
1
]
}{
"success": true
}Errors
These errors come in addition to the general error codes:
13 - The caller is a sub-user.
236 - The account lacks the
multilevel_accessfeature.
Take away a sub-user's access to places.
Master users only, and the account needs the multilevel_access plan feature on all trackers. A sub-user calling this gets error 13, and an account without the feature gets error 236.
Requires the admin right.
Either a user session hash or an API key, with the "NVX " prefix, for example "NVX 22eac1c27af4be7b9d04da2ce1af111b". Obtain a session hash from the userAuth operation, or create an API key from the API keys operations. A small number of operations accept a session hash only and reject an API key with error code 4; each says so in its description.
ID of a sub-user belonging to the current account.
IDs of the places to remove from the sub-user. All must belong to the current master account.
Places unbound
true if request finished successfully.
trueBad request. The response body carries the API-level error code in status.code. Validation failures also include an errors array naming each offending parameter.
Error 236: the account lacks the multilevel_access feature.
Error 13: the caller is a sub-user.
Error response object
POST /v2/subuser/places/unbind HTTP/1.1
Host: api.eu.navixy.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 32
{
"subuser_id": 1,
"place_ids": [
1
]
}{
"success": true
}Errors
These errors come in addition to the general error codes:
13 - The caller is a sub-user.
236 - The account lacks the
multilevel_accessfeature.
Return just the IDs of the places a sub-user can see.
Use subuser/places/list when you want the place objects themselves.
Master users only, and the account needs the multilevel_access plan feature on all trackers. A sub-user calling this gets error 13, and an account without the feature gets error 236.
Requires the admin right.
Either a user session hash or an API key, with the "NVX " prefix, for example "NVX 22eac1c27af4be7b9d04da2ce1af111b". Obtain a session hash from the userAuth operation, or create an API key from the API keys operations. A small number of operations accept a session hash only and reject an API key with error code 4; each says so in its description.
ID of a sub-user belonging to the current account.
The place IDs in the sub-user's scope
true if request finished successfully.
trueIDs of the places available to the sub-user.
Bad request. The response body carries the API-level error code in status.code. Validation failures also include an errors array naming each offending parameter.
Error 236: the account lacks the multilevel_access feature.
Error 13: the caller is a sub-user.
Error response object
POST /v2/subuser/places/list_ids HTTP/1.1
Host: api.eu.navixy.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 16
{
"subuser_id": 1
}{
"success": true,
"list": [
1
]
}Errors
These errors come in addition to the general error codes:
13 - The caller is a sub-user.
236 - The account lacks the
multilevel_accessfeature.
Return the places a sub-user can see, as full place objects, with filtering and pagination.
Master users only, and the account needs the multilevel_access plan feature on all trackers. A sub-user calling this gets error 13, and an account without the feature gets error 236.
Requires the admin right.
Either a user session hash or an API key, with the "NVX " prefix, for example "NVX 22eac1c27af4be7b9d04da2ce1af111b". Obtain a session hash from the userAuth operation, or create an API key from the API keys operations. A small number of operations accept a session hash only and reject an API key with error code 4; each says so in its description.
ID of a sub-user belonging to the current account.
Optional. Filter over place label, description, address, external ID and custom fields.
Optional. Tag IDs. A place must carry all the tags in the list to be returned.
Optional. Default id. How to order the list.
Optional. Maximum number of places to return.
Optional. Default 0. Offset into the results, for pagination.
The places in the sub-user's scope
true if request finished successfully.
trueBad request. The response body carries the API-level error code in status.code. Validation failures also include an errors array naming each offending parameter.
Error 236: the account lacks the multilevel_access feature.
Error 13: the caller is a sub-user.
Error response object
POST /v2/subuser/places/list HTTP/1.1
Host: api.eu.navixy.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 80
{
"subuser_id": 1,
"filter": "text",
"tag_ids": [
1
],
"order": "id",
"limit": 1,
"offset": 1
}{
"success": true,
"list": [
{
"id": 1,
"icon_id": null,
"avatar_file_name": null,
"location": {
"lat": 1,
"lng": 1,
"address": "text",
"radius": 1
},
"fields": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"label": "text",
"description": null,
"tags": [
1
],
"external_id": null,
"files": [
{
"ANY_ADDITIONAL_PROPERTY": "anything"
}
]
}
]
}Errors
These errors come in addition to the general error codes:
13 - The caller is a sub-user.
236 - The account lacks the
multilevel_accessfeature.
Last updated
Was this helpful?