Skip to main content

ReportInstantStats

Returns parcel and interchange counts for two configurable trailing time windows, providing a real-time activity snapshot.

:::caution Established API The SOAP API is in maintenance mode. For new integrations use the REST equivalent. :::

Method Signature

DataSet ReportInstantStats(string SessionID, short Minutes1, short Minutes2)

Parameters

ParameterTypeRequiredDescription
SessionIDstringYesActive session token from Login()
Minutes1shortYesFirst time window in minutes (e.g., 15 for the last 15 minutes)
Minutes2shortYesSecond time window in minutes (e.g., 60 for the last hour)

Response Object — DataSet

Returns an ADO.NET DataSet containing activity counts across both time windows. Access results via DataTable rows.

ColumnTypeDescription
ParcelsIn1intInbound parcels received within Minutes1
ParcelsOut1intOutbound parcels sent within Minutes1
InterchangesIn1intInbound interchanges within Minutes1
InterchangesOut1intOutbound interchanges within Minutes1
ParcelsIn2intInbound parcels received within Minutes2
ParcelsOut2intOutbound parcels sent within Minutes2
InterchangesIn2intInbound interchanges within Minutes2
InterchangesOut2intOutbound interchanges within Minutes2
<!-- Example response XML -->
<DataSet>
<Table>
<ParcelsIn1>4</ParcelsIn1>
<ParcelsOut1>2</ParcelsOut1>
<InterchangesIn1>12</InterchangesIn1>
<InterchangesOut1>8</InterchangesOut1>
<ParcelsIn2>18</ParcelsIn2>
<ParcelsOut2>9</ParcelsOut2>
<InterchangesIn2>47</InterchangesIn2>
<InterchangesOut2>31</InterchangesOut2>
</Table>
</DataSet>

:::note DataSet Access Pattern The SOAP DataSet return type is an ADO.NET dataset. Access the first DataTable in Tables[0] and read column values from Rows[0]. :::

Code Examples

// .NET 10 — dotnet-svcutil generated proxy
// Get activity counts for the last 15 and 60 minutes
var result = await client.ReportInstantStatsAsync(sessionID, minutes1: 15, minutes2: 60);

// DataSet returned — access via the first DataTable
var table = result.Tables[0];
if (table.Rows.Count > 0)
{
var row = table.Rows[0];
Console.WriteLine("=== Last 15 minutes ===");
Console.WriteLine($" Parcels In: {row["ParcelsIn1"]}");
Console.WriteLine($" Parcels Out: {row["ParcelsOut1"]}");
Console.WriteLine($" Interchanges In: {row["InterchangesIn1"]}");
Console.WriteLine($" Interchanges Out: {row["InterchangesOut1"]}");

Console.WriteLine("=== Last 60 minutes ===");
Console.WriteLine($" Parcels In: {row["ParcelsIn2"]}");
Console.WriteLine($" Parcels Out: {row["ParcelsOut2"]}");
Console.WriteLine($" Interchanges In: {row["InterchangesIn2"]}");
Console.WriteLine($" Interchanges Out: {row["InterchangesOut2"]}");
}

REST Equivalent

See Instant StatsPOST /v2/reports/instant-stats.