Parameters

Parameter

Type

Required

Description

name

String

Yes

The name of the role.

color

String

Yes

The 6-character hex code for the role (i.e. "00ff00" would be green).

location_id

Integer

Yes

The location ID this role is to be assigned to.

department_id

Integer

No
(If you're using departments under the specified location_id, then department_id is required)

The ID of the department this role is to be assigned to.

Example response

{
  "status": "success",
  "data": {
    "role": {
      "id": 123456,
      "location_id": 123,
      "department_id": 1234,
      "job_code": "",
      "color": "00ff00",
      "stations": 0,
      "name": "Bartender",
      "created": "2021-08-04 21:46:26",
      "modified": "2021-08-04 21:46:26",
      "sort": 0
    }
  },
  "message": "Role added."
}
Language
Authentication
Basic
base64
:
Response
Click Try It! to start a request and see the response here!