Delete Partner
Terminates an interconnect, permanently ending the EDI routing relationship between two trading partners.
Endpoint
DELETE /v2/partners/{id}
danger
Terminating an interconnect is irreversible. EDI routing between the two associated ECGrid IDs will stop immediately. Any in-flight parcels already submitted will continue processing, but no new EDI traffic will be routed between these partners.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | The numeric Interconnect/Partner ID to terminate |
Response
Returns a success boolean confirming the termination.
{
"success": true,
"data": true
}
Code Examples
- cURL
- C#
- Java
- Node.js
- Python
curl -X DELETE "https://rest.ecgrid.io/v2/partners/$ID" \
-H "X-API-Key: $ECGRID_API_KEY"
// .NET 10 — terminate an interconnect; confirm intent before calling in production
using var client = httpClientFactory.CreateClient("ECGrid");
var response = await client.DeleteAsync(
$"https://rest.ecgrid.io/v2/partners/{interconnectId}");
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadFromJsonAsync<ApiResponse<bool>>();
Console.WriteLine($"Interconnect terminated: {result!.Data}");
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/partners/%s", id)))
.header("X-API-Key", apiKey)
.DELETE()
.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/partners/${id}`;
const response = await fetch(url, {
method: 'DELETE',
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/partners/{id}"
response = requests.delete(url, headers=headers)
response.raise_for_status()
print(response.json())