Skip to content
Lee Bolgatz edited this page Oct 28, 2022 · 3 revisions

Back To Common API Calls


Move a single Trading Partner ID from a Network/Mailbox to the Session Network/Mailbox.

  public int TPMove(string SessionID,
                    int ECGridID,
                    dateTime MoveDateTime)

Parameters


Returns

int


Remarks

Moving a Trading Partner Qualifier/ID (QID) from one Network/Mailbox to another is a process also known as a Migration. There are numerous complexities in this process which may include written authorization by the owner of the QID to release the QID from the existing Network. In general, a PDF of such a request on company letterhead is sufficient.

ECGrid can optionally manage this migration by sending out notices of the pending migration to all Networks, sending reminders and tracking confirmations.

Most Networks require at least 3 business days advanced notification for an ID to be moved. The system enforces this rule. If you need a move expedited, please contact ECGrid NetOps to override this limitation.

To move a QID to a specified Network/Mailbox use TPMoveEx().


Code Example

C#

using System.Xml;
using System.Web.Services.Protocols;
using ECGridService = <ProjectName>.net.ecgridos;

try
{
    using (ECGridService.ECGridOSAPIv3 ECGrid = new ECGridService.ECGridOSAPIv3())
    {
        try
        {
            string SessionID = "00000000-0000-0000-0000-000000000000";
            int ECGridID = 56845;
            DateTime MoveDateTime = new DateTime(2017, 10, 1);

            int TPECGridIDResults= ECGrid.TPMove(SessionID, ECGridID, MoveDateTime);

        }
        catch (SoapException SoapEx)
        {
            // See SOAP Exceptions in the Appendix
            var ECG_Ex = CatchException(SoapEx);
            Console.WriteLine($"ECGridOS Soap Exception: {ECG_Ex.ErrorCode} , Item: {ECG_Ex.ErrorItem}, Message: {ECG_Ex.ErrorMessage}, String: {ECG_Ex.ErrorString}");
        }
    } // END USING
}
catch (Exception ex){ Console.WriteLine("Unhandled Exception: " + ex.ToString()); }

SOAP 1.1

The following is a sample SOAP 1.1 request and response. The placeholders shown need to be replaced with actual values.

POST /v4.1/prod/ECGridOS.asmx HTTP/1.1
Host: os.ecgrid.io
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "https://os.ecgrid.io/TPMove"

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <TPMove xmlns="https://os.ecgrid.io/">
      <SessionID>string</SessionID>
      <ECGridID>int</ECGridID>
      <MoveDateTime>dateTime</MoveDateTime>
    </TPMove>
  </soap:Body>
</soap:Envelope>
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <TPMoveResponse xmlns="https://os.ecgrid.io/">
      <TPMoveResult>int</TPMoveResult>
    </TPMoveResponse>
  </soap:Body>
</soap:Envelope>

SOAP 1.2

The following is a sample SOAP 1.2 request and response. The placeholders shown need to be replaced with actual values.

POST /v4.1/prod/ECGridOS.asmx HTTP/1.1
Host: os.ecgrid.io
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <TPMove xmlns="https://os.ecgrid.io/">
      <SessionID>string</SessionID>
      <ECGridID>int</ECGridID>
      <MoveDateTime>dateTime</MoveDateTime>
    </TPMove>
  </soap12:Body>
</soap12:Envelope>
HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <TPMoveResponse xmlns="https://os.ecgrid.io/">
      <TPMoveResult>int</TPMoveResult>
    </TPMoveResponse>
  </soap12:Body>
</soap12:Envelope>

HTTP GET

The following is a sample HTTP GET request and response. The placeholders shown need to be replaced with actual values.

GET /v4.1/prod/ECGridOS.asmx/TPMove?SessionID=string&ECGridID=string&MoveDateTime=string HTTP/1.1
Host: os.ecgrid.io
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<int xmlns="https://os.ecgrid.io/">int</int>

HTTP POST

The following is a sample HTTP POST request and response. The placeholders shown need to be replaced with actual values.

POST /v4.1/prod/ECGridOS.asmx/TPMove HTTP/1.1
Host: os.ecgrid.io
Content-Type: application/x-www-form-urlencoded
Content-Length: length

SessionID=string&ECGridID=string&MoveDateTime=string
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<int xmlns="https://os.ecgrid.io/">int</int>

Back To Common API Calls

Clone this wiki locally