Skip to main content

Interchange Stats

Returns interchange statistics grouped by time period for a specified date range and direction.

Endpoint

POST /v2/reports/interchange-stats

Request Body

FieldTypeRequiredConstraintsDescription
startTimedatetimeYesISO 8601 UTC formatStart of the reporting window (inclusive)
endTimedatetimeYesISO 8601 UTC format; must be after startTimeEnd of the reporting window (inclusive)
directionstringYesMust be a valid Direction valueFilter by inbound, outbound, or both directions
{
"startTime": "2026-04-01T00:00:00Z",
"endTime": "2026-04-30T23:59:59Z",
"direction": "InBox"
}

Response

Returns an array of interchange statistics records, one per period within the specified range.

{
"success": true,
"data": [
{
"periodStart": "2026-04-01T00:00:00Z",
"periodEnd": "2026-04-01T23:59:59Z",
"count": 215,
"totalBytes": 1048576,
"direction": "InBox"
},
{
"periodStart": "2026-04-02T00:00:00Z",
"periodEnd": "2026-04-02T23:59:59Z",
"count": 198,
"totalBytes": 983040,
"direction": "InBox"
}
]
}

Response Fields

FieldTypeDescription
periodStartdatetimeUTC start of the statistics period
periodEnddatetimeUTC end of the statistics period
countintNumber of interchanges in this period
totalByteslongTotal byte volume for this period
directionstringDirection filter applied — see Direction enum

ENUMs

Direction

See Direction in the Appendix for the full list of values.

ValueDescription
NoDirNo direction filter applied
OutBoxOutbound interchanges only
InBoxInbound interchanges only

Code Examples

curl -X POST "https://rest.ecgrid.io/v2/reports/interchange-stats" \
-H "X-API-Key: $ECGRID_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "startTime": "2026-04-01T00:00:00Z", "endTime": "2026-04-30T23:59:59Z", "direction": "InBox" }'

See Also