Get Parcel
Retrieve the metadata and status for a single parcel by its unique ID.
Endpoint
GET /v2/parcels/{id}
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | long | Yes | Unique identifier of the parcel |
Response
Returns a ParcelIDInfo object describing the parcel's metadata and current status.
{
"success": true,
"data": {
"parcelId": 987654321,
"mailboxId": 1001,
"networkId": 42,
"fileName": "invoice_batch_20260507.edi",
"bytes": 14872,
"status": "InBoxReady",
"ecGridIdFrom": 112233,
"ecGridIdTo": 445566,
"created": "2026-05-07T08:00:00Z",
"modified": "2026-05-07T08:05:00Z"
}
}
ENUMs
ParcelStatus
See ParcelStatus in Appendix — ENUMs for the full list of parcel status values.
Code Examples
- cURL
- C#
- Java
- Node.js
- Python
curl -X GET "https://rest.ecgrid.io/v2/parcels/$ID" \
-H "X-API-Key: $ECGRID_API_KEY"
// .NET 10 — retrieve parcel metadata by ID
using System.Net.Http.Json;
var parcelId = 987654321L;
var response = await http.GetAsync($"https://rest.ecgrid.io/v2/parcels/{parcelId}");
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadFromJsonAsync<ApiResponse<ParcelIdInfo>>();
Console.WriteLine($"Parcel {result!.Data.ParcelId} — Status: {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/parcels/%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/${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/{id}"
response = requests.get(url, headers=headers)
response.raise_for_status()
print(response.json())
See Also
- Download Parcel — download the EDI content of this parcel
- Get Manifest — list interchanges contained in this parcel
- Inbox List — search inbound parcels