Get Interchange
Retrieve the details of a single interchange by its unique ECGrid Interchange ID.
Endpoint
GET /v2/interchanges/{id}
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | long | Yes | The unique ECGrid Interchange ID. |
Response
Returns an InterchangeIDInfo object containing the full details of the requested interchange.
{
"success": true,
"data": {
"interchangeId": 9870001,
"parcelId": 5550001,
"sender": "ACME_CORP",
"receiver": "BUYER_INC",
"standard": "X12",
"documentType": "850",
"status": "Active",
"created": "2026-05-01T10:30:00Z"
}
}
ENUMs
EDIStandard
| Value | Description |
|---|---|
X12 | ASC X12 (North American standard) |
EDIFACT | UN/EDIFACT (international standard) |
TRADACOMS | TRADACOMS (UK retail standard) |
VDA | VDA (German automotive standard) |
XML | XML-based EDI |
TXT | Plain text |
PDF | PDF document |
Binary | Binary file |
Status
| Value | Description |
|---|---|
Development | In development / testing |
Active | Actively in use |
Preproduction | Pre-production stage |
Suspended | Temporarily suspended |
Terminated | Permanently terminated |
See Enums Reference for full ENUM definitions.
Code Examples
- cURL
- C#
- Java
- Node.js
- Python
curl -X GET "https://rest.ecgrid.io/v2/interchanges/$ID" \
-H "X-API-Key: $ECGRID_API_KEY"
// .NET 10 — retrieve a single interchange record by ID
using var client = httpClientFactory.CreateClient("ECGrid");
var response = await client.GetAsync($"/v2/interchanges/{interchangeId}");
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadFromJsonAsync<ApiResponse<InterchangeIdInfo>>();
Console.WriteLine($"Interchange {result.Data.InterchangeId}: {result.Data.DocumentType} — {result.Data.Status}");
import java.net.URI;
import java.net.http.*;
String apiKey = System.getenv("ECGRID_API_KEY");
String id = "0"; // replace with actual id
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(String.format("https://rest.ecgrid.io/v2/interchanges/%s", id)))
.header("X-API-Key", apiKey)
.GET()
.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/${id}`;
const response = await fetch(url, {
method: 'GET',
headers: { 'X-API-Key': apiKey },
});
const data = await response.json();
console.log(data);
import os, requests
api_key = os.environ["ECGRID_API_KEY"]
headers = {"X-API-Key": api_key}
id = 0 # replace with actual id
url = f"https://rest.ecgrid.io/v2/interchanges/{id}"
response = requests.get(url, headers=headers)
response.raise_for_status()
print(response.json())