Property Users Collection

API methods to work with Property Users

Property User is an association between a Property and an User, who can manage a property and with which role and access rights.

Property Users List

Retrieve list of properties associated with user.

Request:

GET https://staging.channex.io/api/v1/property_users?filter[property_id]=PROPERTY_ID

Returns

Success Method can return a Success result with 200 OK HTTP Code if operation is successful. Will contain a list of Property User objects in the answer. Unauthorised Error Method can return a Unauthorised Error result with 401 Unauthorized HTTP Code if wrong Bearer Token provided.

Invite User to Property

Create new Property User.

Request:

POST https://staging.channex.io/api/v1/property_users

Query body (JSON):

{
  "invite": {
    "property_id": "52397a6e-c330-44f4-a293-47042d3a3607",
    "user_email": "other_user@channex.io",
    "role": "user",
    "overrides": {}
  }
}

Fields

property_id [required]

String with valid UUID for Property object what you would use as target for invitation.

user_email [required]

String with a valid email address of invited user. Note: If user is not registered at our system, we are create they account automatically and send email with instructions to on-board into channex.io.

role [required]

String with a valid role name. Right now you can use 2 roles - owner and user.

overrides [optional]

JSON Object with access policies overrides.

Returns

Success Method can return a Success result with 201 Created HTTP Code if operation is successful. Will contain a Property User object in the answer. Bad Request Error Method can return a Bad Request Error result with 400 Bad Request HTTP Code if provided user already invited. Unauthorised Error Method can return a Unauthorised Error result with 401 Unauthorized HTTP Code if wrong Bearer Token provided. Forbidden Error Method can return a Forbidden Error result with 403 Forbidden HTTP Code if current user not have permissions to invite user into provided property.

Validation Error Method can return a Validation Error result with 422 Unprocessable Entity HTTP Code if any validation rule is failed.

Get Property User by ID

Retrieve Property User by ID.

Request:

GET https://staging.channex.io/api/v1/property_users/:id

Returns

Success Method can return a Success result with 200 OK HTTP Code if operation is successful. Will contain a Property User object in the answer. Unauthorised Error Method can return a Unauthorised Error result with 401 Unauthorized HTTP Code if wrong Bearer Token provided. Forbidden Error Method can return a Forbidden Error result with 403 Forbidden HTTP Code if current user not have permissions to call this action.

Update Property User

Update property access information.

Request:

PUT https://staging.channex.io/api/v1/property_users/:id

Query body (JSON):

{
  "property_user": {
    "role": "user",
    "overrides": null
  }
}

Fields

Through this method you can update only two fields - role and overrides. Please see Invite User to Property for more detailed information.

Returns

Success Method can return a Success result with 200 OK HTTP Code if operation is successful. Will contain a Property User object in the answer. Unauthorised Error Method can return a Unauthorised Error result with 401 Unauthorized HTTP Code if wrong Bearer Token provided. Forbidden Error Method can return a Forbidden Error result with 403 Forbidden HTTP Code if current user not have permissions to call this action. Resource Not Found Error Method can return a Resource Not Found Error result with 404 Not Found HTTP Code if requested Property User is not defined.

Validation Error Method can return a Validation Error result with 422 Unprocessable Entity HTTP Code if any validation rule is failed.

Withdraw Property User Access

Revoke Property User access to a specific property.

Request:

DELETE https://staging.channex.io/api/v1/property_users/:id

Returns

Success Method can return a Success result with 200 OK HTTP Code if operation is successful. Bad Request Error Method can return a Bad Request Error result with 400 Bad Request HTTP Code if user will try to remove them self. Unauthorised Error Method can return a Unauthorised Error result with 401 Unauthorized HTTP Code if wrong Bearer Token provided. Forbidden Error Method can return a Forbidden Error result with 403 Forbidden HTTP Code if current user not have permissions to call this action. Resource Not Found Error Method can return a Resource Not Found Error result with 404 Not Found HTTP Code if requested Property User is not defined.

Last updated