Get Manifest
Return the list of EDI interchanges contained within a parcel.
Endpoint
GET /v2/parcels/manifest/{id}
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | long | Yes | Unique identifier of the parcel |
Response
Returns an array of ManifestInfo objects, one for each EDI interchange found in the parcel.
{
"success": true,
"data": [
{
"interchangeId": 555001,
"sender": "112233",
"receiver": "445566",
"documentType": "810",
"count": 3
},
{
"interchangeId": 555002,
"sender": "112233",
"receiver": "445566",
"documentType": "850",
"count": 7
}
]
}
Code Examples
- cURL
- C#
- Java
- Node.js
- Python
curl -X GET "https://rest.ecgrid.io/v2/parcels/manifest/$ID" \
-H "X-API-Key: $ECGRID_API_KEY"
// .NET 10 — inspect the interchange contents of a parcel before downloading
using System.Net.Http.Json;
var parcelId = 987654321L;
var response = await http.GetAsync(
$"https://rest.ecgrid.io/v2/parcels/manifest/{parcelId}");
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadFromJsonAsync<ApiResponse<List<ManifestInfo>>>();
foreach (var interchange in result!.Data)
{
Console.WriteLine(
$"Interchange {interchange.InterchangeId}: " +
$"{interchange.DocumentType} — {interchange.Count} document(s) " +
$"from {interchange.Sender} to {interchange.Receiver}");
}
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/parcels/manifest/%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/parcels/manifest/${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/parcels/manifest/{id}"
response = requests.get(url, headers=headers)
response.raise_for_status()
print(response.json())
See Also
- Get Parcel — retrieve the parcel header metadata
- Download Parcel — download the full parcel content
- Interchanges — Get Interchange — retrieve individual interchange details