Job Roles
GET /external/v1/job-roles
Returns all job roles defined for your company.
Query Parameters
None.
Response
[
{
"id": "role-uuid-1",
"title": "Cashier",
"weeklyHours": 40
},
{
"id": "role-uuid-2",
"title": "Supervisor",
"weeklyHours": 45
},
{
"id": "role-uuid-3",
"title": "Security Guard",
"weeklyHours": 48
}
]
Response Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique job role ID |
title | string | Job role name |
weeklyHours | number | null | Expected weekly hours for this role |
Example
curl -X GET "https://api.suprsync.com/external/v1/job-roles" \
-H "x-api-key: api_your_client_id" \
-H "x-api-secret: sec_your_client_secret"
Create Job Role
POST /external/v1/job-roles
Creates a new job role.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
title | string | Yes | Role name |
weeklyHours | number | No | Expected weekly hours |
desc | string | No | Description |
hexcode | string | No | Color code |
symbol | string | No | Short abbreviation |
dailyRequired | number | No | Daily minimum staff |
curl -X POST "https://api.suprsync.com/external/v1/job-roles" \
-H "x-api-key: api_your_client_id" \
-H "x-api-secret: sec_your_client_secret" \
-H "Content-Type: application/json" \
-d '{ "title": "Security Guard", "weeklyHours": 48 }'
Response (201 Created)
{
"id": "role-uuid-new",
"title": "Security Guard",
"weeklyHours": 48
}
Update Job Role
PATCH /external/v1/job-roles/:id
Updates an existing job role.
curl -X PATCH "https://api.suprsync.com/external/v1/job-roles/role-uuid-1" \
-H "x-api-key: api_your_client_id" \
-H "x-api-secret: sec_your_client_secret" \
-H "Content-Type: application/json" \
-d '{ "title": "Senior Security Guard", "weeklyHours": 45 }'
Response (200 OK)
{
"id": "role-uuid-1",
"title": "Senior Security Guard",
"weeklyHours": 45
}
Delete Job Role
DELETE /external/v1/job-roles/:id
Soft-deletes a job role. The role will no longer appear in listings.
curl -X DELETE "https://api.suprsync.com/external/v1/job-roles/role-uuid-1" \
-H "x-api-key: api_your_client_id" \
-H "x-api-secret: sec_your_client_secret"
Response (200 OK)
{
"message": "Job role deleted"
}
Notes
- Results are ordered alphabetically by title.
- Only active (non-deleted) job roles are returned.
- Use the
idfield to filter shifts and staff by job role via other endpoints. - Plan limits on job roles are bypassed for external API clients.