Skip to content
Get started

List Assignments

get/v1/time_off/assignments

Time off assignments are mappings between workers and time off policies. Useful for finding out which policies a worker is assigned to, or which workers are assigned to a given policy.

Query ParametersExpand Collapse
afterId: optional string
beforeId: optional string
limit: optional string

a number less than or equal to 100

policyIds: optional array of string
workerIds: optional array of string
ReturnsExpand Collapse
count: number

an integer

data: array of object { id, assignedAt, policyId, workerId }
id: string
assignedAt: string

a string to be decoded into a Date

policyId: string

a string starting with "top_"

workerId: string

The id of the worker.

hasMore: boolean
curl https://api.joinwarp.com/v1/time_off/assignments \
    -H "x-api-key: $WARP_API_KEY"
{
  "count": 0,
  "data": [
    {
      "id": "id",
      "assignedAt": "assignedAt",
      "policyId": "top_1234",
      "workerId": "wrk_1234"
    }
  ],
  "hasMore": true
}
Returns Examples
{
  "count": 0,
  "data": [
    {
      "id": "id",
      "assignedAt": "assignedAt",
      "policyId": "top_1234",
      "workerId": "wrk_1234"
    }
  ],
  "hasMore": true
}