Inventory reports

GET /reports/inspections

List Inventory reports. The API path retains the technical name /reports/inspections. Results are newest first, with up to 12 reports per page. If the response contains a cursor, pass it to the next request.

Parameters

All query parameters are optional.

  • division: Filter by division ID.
  • area: Filter by area ID.
  • status: PROCESSING, PROCESSED or COMPLETED. Defaults to COMPLETED.
  • from and to: Start and end of the report creation period, as millisecond timestamps. Provide both to apply the date range; a single bound is not applied by this endpoint.
  • cursor: Creation timestamp returned by the previous page.

Status codes

  • 200 on success
  • 400 on invalid query parameters

Response properties

The response format is JSON with the following properties:

  • entries: The list of inspection entries with the following properties:
    • created: Created timestamp, also functions as the id.
    • location_id: The id of the site or location where the area is located. (optional)
    • area_id: Area ID of the inspection.
    • state: The state of the inspection (see below for details).
    • name: The user-provided name of the report. (optional)
    • inspection_counts: The number of inspection lists in the report.
    • counted_items: The number of items in the report.
    • total_items: The total number of items in the report.
  • cursor: Created timestamp of the last item in the list. (optional)
Inspection state

The state object of an inspection entry always has a status property. The status can be one of the following:

  • COMPLETED: The inspection is completed. No additional properties.
  • PROCESSED: The inspection was processed with pending differences. The differences property will be present and reflect the number of pending differences.
  • PROCESSING: The inspection is being processed. If an error occurs during processing, the error property will be present with the timestamp when the error occurred.

Example response:

{
  "entries": [
    {
      "created": 1698398075294,
      "location_id": "div_HlkuLAdFcM",
      "area_id": "are_57osC3HVZL",
      "state": {
        "status": "COMPLETED"
      },
      "name": "February inspection",
      "inspection_counts": 2,
      "counted_items": 42
    },
    {
      "created": 1677598436854,
      "location_id": "div_HlkuLAdFcM",
      "area_id": "are_57osC3HVZL",
      "state": {
        "status": "COMPLETED"
      },
      "name": "January inspection",
      "inspection_counts": 1,
      "counted_items": 27
    }
  ],
  "cursor": 1677598436854
}

To read one report's JSON, use Inventory · Details with its created timestamp as the ID. For an Excel file, use Inventory · Download.

Pending Inventory records

If you need to read an Inventory record that is still pending, see the Inventory records endpoints. GET /inspections lists pending records; it does not replace this report history.