REST Request Access Endpoint

Important Note!
This request should only be made when using the SOAP API Credentials Flow for REST authorization.

  • SOAP API Credentials authorization is common for clients migrating from SOAP to REST or those adding an additional profile when the original authorization was executed with SOAP API Credentials Flow.
  • This request is normally submitted using a SOAP client, but can be made using a REST client with some minor changes in data handling.

Resource URL / Endpoint

POST https://api.channeladvisor.com/ChannelAdvisorAPI/v7/AdminService.asmx

Required Headers

Content-Type: text/xml; charset=utf-8
SOAPAction: "http://api.channeladvisor.com/webservices/RequestAccess"

Important and/or Required Parameters

Property
Name
Required
Note

DeveloperKey

Developer KeyRequired 

Password

PasswordRequired 
LocalIDLocal IDRequiredThis is the Profile ID of the profile requested. Only one can be included in the request.
Reach out to ChannelAdvisor contact or ChannelAdvisor Support to provide this information.

Body

Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://api.channeladvisor.com/webservices/">
   <soapenv:Header>
      <web:APICredentials>
         <web:DeveloperKey>Insert Developer Key</web:DeveloperKey>
         <web:Password>Insert Developer Password</web:Password>
      </web:APICredentials>
   </soapenv:Header>
   <soapenv:Body>
      <web:RequestAccess>
         <web:localID>Insert Local ID / Profile ID</web:localID>
      </web:RequestAccess>
   </soapenv:Body>
</soapenv:Envelope>
Response (Success)
200 OK
<?xml version="1.0" encoding="utf-8"?>
<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>

Complete Code Request with Headers

HTTP Request
POST /ChannelAdvisorAPI/v7/AdminService.asmx HTTP/1.1
Host: api.channeladvisor.com
Content-Type: text/xml; charset=utf-8
SOAPAction: "http://api.channeladvisor.com/webservices/RequestAccess"
Cache-Control: no-cache
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://api.channeladvisor.com/webservices/">
   <soapenv:Header>
      <web:APICredentials>
         <web:DeveloperKey>Insert Developer Key</web:DeveloperKey>
         <web:Password>Insert Developer Password</web:Password>
      </web:APICredentials>
   </soapenv:Header>
   <soapenv:Body>
      <web:RequestAccess>
         <web:localID>Insert Local ID / Profile ID</web:localID>
      </web:RequestAccess>
   </soapenv:Body>
</soapenv:Envelope>

Code samples provided here are generated by clients and their developers. ChannelAdvisor cannot provide code for API development purposes.

The API documentation is meant to represent the final format to be delivered to the API.

To see other developer's code to execute requests, make a request of them on the ChannelAdvisor Google Forum.

Javascript Jquery AJAX Code Sample

Request
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://api.channeladvisor.com/ChannelAdvisorAPI/v7/AdminService.asmx",
  "method": "POST",
  "headers": {
    "content-type": "text/xml; charset=utf-8",
    "soapaction": "\\\"http://api.channeladvisor.com/webservices/RequestAccess\\\"",
    "cache-control": "no-cache"
  },
  "data": "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:web=\"http://api.channeladvisor.com/webservices/\">\r\n   <soapenv:Header>\r\n      <web:APICredentials>\r\n         <web:DeveloperKey>Insert Developer Key</web:DeveloperKey>\r\n         <web:Password>Insert Developer Password</web:Password>\r\n      </web:APICredentials>\r\n   </soapenv:Header>\r\n   <soapenv:Body>\r\n      <web:RequestAccess>\r\n         <web:localID>Insert Local ID / Profile ID</web:localID>\r\n      </web:RequestAccess>\r\n   </soapenv:Body>\r\n</soapenv:Envelope>"
}
$.ajax(settings).done(function (response) {
  console.log(response);
});

PHP HTTP V2 Code Sample

Request
<?php
$client = new http\Client;
$request = new http\Client\Request;
$body = new http\Message\Body;
$body->append('<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://api.channeladvisor.com/webservices/">
   <soapenv:Header>
      <web:APICredentials>
         <web:DeveloperKey>Insert Developer Key</web:DeveloperKey>
         <web:Password>Insert Developer Password</web:Password>
      </web:APICredentials>
   </soapenv:Header>
   <soapenv:Body>
      <web:RequestAccess>
         <web:localID>Insert Local ID / Profile ID</web:localID>
      </web:RequestAccess>
   </soapenv:Body>
</soapenv:Envelope>');
$request->setRequestUrl('https://api.channeladvisor.com/ChannelAdvisorAPI/v7/AdminService.asmx');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders(array(
  'cache-control' => 'no-cache',
  'soapaction' => '\\"http://api.channeladvisor.com/webservices/RequestAccess\\"',
  'content-type' => 'text/xml; charset=utf-8'
));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();

Python 3 Code Sample

Request
import http.client
conn = http.client.HTTPSConnection("api.channeladvisor.com")
payload = "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:web=\"http://api.channeladvisor.com/webservices/\">\r\n   <soapenv:Header>\r\n      <web:APICredentials>\r\n         <web:DeveloperKey>Insert Developer Key</web:DeveloperKey>\r\n         <web:Password>Insert Developer Password</web:Password>\r\n      </web:APICredentials>\r\n   </soapenv:Header>\r\n   <soapenv:Body>\r\n      <web:RequestAccess>\r\n         <web:localID>Insert Local ID / Profile ID</web:localID>\r\n      </web:RequestAccess>\r\n   </soapenv:Body>\r\n</soapenv:Envelope>"
headers = {
    'content-type': "text/xml; charset=utf-8",
    'soapaction': "\"http://api.channeladvisor.com/webservices/RequestAccess\"",
    'cache-control': "no-cache"
    }
conn.request("POST", "/ChannelAdvisorAPI/v7/AdminService.asmx", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))

Java OK Code Sample

Request
import http.client
conn = http.client.HTTPSConnection("api.channeladvisor.com")
payload = "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:web=\"http://api.channeladvisor.com/webservices/\">\r\n   <soapenv:Header>\r\n      <web:APICredentials>\r\n         <web:DeveloperKey>Insert Developer Key</web:DeveloperKey>\r\n         <web:Password>Insert Developer Password</web:Password>\r\n      </web:APICredentials>\r\n   </soapenv:Header>\r\n   <soapenv:Body>\r\n      <web:RequestAccess>\r\n         <web:localID>Insert Local ID / Profile ID</web:localID>\r\n      </web:RequestAccess>\r\n   </soapenv:Body>\r\n</soapenv:Envelope>"
headers = {
    'content-type': "text/xml; charset=utf-8",
    'soapaction': "\"http://api.channeladvisor.com/webservices/RequestAccess\"",
    'cache-control': "no-cache"
    }
conn.request("POST", "/ChannelAdvisorAPI/v7/AdminService.asmx", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))

C# (RestSharp) Code Sample

Request
var client = new RestClient("https://api.channeladvisor.com/ChannelAdvisorAPI/v7/AdminService.asmx");
var request = new RestRequest(Method.POST);
request.AddHeader("cache-control", "no-cache");
request.AddHeader("soapaction", "\"http://api.channeladvisor.com/webservices/RequestAccess\"");
request.AddHeader("content-type", "text/xml; charset=utf-8");
request.AddParameter("text/xml; charset=utf-8", "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:web=\"http://api.channeladvisor.com/webservices/\">\r\n   <soapenv:Header>\r\n      <web:APICredentials>\r\n         <web:DeveloperKey>Insert Developer Key</web:DeveloperKey>\r\n         <web:Password>Insert Developer Password</web:Password>\r\n      </web:APICredentials>\r\n   </soapenv:Header>\r\n   <soapenv:Body>\r\n      <web:RequestAccess>\r\n         <web:localID>Insert Local ID / Profile ID</web:localID>\r\n      </web:RequestAccess>\r\n   </soapenv:Body>\r\n</soapenv:Envelope>", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);