SOAP UI with GetOrderList

331 views
Skip to first unread message

anu kumar

unread,
Nov 18, 2013, 10:04:59 AM11/18/13
to ca...@googlegroups.com
Hi Team,
 
  We are trying to impolement Channel Advisor through SAP PI as the integration tool. Could you let us know what "SOAP Action" URL need to be used in order to trigger GetOrderList interface? And also could you provide SOAP URL for the connection establishment.
 
Regards,
Anudeep Kumar

[ChannelAdvisor] Marshall McClure

unread,
Nov 18, 2013, 1:00:06 PM11/18/13
to ca...@googlegroups.com
The SOAP Action for GetOrderList is http://api.channeladvisor.com/webservices/GetOrderList

The URLs for the API services are listed on the front page of the documentation: http://developer.channeladvisor.com/display/cadn/ChannelAdvisor+Developer+Network.  To reach the endpoint for a service, just remove the ?WSDL parameter from the end.

anu kumar

unread,
Nov 19, 2013, 5:47:23 AM11/19/13
to ca...@googlegroups.com
Hi Marshall,
 
  Thanks for the reply. We have done the require configuration in our system, could any of your team member help us in performing the intial tests?
 
Regards

[ChannelAdvisor] Marshall McClure

unread,
Nov 19, 2013, 9:31:35 AM11/19/13
to ca...@googlegroups.com
What kind of help do you need?

anu kumar

unread,
Nov 19, 2013, 9:56:31 AM11/19/13
to ca...@googlegroups.com
I require a sample test case; if you already have any? And also to know whether you could receive the request from our system correctly or not.

[ChannelAdvisor] Marshall McClure

unread,
Nov 19, 2013, 10:40:42 AM11/19/13
to ca...@googlegroups.com
You will know if the request was received correctly if the response indicates success.

You can create orders for testing purposes with SubmitOrder and then retrieve them with GetOrderList, ship them with SubmitOrderShipmentList, or whatever else you want to do.  There are plenty of XML samples in the documentation for guidance, and I can generate more samples if any are missing from the docs.  The following is the minimum required for SubmitOrder to be successful.  Once you get that working you can add other information as needed.  Replace each occurrence of ... with your own information.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://api.channeladvisor.com/webservices/" xmlns:ord="http://api.channeladvisor.com/datacontracts/orders">
   <soapenv:Header>
      <web:APICredentials>
         <web:DeveloperKey>...</web:DeveloperKey>
         <web:Password>...</web:Password>
      </web:APICredentials>
   </soapenv:Header>
   <soapenv:Body>
      <web:SubmitOrder>
         <web:accountID>...</web:accountID>
         <web:order>
            <ord:OrderStatus>
               <ord:CheckoutStatus>Completed</ord:CheckoutStatus>
               <ord:PaymentStatus>Cleared</ord:PaymentStatus>
               <ord:ShippingStatus>NoChange</ord:ShippingStatus>
            </ord:OrderStatus>
            <ord:BuyerEmailAddress>...</ord:BuyerEmailAddress>
            <ord:ShoppingCart>
               <ord:CheckoutSource>Site_Checkout</ord:CheckoutSource>
               <ord:LineItemSKUList>
                  <ord:OrderLineItemItem>
                     <ord:UnitPrice>5.00</ord:UnitPrice>
                     <ord:Quantity>1</ord:Quantity>
                     <ord:ItemSaleSource>DIRECT_SALE</ord:ItemSaleSource>
                     <ord:SKU>...</ord:SKU>
                  </ord:OrderLineItemItem>
               </ord:LineItemSKUList>
            </ord:ShoppingCart>
         </web:order>
      </web:SubmitOrder>
   </soapenv:Body>
</soapenv:Envelope>

anu kumar

unread,
Nov 20, 2013, 4:36:44 AM11/20/13
to ca...@googlegroups.com
Hi,
 
 We have taken "GetOrderListSoapIn" as the request and "GetOrderListSoapOut" as the response,
 
Request,
 
<?xml version="1.0" encoding="UTF-8"?>
<ns0:GetOrderList xmlns:ns0="http://api.channeladvisor.com/webservices/">
   <ns0:accountID/>
   <ns0:orderCriteria>
      <ns1:OrderCreationFilterBeginTimeGMT xmlns:ns1="http://api.channeladvisor.com/datacontracts/orders"/>
      <ns1:OrderCreationFilterEndTimeGMT xmlns:ns1="http://api.channeladvisor.com/datacontracts/orders"/>
      <ns1:StatusUpdateFilterBeginTimeGMT xmlns:ns1="http://api.channeladvisor.com/datacontracts/orders"/>
      <ns1:StatusUpdateFilterEndTimeGMT xmlns:ns1="http://api.channeladvisor.com/datacontracts/orders"/>
      <ns1:JoinDateFiltersWithOr xmlns:ns1="http://api.channeladvisor.com/datacontracts/orders"/>
      <ns1:DetailLevel xmlns:ns1="http://api.channeladvisor.com/datacontracts/orders"/>
      <ns1:ExportState xmlns:ns1="http://api.channeladvisor.com/datacontracts/orders"/>
      <ns1:OrderIDList xmlns:ns1="http://api.channeladvisor.com/datacontracts/orders">
         <ns1:int/>
      </ns1:OrderIDList>
      <ns1:ClientOrderIdentifierList xmlns:ns1="http://api.channeladvisor.com/datacontracts/orders">
         <ns1:string/>
      </ns1:ClientOrderIdentifierList>
      <ns1:OrderStateFilter xmlns:ns1="http://api.channeladvisor.com/datacontracts/orders"/>
      <ns1:PaymentStatusFilter xmlns:ns1="http://api.channeladvisor.com/datacontracts/orders"/>
      <ns1:CheckoutStatusFilter xmlns:ns1="http://api.channeladvisor.com/datacontracts/orders"/>
      <ns1:ShippingStatusFilter xmlns:ns1="http://api.channeladvisor.com/datacontracts/orders"/>
      <ns1:RefundStatusFilter xmlns:ns1="http://api.channeladvisor.com/datacontracts/orders"/>
      <ns1:DistributionCenterCode xmlns:ns1="http://api.channeladvisor.com/datacontracts/orders"/>
      <ns1:FulfillmentTypeFilter xmlns:ns1="http://api.channeladvisor.com/datacontracts/orders"/>
      <ns1:PageNumberFilter xmlns:ns1="http://api.channeladvisor.com/datacontracts/orders"/>
      <ns1:PageSize xmlns:ns1="http://api.channeladvisor.com/datacontracts/orders"/>
   </ns0:orderCriteria>
</ns0:GetOrderList>
 
 
 
Response,
 
<?xml version="1.0" encoding="UTF-8"?>
<ns0:GetOrderListResponse xmlns:ns0="http://api.channeladvisor.com/webservices/">
   <ns0:GetOrderListResult>
      <ns0:Status/>
      <ns0:MessageCode/>
      <ns0:Message/>
      <ns0:Data/>
      <ns0:ResultData>
         <ns0:OrderResponseItem>
            <ns1:NumberOfMatches xmlns:ns1="http://api.channeladvisor.com/datacontracts/orders"/>
            <ns1:OrderTimeGMT xmlns:ns1="http://api.channeladvisor.com/datacontracts/orders"/>
            <ns1:LastUpdateDate xmlns:ns1="http://api.channeladvisor.com/datacontracts/orders"/>
            <ns1:TotalOrderAmount xmlns:ns1="http://api.channeladvisor.com/datacontracts/orders"/>
            <ns1:OrderState xmlns:ns1="http://api.channeladvisor.com/datacontracts/orders"/>
            <ns1:DateCancelledGMT xmlns:ns1="http://api.channeladvisor.com/datacontracts/orders"/>
            <ns1:OrderID xmlns:ns1="http://api.channeladvisor.com/datacontracts/orders"/>
            <ns1:ClientOrderIdentifier xmlns:ns1="http://api.channeladvisor.com/datacontracts/orders"/>
            <ns1:SellerOrderID xmlns:ns1="http://api.channeladvisor.com/datacontracts/orders"/>
            <ns1:FlagStyle xmlns:ns1="http://api.channeladvisor.com/datacontracts/orders"/>
         </ns0:OrderResponseItem>
      </ns0:ResultData>
   </ns0:GetOrderListResult>
</ns0:GetOrderListResponse>
 
 
Could you validate these, such that we will try to post one test message into ChannelAdvisor.
 
 
 
 
Regards,

[ChannelAdvisor] Marshall McClure

unread,
Nov 20, 2013, 9:35:29 AM11/20/13
to ca...@googlegroups.com
Those are the correct formats for requests and responses, so you will just need to fill in the filter criteria you want before you submit a request.

anu kumar

unread,
Nov 21, 2013, 8:43:20 AM11/21/13
to ca...@googlegroups.com
Hi Marshall,
 
  We had done a test message trigger today and got " Error While Sending Message: 500 Internal Server Error".
 
                SOAP Action -- " http://api.channeladvisor.com/webservices/GetOrderList "
 
 
Could you let us know your suggestions?
 
Regards

 

[ChannelAdvisor] Marshall McClure

unread,
Nov 21, 2013, 10:05:09 AM11/21/13
to ca...@googlegroups.com
Generally, if you see an HTTP 500 error, you can simply resubmit your request.  However, if you are consistently receiving 500 errors, your request may be malformed.  Can you provide your raw HTTP request, complete with headers and XML?  Be sure to omit your developer credentials from your XML.

anu kumar

unread,
Nov 21, 2013, 10:09:01 AM11/21/13
to ca...@googlegroups.com

<?xml version="1.0" encoding="utf-8"?><n0:GetOrderList xmlns:n0="http://api.channeladvisor.com/webservices/" xmlns:n1="http://api.channeladvisor.com/datacontracts/orders">

<n0:accountID>Test123</n0:accountID>

<n0:orderCriteria>

<n1:OrderCreationFilterBeginTimeGMT>2005-12-31T23:59:59Z</n1:OrderCreationFilterBeginTimeGMT>

<n1:OrderCreationFilterEndTimeGMT>2005-12-31T23:59:59Z</n1:OrderCreationFilterEndTimeGMT><n1:StatusUpdateFilterBeginTimeGMT>2005-12-31T23:59:59Z</n1:StatusUpdateFilterBeginTimeGMT><n1:StatusUpdateFilterEndTimeGMT>2005-12-31T23:59:59Z</n1:StatusUpdateFilterEndTimeGMT><n1:JoinDateFiltersWithOr>true</n1:JoinDateFiltersWithOr><n1:DetailLevel>High</n1:DetailLevel><n1:ExportState>None</n1:ExportState><n1:OrderIDList><n1:int>1234</n1:int><n1:int>4567</n1:int></n1:OrderIDList><n1:ClientOrderIdentifierList><n1:string>client1</n1:string><n1:string>client2</n1:string></n1:ClientOrderIdentifierList><n1:OrderStateFilter>None</n1:OrderStateFilter><n1:PaymentStatusFilter>Active</n1:PaymentStatusFilter><n1:CheckoutStatusFilter>Cleared</n1:CheckoutStatusFilter><n1:ShippingStatusFilter>Completed</n1:ShippingStatusFilter><n1:RefundStatusFilter>Unshipped</n1:RefundStatusFilter><n1:DistributionCenterCode>None</n1:DistributionCenterCode><n1:FulfillmentTypeFilter>None</n1:FulfillmentTypeFilter><n1:PageNumberFilter>1</n1:PageNumberFilter><n1:PageSize>20</n1:PageSize></n0:orderCriteria></n0:GetOrderList>

[ChannelAdvisor] Marshall McClure

unread,
Nov 21, 2013, 10:23:04 AM11/21/13
to ca...@googlegroups.com
The majority of your filter values are invalid, but that should not result in an HTTP error.  You should get a friendly error response with a descriptive message, instead.  Can you provide the complete HTTP header information from your request?

anu kumar

unread,
Nov 21, 2013, 10:27:12 AM11/21/13
to ca...@googlegroups.com
could we have a direct call for a sort period?

[ChannelAdvisor] Marshall McClure

unread,
Nov 21, 2013, 10:33:00 AM11/21/13
to ca...@googlegroups.com
You will need to go through your ChannelAdvisor account manager or other contact to set up something like that.
Message has been deleted
Message has been deleted

anu kumar

unread,
Nov 27, 2013, 11:46:45 AM11/27/13
to ca...@googlegroups.com
Hi Marshall,
 
  We could able to post a scenario; but it is giving the response xml parsing error;
 
as per our investigation; we are expecting "OrderResponseItem" in the ResultData; but we guess "OrderResponseDetialHigh" is coming as response from the Channel Advisor; could you kindly suggest us if this is true? and if this is so; we need to modify the GetOrderListSOAPOut message as per the repsonse format. ( how can we get this)?
 
Regards

[ChannelAdvisor] Marshall McClure

unread,
Nov 27, 2013, 12:27:03 PM11/27/13
to ca...@googlegroups.com
Here is what you can expect:
<OrderResponseItem xsi:type="q1:OrderResponseDetailHigh" xmlns:q1="http://api.channeladvisor.com/datacontracts/orders">

anu kumar

unread,
Nov 27, 2013, 1:11:21 PM11/27/13
to ca...@googlegroups.com
Could you help me with exact WSDL of this?
 
In the given WSDL "OrderResponseItem" mapped directly to some other set of fields and not with "DetailedItems"

[ChannelAdvisor] Marshall McClure

unread,
Nov 27, 2013, 2:29:19 PM11/27/13
to ca...@googlegroups.com
I'm not sure what you mean.

anu kumar

unread,
Dec 2, 2013, 8:04:15 AM12/2/13
to ca...@googlegroups.com
for better understanding;
 
Request
When the above request posted into CA; we are getting the below error,
 
Error:  MessagingException: SOAP: response message contains an error XIAdapter/PARSING/ADAPTER.SOAP_EXCEPTION - soap fault: Server was unable to process request. Unable to parse the request. Please validate your SOAP XML
 
The expected response XML is,
 
Response
 
<?xml version="1.0" encoding="UTF-8"?>
<ns0:GetOrderListResponse xmlns:ns0="http://api.channeladvisor.com/webservices/">
   <ns0:GetOrderListResult>
      <ns0:Status/>
      <ns0:MessageCode/>
      <ns0:Message/>
      <ns0:Data/>
      <ns0:ResultData>
         <ns0:OrderResponseItem>
            <ns1:NumberOfMatches xmlns:ns1="http://api.channeladvisor.com/datacontracts/orders"/>
            <ns1:OrderTimeGMT xmlns:ns1="http://api.channeladvisor.com/datacontracts/orders"/>
            <ns1:LastUpdateDate xmlns:ns1="http://api.channeladvisor.com/datacontracts/orders"/>
            <ns1:TotalOrderAmount xmlns:ns1="http://api.channeladvisor.com/datacontracts/orders"/>
            <ns1:OrderState xmlns:ns1="http://api.channeladvisor.com/datacontracts/orders"/>
            <ns1:DateCancelledGMT xmlns:ns1="http://api.channeladvisor.com/datacontracts/orders"/>
            <ns1:OrderID xmlns:ns1="http://api.channeladvisor.com/datacontracts/orders"/>
            <ns1:ClientOrderIdentifier xmlns:ns1="http://api.channeladvisor.com/datacontracts/orders"/>
            <ns1:SellerOrderID xmlns:ns1="http://api.channeladvisor.com/datacontracts/orders"/>
            <ns1:FlagStyle xmlns:ns1="http://api.channeladvisor.com/datacontracts/orders"/>
         </ns0:OrderResponseItem>
      </ns0:ResultData>
   </ns0:GetOrderListResult>
</ns0:GetOrderListResponse>
 
 
Could you please check whther the given response is matching up with the request? And also why we are getting this error?
 
 

[ChannelAdvisor] Marshall McClure

unread,
Dec 2, 2013, 9:41:51 AM12/2/13
to ca...@googlegroups.com
Did you cut down your XML for brevity, or is that the entire actual request?  It is missing the envelope, header, and body definitions.  Here is an example of a full request.  Bear in mind that it is neither required nor recommended to submit every field, since an order is retrieved only if it meets every filter that was submitted.


<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://api.channeladvisor.com/webservices/" xmlns:ord="http://api.channeladvisor.com/datacontracts/orders">
   <soapenv:Header>
      <web:APICredentials>
         <web:DeveloperKey>?</web:DeveloperKey>
         <web:Password>?</web:Password>

      </web:APICredentials>
   </soapenv:Header>
   <soapenv:Body>
      <web:GetOrderList>
         <web:accountID>?</web:accountID>
         <web:orderCriteria>
            <ord:OrderCreationFilterBeginTimeGMT>2013-12-01T09:30:00Z</ord:OrderCreationFilterBeginTimeGMT>
            <ord:OrderCreationFilterEndTimeGMT>2013-12-02T09:30:00Z</ord:OrderCreationFilterEndTimeGMT>
            <ord:StatusUpdateFilterBeginTimeGMT>2013-12-01T09:30:00Z</ord:StatusUpdateFilterBeginTimeGMT>
            <ord:StatusUpdateFilterEndTimeGMT>2013-12-02T09:30:00Z</ord:StatusUpdateFilterEndTimeGMT>
            <ord:JoinDateFiltersWithOr>true</ord:JoinDateFiltersWithOr>
            <ord:DetailLevel>High</ord:DetailLevel>
            <ord:ExportState>NotExported</ord:ExportState>
            <ord:OrderIDList>
               <ord:int>12345678</ord:int>
            </ord:OrderIDList>
            <ord:ClientOrderIdentifierList>
               <ord:string>123A-456B-789C</ord:string>
            </ord:ClientOrderIdentifierList>
            <ord:OrderStateFilter>Active</ord:OrderStateFilter>
            <ord:PaymentStatusFilter>Cleared</ord:PaymentStatusFilter>
            <ord:CheckoutStatusFilter>Completed</ord:CheckoutStatusFilter>
            <ord:ShippingStatusFilter>Unshipped</ord:ShippingStatusFilter>
            <ord:RefundStatusFilter>NoRefunds</ord:RefundStatusFilter>
            <ord:DistributionCenterCode>Morrisville</ord:DistributionCenterCode>
            <ord:FulfillmentTypeFilter>Ship</ord:FulfillmentTypeFilter>
            <ord:PageNumberFilter>1</ord:PageNumberFilter>
            <ord:PageSize>50</ord:PageSize>
         </web:orderCriteria>
      </web:GetOrderList>
   </soapenv:Body>
</soapenv:Envelope>

anu kumar

unread,
Dec 2, 2013, 10:37:30 AM12/2/13
to ca...@googlegroups.com
This is from SAP PI system; so the SOAP envelope will be in seperate modules,
 
SOAP Header:
 
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?><!-- Call Adapter --> <SAP:Main versionMajor="003" versionMinor="000" SOAP:mustUnderstand="1" wsu:Id="wsuid-main-92ABE13F5C59AB7FE10000000A1551F7" xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsu="http://www.docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"><SAP:MessageClass>ApplicationMessage</SAP:MessageClass><SAP:ProcessingMode>synchronous</SAP:ProcessingMode><SAP:MessageId>95A9B284-5746-11E3-B0B3-000000190A5A</SAP:MessageId><SAP:RefToMessageId>DAC58FEF-5748-11E3-9FD4-000000190A5A</SAP:RefToMessageId><SAP:TimeSent>2013-11-27T09:46:42Z</SAP:TimeSent><SAP:Sender><SAP:Service>Sender</SAP:Service><SAP:Interface namespace=""> </SAP:Interface></SAP:Sender><SAP:Receiver><SAP:Party agency="" scheme=""/><SAP:Service>Receiver</SAP:Service><SAP:Interface namespace=""></SAP:Interface><SAP:Mapping notRequired="M"><SAP:ObjectId>B2N9t7BdM4mPzrSkCguFTg==</SAP:ObjectId><SAP:SWCV>02mYQBi9Edu8tNpdnjROuQ==</SAP:SWCV><SAP:SP>-1</SAP:SP></SAP:Mapping></SAP:Receiver><SAP:Interface namespace=""></SAP:Interface></SAP:Main>
 
 
 
SOAP Body
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?><!-- Call Adapter --> <SAP:Manifest wsu:Id="wsuid-manifest-5CABE13F5C59AB7FE10000000A1551F7" xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:wsu="http://www.docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"><SAP:Payload xlink:href=""><SAP:Name>MainDocument</SAP:Name><SAP:Description/><SAP:Type>Application</SAP:Type></SAP:Payload></SAP:Manifest>

Payload
 
As pasted earlier

[ChannelAdvisor] Marshall McClure

unread,
Dec 2, 2013, 3:42:31 PM12/2/13
to ca...@googlegroups.com
Your header does not contain an APICredentials section, which is defined in the WSDL and required for our auth+auth system to work.

anu kumar

unread,
Dec 3, 2013, 7:47:29 AM12/3/13
to ca...@googlegroups.com
Are these API credntials are similar to LOGIN credentials?
 
from where I can get these "developerKey and Passowrd" ?

[ChannelAdvisor] Marshall McClure

unread,
Dec 3, 2013, 9:27:09 AM12/3/13
to ca...@googlegroups.com
API credentials and UI credentials are not related.  Instructions for our API security model are documented here: http://developer.channeladvisor.com/display/cadn/Understanding+Security.

anu kumar

unread,
Dec 4, 2013, 9:25:35 AM12/4/13
to ca...@googlegroups.com
HI Marshall,
 
  I am getting below response;
 
<soap:Envelope xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'>
                           <soap:Body>
                              <soap:Fault>
                                 <faultcode>soap:Server</faultcode>
                                 <faultstring>Server was unable to process request. Authorization failed.</faultstring>
                                 <detail/>
                              </soap:Fault>
                           </soap:Body>
                        </soap:Envelope>
 
could you guide me where I went wrong? I had given correct developerkey and password. And also how I can get the "AccountID"?

[ChannelAdvisor] Marshall McClure

unread,
Dec 4, 2013, 10:07:31 AM12/4/13
to ca...@googlegroups.com
Did you follow all of the relevant instructions from the link I provided in my previous response?  It contains instructions for everything you must do to authorize your developer key to access your ChannelAdvisor account and retrieve the AccountID of your account once your authorization is enabled.

anu kumar

unread,
Dec 5, 2013, 10:49:49 AM12/5/13
to ca...@googlegroups.com
Could you explain me on how to get this "AccountID".
 
I am presently having Developerkey and Passowrd; also Channel Advisor Client credntials. But I didnt understood on how to generate this Account ID.

[ChannelAdvisor] Marshall McClure

unread,
Dec 5, 2013, 11:03:00 AM12/5/13
to ca...@googlegroups.com
Please read all of the page I shared with you.  Step 4 of "Granting Access To An Account" clearly states that you can call GetAuthorizationList to retrieve AccountID.

anu kumar

unread,
Dec 5, 2013, 11:45:08 AM12/5/13
to ca...@googlegroups.com
Yes, I understood the first point but for calling the "RequestAccess" API; should we configure a new interface to get this Account ID? and also I want how this ID will depend? Can you share a simple example with me?

[ChannelAdvisor] Marshall McClure

unread,
Dec 5, 2013, 12:26:17 PM12/5/13
to ca...@googlegroups.com
Every ChannelAdvisor account has a Profile ID, which is an eight-digit integer.  Profile ID can be found in the account list at the top of the Account Authorizations page in the ChannelAdvisor UI.  A UI user must have Client Admin permissions to be able to access the Account Authorizations page.  To request API access to an account using the RequestAccess API method, you must submit the Profile ID of the account in the localID parameter of the RequestAccess request.  Once your authorization has been enabled by a UI user on the Account Authorizations page, you will be allowed to interact with the account through the use of API methods, and you will be able to retrieve the AccountID, which is a GUID, using the GetAuthorizationList API method.  Whether you use your own code or a tool like soapUI or Wizdler, you must use the API in order to set up API access to ChannelAdvisor accounts.

Let's pretend I own a ChannelAdvisor account and have hired you to create and API integration for me.  First, I go to the Account Authorizations page in the UI and locate my Profile ID.  Let's say my Profile ID is 99999999.  After I tell you my Profile ID, you call RequestAccess using a request similar to the following:
   <soapenv:Header>
      <web:APICredentials>
         <web:DeveloperKey>...</web:DeveloperKey>
         <web:Password>...</web:Password>

      </web:APICredentials>
   </soapenv:Header>
   <soapenv:Body>
      <web:RequestAccess>
         <web:localID>99999999</web:localID>
      </web:RequestAccess>
   </soapenv:Body>
</soapenv:Envelope>

The response will look like this:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <soap:Body>
      <RequestAccessResponse xmlns="http://api.channeladvisor.com/webservices/">
         <RequestAccessResult>
            <Status>Success</Status>
            <MessageCode>0</MessageCode>
            <ResultData>true</ResultData>
         </RequestAccessResult>
      </RequestAccessResponse>
   </soap:Body>
</soap:Envelope>

After you call RequestAccess, I see an alert in the UI notifying me about your pending authorization.  I go to the Account Authorizations page and enable your authorization, after which you receive an email from developeradmin at channeladvisor dot com notifying you that your authorization has been enabled.  Finally, you call GetAuthorizationList to retrieve my AccountID using a request similar to the following:
   <soapenv:Header>
      <web:APICredentials>
         <web:DeveloperKey>...</web:DeveloperKey>
         <web:Password>...</web:Password>

      </web:APICredentials>
   </soapenv:Header>
   <soapenv:Body>
      <web:GetAuthorizationList />
   </soapenv:Body>
</soapenv:Envelope>

The response will look similar to this:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <soap:Body>
      <GetAuthorizationListResponse xmlns="http://api.channeladvisor.com/webservices/">
         <GetAuthorizationListResult>
            <Status>Success</Status>
            <MessageCode>0</MessageCode>
            <ResultData>
               <AuthorizationResponse>
                  <AccountID>7d9fd700-7c8c-41e5-9276-9c62528ab271</AccountID>
                  <LocalID>99999999</LocalID>
                  <AccountName>Marshall's Account</AccountName>
                  <AccountType>merchant</AccountType>
                  <ResourceName>/channeladvisorapi</ResourceName>
                  <Status>Enabled</Status>
               </AuthorizationResponse>
            </ResultData>
         </GetAuthorizationListResult>
      </GetAuthorizationListResponse>
   </soap:Body>
</soap:Envelope>

If you are authorized to access multiple accounts, there will be multiple AuthorizationResponses in the ResultData array.

anu kumar

unread,
Dec 5, 2013, 12:52:52 PM12/5/13
to ca...@googlegroups.com
Thank you Marshall..!!
 
could you let me know how to call RequestAccess API? will it be similar to a SOAP call? If so, could you provide me the SOAP URL and SOAP Action?

[ChannelAdvisor] Marshall McClure

unread,
Dec 5, 2013, 2:12:08 PM12/5/13
to ca...@googlegroups.com
RequestAccess is a SOAP webservice method, just like any other method in our API.  It is part of AdminService.  You can find the SOAP Action of any API method in the WSDL for that service.
Reply all
Reply to author
Forward
0 new messages