Skip to main content

CallBackAdd

Registers a new callback endpoint so ECGridOS can POST event notifications to your URL when specified objects change state.

:::caution Established API The SOAP API is in maintenance mode. For new integrations use the REST equivalent. :::

Method Signature

CallBackQueueIDInfo CallBackAdd(string SessionID, int NetworkID, int MailboxID, string URL,
Objects Event, HTTPAuthType AuthType, string Username, string Password)

Parameters

ParameterTypeRequiredDescription
SessionIDstringYesActive session token from Login()
NetworkIDintYesNetwork scope for the callback; 0 for all networks
MailboxIDintYesMailbox scope for the callback; 0 for all mailboxes under the network
URLstringYesHTTPS endpoint that will receive the callback POST
EventObjectsYesObject type that triggers the callback (e.g., Parcel, Interchange)
AuthTypeHTTPAuthTypeYesHTTP authentication method ECGridOS uses when calling your endpoint
UsernamestringNoUsername for HTTP Basic or Digest authentication; empty string if AuthType is None
PasswordstringNoPassword for HTTP Basic or Digest authentication; empty string if AuthType is None

Response Object — CallBackQueueIDInfo

FieldTypeDescription
CallBackQueueIDlongUnique identifier for the queued callback registration event
CallBackIDintIdentifier of the newly created callback configuration
NetworkIDintNetwork the callback is scoped to
MailboxIDintMailbox the callback is scoped to
URLstringRegistered callback endpoint URL
EventObjectsObject type that triggers this callback
StatusstringCurrent status of the callback queue entry
CreateDatedatetimeTimestamp when the callback was registered
<!-- Example response XML -->
<CallBackQueueIDInfoResult>
<CallBackQueueID>98765</CallBackQueueID>
<CallBackID>42</CallBackID>
<NetworkID>1</NetworkID>
<MailboxID>100</MailboxID>
<URL>https://your-app.example.com/ecgrid/callback</URL>
<Event>Parcel</Event>
<Status>Active</Status>
<CreateDate>2026-05-07T12:00:00</CreateDate>
</CallBackQueueIDInfoResult>

ENUMs

Objects

ValueDescription
SystemSystem-level events
UserUser account events
NetworkNetwork configuration events
MailboxMailbox events
ECGridIDTrading partner ID events
InterconnectPartner interconnect events
ParcelParcel (file) receipt and delivery events
InterchangeEDI interchange events
CarbonCopyCarbon copy rule events
CallBackEventCallback system events
AS2AS2 communication events
CommCommunication channel events

See Appendix — ENUMs for the full Objects enumeration.

HTTPAuthType

ValueDescription
NoneNo HTTP authentication
BasicHTTP Basic authentication (Base64-encoded credentials)
DigestHTTP Digest authentication

Code Examples

// .NET 10 — dotnet-svcutil generated proxy
// Register a callback for inbound parcel events on a specific mailbox
var result = await client.CallBackAddAsync(
sessionID,
networkID: 1,
mailboxID: 100,
url: "https://your-app.example.com/ecgrid/callback",
@event: Objects.Parcel,
authType: HTTPAuthType.Basic,
username: config["Callbacks:Username"],
password: config["Callbacks:Password"]);

Console.WriteLine($"Callback registered. ID: {result.CallBackID}, Queue ID: {result.CallBackQueueID}");

REST Equivalent

See Create CallbackPOST /v2/callbacks/create.