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

Get counts of service orders

Get counts of service orders. Send one query per number that is to be shown — the workspace tiles and the cards of the saved lists that are marked to show as cards — each with a key of its own, and get a count back per key. A query is an ordinary service order search request across every service order of the tenant, which a caller holding SERVICE_ORDER at any level — tenant-wide, at an organization or at any one store — reaches, so a count always answers exactly what the same filters would list. Nothing but the counts is returned; open a query with the tenant-level service order search endpoint, which reaches the same service orders, to see the service orders themselves. storeUids and createdFromStoreUids in a query narrow it within the tenant, a store the caller holds nothing at included. Every service order of the tenant is counted wherever it sits, so a case a store took in and has since sent on is counted as surely as one it still holds.

Required permissions: SERVICE_ORDER

post
/tenants/{tenantUid}/serviceorders/search/counts
Authorizations
AuthorizationstringRequired

Access token recevied after user login with a deviceToken

Path parameters
tenantUidstringRequired

Reference to a tenant.

Pattern: ^[A-Za-z0-9-_]+
Body

The service order queries to count in one call — one per workspace tile or saved-list card. Each query carries its own key so the counts can be matched back to it.

Responses
200

Example response

application/json

One result per query that was sent, matched back to its query by queryKey.

post/tenants/{tenantUid}/serviceorders/search/counts
POST /v2/tenants/{tenantUid}/serviceorders/search/counts HTTP/1.1
Host: api.flowretail.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 892

{
  "queries": [
    {
      "queryKey": "text",
      "query": {
        "customerName": "text",
        "customerMobile": "text",
        "customerEmail": "text",
        "title": "text",
        "serviceNumber": "text",
        "query": "text",
        "fromCreatedDate": "2026-01-01",
        "toCreatedDate": "2026-01-01",
        "assignedUserUids": [
          "text"
        ],
        "createdFromStoreUids": [
          "text"
        ],
        "priorities": [
          "HIGHEST"
        ],
        "serviceStates": [
          "AWAITING_PRODUCT"
        ],
        "open": true,
        "serviceTypeUids": [
          "text"
        ],
        "storeUids": [
          "text"
        ],
        "serviceStatusUids": [
          "text"
        ],
        "fromReadyAtEstimate": "2026-01-01T00:00:00.000Z",
        "toReadyAtEstimate": "2026-01-01T00:00:00.000Z",
        "overdue": true,
        "serial": "text",
        "serviceJobTypeUids": [
          "text"
        ],
        "externalServiceNumber": "text",
        "claimNumber": "text",
        "externalSalesOrderNumber": "text",
        "customerNumber": "text",
        "customerUids": [
          "text"
        ],
        "productUids": [
          "text"
        ],
        "coverages": [
          "PAYABLE"
        ],
        "fromFinishedDate": "2026-01-01",
        "toFinishedDate": "2026-01-01",
        "formValueFilters": [
          {
            "fieldKey": "text",
            "value": "text"
          }
        ]
      }
    }
  ]
}
200

Example response

{
  "results": [
    {
      "queryKey": "text",
      "count": 1
    }
  ]
}

Last updated

Was this helpful?