GetMaterialManagementRouteBased (...)

Introduction
Gets one page of the route-based Material Management data of one service group: one row per route group, with one row for the routes in no route group, in the default RouteGroup view, or one row per route in the Route view. A route row sums every crossing of the route's zones by the service group in the date range, that is, every crossing its travel rules recorded, so a zone shared with another service area does not count that area's crossings. A route group row sums its route rows. The rows are built from the stored segment material aggregates. A measure no activity contributed to is null where the report shows zero. Unlike the legacy route-based report, the date range includes crossings by start time rather than overlap, and the Groups filter applies to travel totals as well as material totals. Route-group filters match direct parents only. For an event with metadata naming several zones, the first zone in metadata-id order is used, matching the stored aggregate producer. The legacy report uses its metadata read order, which can choose another zone. These cases can produce different totals from the report.
Every route of the service group is returned, including routes nothing crossed, whose measures are null, but never soft-deleted data. As in the report, the total time and total distance are those driven inside the route's zones, so the total time can be less than the spread time. Units are the report's storage units: solid in grams, anti-ice and pre-wet in litres, rates in kilograms per kilometre (solid), litres per kilometre (anti-ice) and litres per tonne (pre-wet), distances in kilometres and durations as time spans. See MaterialManagementRouteBasedRecord.
A route or route group has one row unless its zones saw more than one type of a material. It then has as many rows as the material with the most types, each holding one type of each material with its own total and rate, so paging and the count are in rows.
The default order is name ascending, with the routes in no route group last. Sort by any column of the record by naming it in ISort.sortBy, for example solidTotal; null values sort lowest. Sorting by primary, routeId or routeGroupId orders by the route or route group name, and a sort by route group puts the routes in no route group last. A column that is null for every row, such as deviceId, leaves the default order unchanged; name, id and then the position among the rows of the same route or route group break ties in ascending order. Page with resultsLimit and resultsOffset, and use WebMethods.GetMaterialManagementRouteBasedCountAsync for the number of rows rather than recounting.
Requires the Material Management report clearance and, as the route-based report does, a clearance to view routes and read exception events. Only the routes the caller can see and the zone crossings of the vehicles in the caller's groups are included, and only their own crossings for a driver who may see only their own data.
Parameters

credentials

The user's Geotab login credentials.

resultsLimit

The most rows to return: 1 to 1000. The default is 50. Larger values are rejected; use resultsOffset to retrieve additional pages.

resultsOffset

The number of rows to skip, for the pages after the first. The default is 0.

search

The filters: view by, date range on crossing start, exactly one service group, route groups, assets and the Groups filter. See MaterialManagementRouteBasedSearch.
Return value
The rows of the page. A page past the last row is empty.
Code samples
Rate limits
MethodDescriptionLimitPeriod
GetMaterialManagementRouteBasedLimit of 100 requests per 1m.1001m

Loading API Runner...