Skip to content

Getting permission values and user role

Request

Returns the role and configured permission values for the specified Business User at this Location. The caller needs permission to view Location users. The user must be linked to the Location; otherwise the endpoint returns 404. For the authenticated caller's effective permissions, use GET /user/permissions/{location_id} instead.

Security
BearerPartnerUser
Path
location_idnumberrequired

ID of a location.

Example:123
user_idnumberrequired

ID of a user.

Example:123
Headers
Acceptstringrequired

Required B2B v2 response media type. Use application/vnd.api.v2+json. A charset parameter is also accepted.

Default:"application/vnd.api.v2+json"
Example:application/vnd.api.v2+json
Content-Typestringrequired

Should be equal to application/json

Example:application/json
curl -i -X GET \
  https://developer.alteg.io/_mock/en/b2b-v1/openapi/locations/123/users/123/permissions \
  -H 'Accept: application/vnd.api.v2+json' \
  -H 'Authorization: Bearer <YOUR_Bearer {PartnerToken}, User {UserToken}_HERE>' \
  -H 'Content-Type: application/json'

Responses

OK

Bodyapplication/json
successboolean(Successful response status)

Response status.

Example:true
dataobject(Model object "Permissions and user role")

Data on the permissions and user role

Example:
{ "is_editable": true, "staff_id": 12345, "user_role": "owner", "has_any_paid_permission": null, "user_permissions": [ { … }, { … }, { … } ] }
metaArray of any or object(Empty meta object)

Additional response data (empty object or empty array)

Example:
{}
Response
{ "success": true, "data": { "user_role": "manager", "staff_id": 42, "is_editable": true, "has_any_paid_permission": false, "user_permissions": [ … ] }, "meta": [] }