Calculate Dispatch Summary Available Time via API

Last updated: December 4, 2026

There is no API endpoint that returns the aggregated Dispatch Summary Report or its calculated columns directly. For a Power BI dashboard or metric validation, rebuild the required values from the underlying records. The /api/1.0/dispatches/ endpoint returns individual dispatch records, not the report's aggregates.

API base URL and access

Use your normal L2L Dispatch deployment address as the base URL:

https://<deployment-name>.leading2lean.com

Use HTTPS and an API key with access to the endpoints you need, including Pitches and Resource Shifts for the approaches below. Administrators can access the full API documentation in L2L.

Calculate Ava Time

First check whether Use Production Available Time is selected in the Dispatch Summary Report. The two settings use different data sources.

When Use Production Available Time is selected

For each line, Ava Time is the sum of planned_production_minutes for active pitches whose start times fall within the report's date range.

  1. Retrieve pitches from /api/1.0/pitches/, filtering by site, line, and pitch start time.

  2. Include pitches with pitch_start greater than or equal to the start and less than the end.

  3. Keep records where active is true.

  4. Sum planned_production_minutes for each line.

Example request path, with placeholders to replace and normal API authentication to add:

/api/1.0/pitches/?site=<site-id>&line=<line-id>&pitch_start__gte=<start>&pitch_start__lt=<end>&limit=2000&offset=0

URL-encode parameter values as needed. Each call returns at most 2,000 records. Retrieve all pages with limit and offset before calculating totals.

Overnight pitches: The Production Daily Summary Data by Line reporting API also returns planned production minutes, but it does not count the after-midnight portion of pitches that cross midnight. Its totals can therefore be lower than Ava Time. Use the Pitches API for this calculation rather than treating the daily summary as an equivalent source.

When Use Production Available Time is not selected (default)

Ava Time uses the scheduled time of the Resource/Production Shifts assigned to each line in line setup, within the report's date range.

Shift schedules are available through /api/1.0/resourceshifts/, but the API does not expose which shifts are assigned to each line. To reconstruct the default Ava Time, maintain that line-to-shift mapping outside L2L and update it whenever line setup changes. Without this mapping, the default calculation cannot be fully rebuilt from the API alone.

If more than one shift pattern is assigned to a line, their available time is added together. Unexpectedly high Ava Time can therefore be caused by multiple assigned shift patterns.

Building and validating a dashboard

  • Calculated columns such as Ava Time, Est. Prod Down Time, Total Non Overlap, OA, and MTBF must be reconstructed; they are not returned as Dispatch Summary Report columns by an API endpoint.

  • Match the report's date range, filters, and Use Production Available Time setting before comparing totals.

  • Plan for pagination on long history ranges. Rapid consecutive API calls can return 429 Too Many Requests errors, so include retry handling.

  • For Down dispatch types, downtime may begin when a technician is dispatched rather than when the dispatch is created. Down dispatches with no resource dispatched may not be counted.

  • Do not assume the report's MTBF and MTTR use scheduled production hours or only dispatches created during the period. The report includes dispatches open in the period; MTBF uses Period Time divided by the dispatch count, while MTTR uses Total Time divided by the dispatch count. See the report documentation for column definitions.

  • Line OA can incorporate Machine Groups. Summing machine-level downtime without that logic will not necessarily reproduce line OA.

Alternative for broader data access

L2L Analytics Data Access is a separate add-on that delivers complete raw data, including per-line shift schedules, to an S3 bucket or SFTP on a monthly or daily refresh. Ask your account representative to confirm what is included for your account.

Related documentation