Skip to content

Labor

Reports module

GET/reports/labor-costreports.laborCost

Worked hours, timesheets and timesheets with an open entry, per readable project, from submitted time (app.timesheet_hours). Pay is Restricted and never reported here. A rule that refuses the request returns 422 with `refusal` and `reason`.

  • Requires the capability data.restricted.read.payroll.
  • OAuth scopes: data.
  • Error statuses: 400, 401, 422, 429. Errors are RFC 9457 problem details.

Path and query parameters

reports.laborCost: Path and query parameters
FieldTypeRequiredDescription
project_idstring (uuid)NoOnly this project; every visible project when omitted.

Response 200: ReportMetricRowPage

reports.laborCost: ReportMetricRowPage
FieldTypeRequiredDescription
dataarray of ReportMetricRowYesItems on this page, in the documented default order.
next_cursorstring | nullYesOpaque cursor for the next page; null on the last page.
{
  "data": [
    {
      "dimension": "NWL",
      "project_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
      "measure": "worked_hours",
      "unit": "Hours",
      "value": 312.5
    }
  ],
  "next_cursor": null
}

Code samples

curl -X GET "$XOS_BASE_URL/reports/labor-cost" \
  -H "Authorization: Bearer $XOS_API_KEY"
const { data } = await xos.reports.laborCost();
response = xos.reports.labor_cost()
xos reports labor-cost