GetSalesOrder

Description

This method allows you to view the stored data for a particular sales order.
This method requires the use of the customerlId, salesOrderNumber and salesOrderInternalId.

Syntax

SalesOrder GetSalesOrder(SecurityToken securityToken string customerId, string subCustomerId, string salesOrderNumber, string salesOrderInternalID).

Arguments

TypeNameDescription
SecurityTokensecurityTokenMerchant security token: used to identify merchant and validate transaction. (required)
StringcustomerIdCustomer ID. (optional)
StringsubCustomerIdSub-customer ID. (optional)
StringsalesOrderNumberSales order number. (optional)
StringsalesOrderInternalIdUnique internal sales order ID assigned by EBizCharge. (required)

Return Value

TypeDescription
SalesOrderReturns result of GetSalesOrder request.

Examples

public function GetSalesOrder()
{
    $client = new SoapClient('End point URL');
    $securityToken = array(
        'SecurityId' => '******-454757-4567457-********',
        'UserId' => 'merchant1',
        'Password' => 'merchant1'
    );
    $response = $client->GetSalesOrder(array(
        'securityToken' => $securityToken,
        'customerId' => '123',
        'salesOrderNumber' => '00102566',
        'salesOrderInternalId' => '45435-45435-543543-435'
    ));
    $result = $response->GetSalesOrderResult;
}
Request:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ebiz="http://eBizCharge.ServiceModel.SOAP">
   <soapenv:Header/>
   <soapenv:Body>
      <ebiz:GetSalesOrder>
            <ebiz:securityToken>
            <ebiz:SecurityId>********-1906-4be3-b01d-********</ebiz:SecurityId>
            <ebiz:UserId>uid01</ebiz:UserId>
            <ebiz:Password>ps123</ebiz:Password>
         </ebiz:securityToken>
         <ebiz:customerId>AIM</ebiz:customerId>
         <ebiz:subCustomerId/>
         <ebiz:salesOrderNumber>SO0005</ebiz:salesOrderNumber>
      </ebiz:GetSalesOrder>
   </soapenv:Body>
</soapenv:Envelope>

Response:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <GetSalesOrderResponse xmlns="http://eBizCharge.ServiceModel.SOAP">
         <GetSalesOrderResult>
            <CustomerId>AIM</CustomerId>
            <SubCustomerId/>
            <SalesOrderNumber>SO0005</SalesOrderNumber>
            <SalesOrderInternalId>********-c8f9-4bc0-9691-********</SalesOrderInternalId>
            <Date>2019-01-01</Date>
            <Currency>USD</Currency>
            <Amount>120.2500</Amount>
            <DueDate>2019-02-05</DueDate>
            <AmountDue>115.2500</AmountDue>
            <PoNum>po0001</PoNum>
            <DivisionId>01</DivisionId>
            <Software>?</Software>
            <NotifyCustomer xsi:nil="true"/>
            <URL>?</URL>
            <TotalTaxAmount>20.0000</TotalTaxAmount>
            <UniqueId>0001x</UniqueId>
            <Description>?</Description>
            <BillingAddress>
               <FirstName>?</FirstName>
               <LastName>?</LastName>
               <CompanyName>?</CompanyName>
               <Address1>?</Address1>
               <Address2>?</Address2>
               <Address3>?</Address3>
               <City>?</City>
               <State>?</State>
               <ZipCode>?</ZipCode>
               <Country>?</Country>
               <IsDefault>false</IsDefault>
               <AddressId>?</AddressId>
            </BillingAddress>
            <ShippingAddress>
               <FirstName>?</FirstName>
               <LastName>?</LastName>
               <CompanyName>?</CompanyName>
               <Address1>?</Address1>
               <Address2>?</Address2>
               <Address3>?</Address3>
               <City>?</City>
               <State>?</State>
               <ZipCode>?</ZipCode>
               <Country>?</Country>
               <IsDefault>false</IsDefault>
               <AddressId>?</AddressId>
            </ShippingAddress>
            <CustomerMessage>?</CustomerMessage>
            <Memo>?</Memo>
            <ShipDate>1/8/2020 12:00:00 AM</ShipDate>
            <ShipVia>?</ShipVia>
            <IsToBeEmailed>false</IsToBeEmailed>
            <IsToBePrinted>false</IsToBePrinted>
         </GetSalesOrderResult>
      </GetSalesOrderResponse>
   </s:Body>
</s:Envelope>


Response if Sales Order is not found:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body>
      <s:Fault>
         <faultcode>s:NotFound</faultcode>
         <faultstring xml:lang="en-US">Not Found</faultstring>
      </s:Fault>
   </s:Body>
</s:Envelope>
public void GetSalesOrder()
        {
            eBizService apiClient = new eBizService();
            SecurityToken securityToken = new SecurityToken
            {
                SecurityId = "*******-c870-41b8-aa5c-********",
                UserId = "",
                Password = ""
            };
            //Getting Salesorder
            SalesOrder salesOrder = apiClient.GetSalesOrder(securityToken, "APIINVCust", "", "", "********-7dfd-4aad-ae21-********");
            Console.WriteLine(salesOrder.SalesOrderNumber);
            Console.ReadLine();
         }