Skip to main content

get-partner-document-counts

Report how many EDI documents (interchanges) one specific ECGrid ID exchanged with each of its trading partners over a date range, with byte volumes. Use for volume and traffic questions scoped to one ECGrid ID and window — for example "which trading partners drove the most volume for this customer?" or "how many bytes did this Customer/QID send and receive this month?". Results are ranked by total interchange count descending and capped at topN. Returns NOT_FOUND when the ecgridId does not exist or is not visible to the caller's APIKey.

Tool Name

connectivity_partner_get-partner-document-counts

Auth Level Required

Any (scoped to caller's APIKey)

Parameters

ParameterTypeRequiredDescription
request.ecgridIdintegerYesThe internal numeric ECGrid ID to report on. Positive integer >= 1. Example: 6928311. Drives scope resolution — the tool looks up this record to derive its network, mailbox, qualifier, and ID, then fetches the document count report. NOT_FOUND when the ID does not exist or is not visible to the caller's APIKey.
request.startDatestringYesInclusive start of the reporting window, ISO 8601 UTC. Example: 2026-07-01T00:00:00Z. The window must not exceed 30 days; longer ranges are rejected as VALIDATION_ERROR.
request.endDatestringYesInclusive end of the reporting window, ISO 8601 UTC. Example: 2026-07-06T23:59:59Z. Must be on or after startDate and within 30 days of it.
request.topNinteger | nullNoMaximum number of trading-partner rows to return, ranked by interchange count descending. Optional, 1–500. Defaults to 50 when omitted. When this ECGrid ID has more partner rows than this limit, the response is truncated and flagged via truncated/omittedRowCount. Raise topN (max 500) or narrow the date range for full coverage.

Response

Returns scope metadata echoed from the ECGrid ID lookup, the queried date range, top-level rollup totals, truncation flags, and a partners array ranked by interchange volume descending. An empty partners array means no documents were exchanged in the window — this is a successful outcome, NOT an error.

{
"ecgridId": 6928311,
"customer": "ACMECORP",
"qid": "ZZ*ACMECORP",
"networkId": 7,
"networkName": "Loren Data Corp",
"mailboxId": 142,
"mailboxName": "acme-prod@example.com",
"startDate": "2026-07-01T00:00:00Z",
"endDate": "2026-07-06T23:59:59Z",
"totalInterchanges": 1482,
"totalBytes": 52428800,
"appliedTopN": 50,
"truncated": false,
"omittedRowCount": 0,
"partners": [
{
"tradingPartner": "BETACORP",
"tradingPartnerQid": "ZZ*BETACORP",
"totalInterchanges": 850,
"totalBytes": 30000000
},
{
"tradingPartner": "GAMMACORP",
"tradingPartnerQid": "01*9876543210",
"totalInterchanges": 632,
"totalBytes": 22428800
}
]
}

Response Fields

FieldTypeDescription
ecgridIdintegerThe ECGrid ID the report is scoped to
customerstringWire-level EDI identifier (the id portion of the qualifier/id pair)
qidstringFully qualified identifier in qualifier*id format
networkIdintegerECGrid network owning this ECGrid ID
networkNamestringHuman-readable name of the owning network
mailboxIdintegerMailbox owning this ECGrid ID
mailboxNamestringHuman-readable name of the owning mailbox
startDatestringEchoed start of the queried window (ISO 8601)
endDatestringEchoed end of the queried window (ISO 8601)
totalInterchangesintegerTotal interchange count across all trading partners in the window
totalBytesintegerTotal byte volume across all trading partners in the window
appliedTopNintegerThe topN limit actually applied (echoed from request or default 50)
truncatedbooleantrue when the result was capped at topN — more rows exist beyond the limit
omittedRowCountintegerNumber of partner rows omitted due to topN truncation
partnersarrayTrading-partner rows ranked by totalInterchanges descending
partners[].tradingPartnerstringWire-level EDI identifier of the trading partner (the id portion)
partners[].tradingPartnerQidstringFully qualified identifier of the trading partner in qualifier*id format
partners[].totalInterchangesintegerNumber of interchanges exchanged with this partner in the window
partners[].totalBytesintegerTotal byte volume exchanged with this partner in the window

Example Call

{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "connectivity_partner_get-partner-document-counts",
"arguments": {
"request": {
"ecgridId": 6928311,
"startDate": "2026-07-01T00:00:00Z",
"endDate": "2026-07-06T23:59:59Z",
"topN": 50
}
}
}
}

Example Prompts

  • Show document counts for ECGrid ID 12345 over the last week
  • Which trading partners sent the most documents to mailbox 142 this month?
  • How many interchanges did ECGrid ID 6928311 exchange with each partner in July?

See Also