Update ID
Updates the description, status, or EDI standard for an existing ECGrid ID.
Endpoint
PUT /v2/ids/{id}
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | The numeric ECGrid ID to update |
Request Body
| Field | Type | Required | Constraints | Description |
|---|---|---|---|---|
description | string | No | — | Updated human-readable label |
status | string | No | See Status enum | Lifecycle status of the ID |
ediStandard | string | No | See EDIStandard enum | EDI format standard |
{
"description": "Acme Corp Production (updated)",
"status": "Active",
"ediStandard": "X12"
}
Response
Returns the updated ECGridIDInfo object.
{
"success": true,
"data": {
"ecGridId": 123456,
"mailboxId": 1001,
"networkId": 42,
"qualifier": "01",
"id": "PARTNER001",
"description": "Acme Corp Production (updated)",
"status": "Active",
"routingGroup": "ProductionA",
"ediStandard": "X12"
}
}
ENUMs
See Enums reference for full details on Status and EDIStandard.
Status
| Value | Description |
|---|---|
Development | ID is in development/testing phase |
Active | ID is live and routing EDI traffic |
Preproduction | ID is staged but not yet live |
Suspended | ID is temporarily disabled |
Terminated | ID has been permanently deactivated |
Code Examples
- cURL
- C#
- Java
- Node.js
- Python
curl -X PUT "https://rest.ecgrid.io/v2/ids/$ID" \
-H "X-API-Key: $ECGRID_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "description": "Acme Corp Production (updated)", "status": "Active", "ediStandard": "X12" }'
// .NET 10 — update description and status for an existing ECGrid ID
using var client = httpClientFactory.CreateClient("ECGrid");
var request = new
{
description = "Acme Corp Production (updated)",
status = "Active",
ediStandard = "X12"
};
var response = await client.PutAsJsonAsync(
$"https://rest.ecgrid.io/v2/ids/{ecGridId}", request);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadFromJsonAsync<ApiResponse<ECGridIDInfo>>();
Console.WriteLine($"Updated: {result!.Data.Description}");
import java.net.URI;
import java.net.http.*;
String apiKey = System.getenv("ECGRID_API_KEY");
String id = "0"; // replace with actual id
String body = "{ \"description\": \"Acme Corp Production (updated)\", \"status\": \"Active\", \"ediStandard\": \"X12\" }";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(String.format("https://rest.ecgrid.io/v2/ids/%s", id)))
.header("X-API-Key", apiKey)
.header("Content-Type", "application/json")
.PUT(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/ids/${id}`;
const response = await fetch(url, {
method: 'PUT',
headers: {
'X-API-Key': apiKey,
'Content-Type': 'application/json',
},
body: JSON.stringify({ "description": "Acme Corp Production (updated)", "status": "Active", "ediStandard": "X12" }),
});
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/ids/{id}"
response = requests.put(
url,
json={ "description": "Acme Corp Production (updated)", "status": "Active", "ediStandard": "X12" },
headers=headers,
)
response.raise_for_status()
print(response.json())