Move Trading Partner
Moves a trading partner ECGrid ID from its current mailbox to a different mailbox.
Endpoint
POST /v2/ids/tp-move
Request Body
| Field | Type | Required | Constraints | Description |
|---|---|---|---|---|
ecGridId | integer | Yes | Must be a valid ECGrid ID | The ECGrid ID to move |
newMailboxId | integer | Yes | Must be a valid mailbox within the same network | The destination mailbox |
{
"ecGridId": 123456,
"newMailboxId": 1002
}
Response
Returns the updated ECGridIDInfo object reflecting the new mailbox assignment.
{
"success": true,
"data": {
"ecGridId": 123456,
"mailboxId": 1002,
"networkId": 42,
"qualifier": "01",
"id": "PARTNER001",
"description": "Acme Corp Production",
"status": "Active",
"routingGroup": "ProductionA",
"ediStandard": "X12"
}
}
Code Examples
- cURL
- C#
- Java
- Node.js
- Python
curl -X POST "https://rest.ecgrid.io/v2/ids/tp-move" \
-H "X-API-Key: $ECGRID_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "ecGridId": 123456, "newMailboxId": 1002 }'
// .NET 10 — move a trading partner ID to a different mailbox
using var client = httpClientFactory.CreateClient("ECGrid");
var request = new
{
ecGridId = 123456,
newMailboxId = 1002
};
var response = await client.PostAsJsonAsync(
"https://rest.ecgrid.io/v2/ids/tp-move", request);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadFromJsonAsync<ApiResponse<ECGridIDInfo>>();
Console.WriteLine($"Moved to mailbox: {result!.Data.MailboxId}");
import java.net.URI;
import java.net.http.*;
String apiKey = System.getenv("ECGRID_API_KEY");
String body = "{ \"ecGridId\": 123456, \"newMailboxId\": 1002 }";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://rest.ecgrid.io/v2/ids/tp-move"))
.header("X-API-Key", apiKey)
.header("Content-Type", "application/json")
.POST(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/tp-move';
const response = await fetch(url, {
method: 'POST',
headers: {
'X-API-Key': apiKey,
'Content-Type': 'application/json',
},
body: JSON.stringify({ "ecGridId": 123456, "newMailboxId": 1002 }),
});
const data = await response.json();
console.log(data);
import os, requests
api_key = os.environ["ECGRID_API_KEY"]
headers = {"X-API-Key": api_key}
url = "https://rest.ecgrid.io/v2/ids/tp-move"
response = requests.post(
url,
json={ "ecGridId": 123456, "newMailboxId": 1002 },
headers=headers,
)
response.raise_for_status()
print(response.json())