For the complete documentation index, see llms.txt. This page is also available as Markdown.

Get the monthly service order report for a year

Get one year of service order figures broken down by month — the long-horizon report behind the KPI page, where a season is seen rather than a week. Exactly twelve entries are returned, January through December; a month nothing happened in comes back with its counts 0 and its averages and overdueRate null rather than being left out. Each month's figures are computed exactly as the figures of the same name on the service order statistics endpoint, with that month as the period: registeredCount counts the service orders registered within the month, and completedCount, avgQueueDays, avgWorkDays, avgWorkOpenDays, avgPickupDays and overdueRate read the ones completed within it. The months run in the tenant's timezone, so a service order registered late on the last evening of a month belongs to that month rather than to the next. Year against year is two calls, one per year, shown side by side. There is no comparison built into the response and no rolling window: one call answers for one year. storeUids narrows every month to the stores that own the service orders — the stores the work sits with and where the customers collect, not the stores the service orders were taken in at. Left out, every store the caller holds SERVICE_ORDER or REPORTING at is reported. The figures key on the store that owns a service order, never on the store it was taken in at: a case that has moved counts for the store it moved to, and for no other. Being able to read a case from another store, the store it was taken in at included, does not make it that store's work here. The figures count only the service orders owned by the stores the caller holds SERVICE_ORDER or REPORTING at — every store of the tenant for a tenant-wide holder, the organization's stores for an organization holder, the assigned stores for a store-level holder, the two permissions adding up — because a figure is a store's work, not a case to find; the tenant-level service order search reaches further, to every service order of the tenant, for a caller holding SERVICE_ORDER. A caller holding REPORTING and not SERVICE_ORDER is answered exactly as a caller holding SERVICE_ORDER at the same stores is. A caller holding neither, a user with no role assignments included, is refused with a 403.

Required permissions: SERVICE_ORDER,REPORTING

get
/tenants/{tenantUid}/serviceorders/reports/monthly
Authorizations
AuthorizationstringRequired

Access token recevied after user login with a deviceToken

Path parameters
tenantUidstringRequired

Reference to a tenant.

Pattern: ^[A-Za-z0-9-_]+
Query parameters
yearinteger · min: 2000 · max: 2999Required

The year the twelve months are reported for, as four digits, e.g. 2026. The months run in the tenant's timezone, so a service order registered late on the last evening of a month belongs to that month rather than the next. Two years side by side are two calls, one per year.

storeUidsstring[]Optional

Narrow every figure to the stores that own the service orders — the stores the work sits with and where the customers collect. This is the owning store, not the store a service order was taken in at, and the two differ whenever a service order has been moved between stores. Leave it out to get every store the caller holds SERVICE_ORDER or REPORTING at — every store of the tenant for a tenant-wide holder, the organization's stores for an organization holder, the assigned stores for a store-level holder, the two permissions adding up. Naming a store the caller holds neither SERVICE_ORDER nor REPORTING at is not refused and adds nothing: storeUids narrows within the caller's stores and never widens them. A storeUid naming no store of the tenant answers 400.

Responses
200

Example response

application/json
get/tenants/{tenantUid}/serviceorders/reports/monthly
GET /v2/tenants/{tenantUid}/serviceorders/reports/monthly?year=1 HTTP/1.1
Host: api.flowretail.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

Example response

{
  "months": [
    {
      "month": 1,
      "registeredCount": 1,
      "completedCount": 1,
      "avgQueueDays": 1,
      "avgWorkDays": 1,
      "avgWorkOpenDays": 1,
      "avgPickupDays": 1,
      "overdueRate": 1
    }
  ]
}

Last updated

Was this helpful?