# Fetch the payroll period queue

**Requires scope:** `payroll_hours`.
Dyflexis allows the user to "send" a locked payroll period for external processing. These payroll periods are then added to a queue which you can fetch using this endpoint.
Each entry in this list has a unique queue id and a URL you can use to fetch the payroll information.
The endpoint will list all queue items that have been created after `lastQueueId`, limited to a maximum of 10 items, so you can easily see whether there are new queue items to process.
Use `0` as `lastQueueId` to get the very first 10 queue items.
You will need to keep track of which queue ids you have already processed in order to prevent processing remuneration information more than once.

Endpoint: GET /api2/payroll/queue/from/{lastQueueId}
Security: apiKey

## Path parameters:

  - `lastQueueId` (integer, required)
    Queue id of the last item you processed; the response contains only items with a higher id. Use 0 on the first call.

## Response 200 fields (application/json):

  - `payrollPeriodQueue` (array)

  - `payrollPeriodQueue.queueId` (integer)
    Unique id for this dataset
    Example: 1

  - `payrollPeriodQueue.created` (string)
    Dataset creation date and time
    Example: 2026-08-13 11:55:07

  - `payrollPeriodQueue.officeId` (integer)
    Unique identifier of the office.
    Example: 1

  - `payrollPeriodQueue.officeName` (string)
    Slug of the office name.
    Example: office-name

  - `payrollPeriodQueue.status` (string | null)
    Last known status for this queue entry
    Example: in progress

  - `payrollPeriodQueue.url` (string)
    Fully-qualified URL to GET the payroll period hours for this item. Points at the `/api2/payroll/hours/{office}/{contractTypeGroup}/{period}` endpoint.
    Example: https://app.dyflexis.com/{systemName}/api2/payroll/hours/harborview-grand-hotel/hospitality-permanent/2026-P01

  - `payrollPeriodQueue.statusUpdateUrl` (string)
    Fully-qualified URL to POST a status update for this item. This is the `url` value with `/status` appended (`/api2/payroll/hours/{office}/{contractTypeGroup}/{period}/status`).
    Example: https://app.dyflexis.com/{systemName}/api2/payroll/hours/harborview-grand-hotel/hospitality-permanent/2026-P01/status

## Response 401 fields (application/json):

  - `title` (string, required)
    Short, human-readable summary of the error.
    Example: Unauthorized

  - `status` (integer, required)
    The HTTP status code.
    Example: 401

  - `message` (string, required)
    Human-readable explanation of this occurrence of the error.
    Example: Invalid Token

  - `detail` (string)
    Human-readable explanation of this occurrence. Not returned by all backend versions.
    Example: Invalid Token

  - `code` (integer)
    The HTTP status code (duplicate of `status`). Not returned by all backend versions.
    Example: 401

## Response 403 fields (application/json):

  - `title` (string, required)
    Short, human-readable summary of the error.
    Example: Unauthorized

  - `status` (integer, required)
    The HTTP status code.
    Example: 401

  - `message` (string, required)
    Human-readable explanation of this occurrence of the error.
    Example: Invalid Token

  - `detail` (string)
    Human-readable explanation of this occurrence. Not returned by all backend versions.
    Example: Invalid Token

  - `code` (integer)
    The HTTP status code (duplicate of `status`). Not returned by all backend versions.
    Example: 401

