Interchange Inbox List
Retrieve a paginated list of inbound interchanges for a mailbox within a specified date range.
Endpoint
POST /v2/interchanges/inbox-list
Request Body
| Field | Type | Required | Constraints | Description |
|---|---|---|---|---|
mailboxId | int | No | — | Filter results to a specific mailbox. |
ecGridIdFrom | int | No | — | Filter by the sending ECGrid ID. |
ecGridIdTo | int | No | — | Filter by the receiving ECGrid ID. |
beginDate | datetime | No | ISO 8601 | Start of the date range to query. |
endDate | datetime | No | ISO 8601 | End of the date range to query. |
pageNo | int | No | Minimum: 1 | Page number for paginated results. Defaults to 1. |
recordsPerPage | int | No | Maximum: 500 | Number of records per page. Defaults to 100. |
{
"mailboxId": 12345,
"ecGridIdFrom": 0,
"ecGridIdTo": 0,
"beginDate": "2026-05-01T00:00:00Z",
"endDate": "2026-05-07T23:59:59Z",
"pageNo": 1,
"recordsPerPage": 100
}
Response
Returns a paginated array of InterchangeIDInfo objects representing inbound interchanges matching the query criteria.
{
"success": true,
"data": {
"totalRecords": 42,
"pageNo": 1,
"recordsPerPage": 100,
"interchanges": [
{
"interchangeId": 9870001,
"parcelId": 5550001,
"sender": "ACME_CORP",
"receiver": "BUYER_INC",
"standard": "X12",
"documentType": "850",
"status": "Active",
"created": "2026-05-01T10:30:00Z"
}
]
}
}
ENUMs
EDIStandard
See Enums Reference for the full EDIStandard and Status ENUM definitions.
Code Examples
- cURL
- C#
- Java
- Node.js
- Python
curl -X POST "https://rest.ecgrid.io/v2/interchanges/inbox-list" \
-H "X-API-Key: $ECGRID_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "mailboxId": 12345, "ecGridIdFrom": 0, "ecGridIdTo": 0, "beginDate": "2026-05-01T00:00:00Z", "endDate": "2026-05-07T23:59:59Z", "pageNo": 1, "recordsPerPage": 100 }'
// .NET 10 — query inbound interchanges with date range and pagination
using var client = httpClientFactory.CreateClient("ECGrid");
var requestBody = new
{
mailboxId = 12345,
beginDate = DateTime.UtcNow.AddDays(-7),
endDate = DateTime.UtcNow,
pageNo = 1,
recordsPerPage = 100
};
var response = await client.PostAsJsonAsync("/v2/interchanges/inbox-list", requestBody);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadFromJsonAsync<ApiResponse<PagedResult<InterchangeIdInfo>>>();
Console.WriteLine($"Found {result.Data.TotalRecords} inbound interchanges.");
foreach (var interchange in result.Data.Interchanges)
{
Console.WriteLine($" [{interchange.InterchangeId}] {interchange.Sender} → {interchange.Receiver} | {interchange.DocumentType}");
}
import java.net.URI;
import java.net.http.*;
String apiKey = System.getenv("ECGRID_API_KEY");
String body = "{ \"mailboxId\": 12345, \"ecGridIdFrom\": 0, \"ecGridIdTo\": 0, \"beginDate\": \"2026-05-01T00:00:00Z\", \"endDate\": \"2026-05-07T23:59:59Z\", \"pageNo\": 1, \"recordsPerPage\": 100 }";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://rest.ecgrid.io/v2/interchanges/inbox-list"))
.header("X-API-Key", apiKey)
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(body))
.build();
HttpClient client = HttpClient.newHttpClient();
HttpResponse<String> response = client.send(
request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
const apiKey = process.env.ECGRID_API_KEY;
const url = 'https://rest.ecgrid.io/v2/interchanges/inbox-list';
const response = await fetch(url, {
method: 'POST',
headers: {
'X-API-Key': apiKey,
'Content-Type': 'application/json',
},
body: JSON.stringify({ "mailboxId": 12345, "ecGridIdFrom": 0, "ecGridIdTo": 0, "beginDate": "2026-05-01T00:00:00Z", "endDate": "2026-05-07T23:59:59Z", "pageNo": 1, "recordsPerPage": 100 }),
});
const data = await response.json();
console.log(data);
import os, requests
api_key = os.environ["ECGRID_API_KEY"]
headers = {"X-API-Key": api_key}
url = "https://rest.ecgrid.io/v2/interchanges/inbox-list"
response = requests.post(
url,
json={ "mailboxId": 12345, "ecGridIdFrom": 0, "ecGridIdTo": 0, "beginDate": "2026-05-01T00:00:00Z", "endDate": "2026-05-07T23:59:59Z", "pageNo": 1, "recordsPerPage": 100 },
headers=headers,
)
response.raise_for_status()
print(response.json())