You must be logged in to use this method. Basic Authentication is supported.
Field: FirstStockCodeToGet
(string[40])
String from 0 to 40 characters
This parameter is Optional
Field: LastStockCodeToGet
(string[40])
String from 0 to 40 characters
This parameter is Optional
Field: BrandFilter
(string[30])
String from 0 to 30 characters
This parameter is Optional
List: ErrorQueue
List: Retailerstocklist
The following is a sample SOAP 1.1 request and response. The
placeholders shown need to be replaced with actual values.
Example Request
POST /Livesync HTTP/1.1 Authorization: Basic ZGVtbzpkZW1v Host: cpslive.co.uk Accept: application/xml Content-Type: text/xml Content-Length: length SOAPAction: https://cpslive.co.uk /GetRetailerStockList <?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> <GetRetailerStockList> <FirstStockCodeToGet>value </FirstStockCodeToGet> <LastStockCodeToGet>value </LastStockCodeToGet> <BrandFilter>value </BrandFilter> </GetRetailerStockList> </soap:Body> </soap:Envelope>
Example Response
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> <GetRetailerStockList_response> <Retailerstocklist> <Items> <STOCKCODE>value </STOCKCODE> <DESCRIPTION>value </DESCRIPTION> <BARCODE>value </BARCODE> <RETAILERCODE>value </RETAILERCODE> <AVAILABLEQUANTITY>value </AVAILABLEQUANTITY> <ACTUALFREESTOCKQUANTITY>value </ACTUALFREESTOCKQUANTITY> <RESTOCKDETAILS>value </RESTOCKDETAILS> <RETAILERPRICE>value </RETAILERPRICE> <TRADEPRICE>value </TRADEPRICE> <RRP>value </RRP> <LARGEIMAGE>value </LARGEIMAGE> <WEIGHTGRAMS>value </WEIGHTGRAMS> <BRAND>value </BRAND> <COMMODITYCODE>value </COMMODITYCODE> </Items> <Items> <STOCKCODE>value </STOCKCODE> <DESCRIPTION>value </DESCRIPTION> <BARCODE>value </BARCODE> <RETAILERCODE>value </RETAILERCODE> <AVAILABLEQUANTITY>value </AVAILABLEQUANTITY> <ACTUALFREESTOCKQUANTITY>value </ACTUALFREESTOCKQUANTITY> <RESTOCKDETAILS>value </RESTOCKDETAILS> <RETAILERPRICE>value </RETAILERPRICE> <TRADEPRICE>value </TRADEPRICE> <RRP>value </RRP> <LARGEIMAGE>value </LARGEIMAGE> <WEIGHTGRAMS>value </WEIGHTGRAMS> <BRAND>value </BRAND> <COMMODITYCODE>value </COMMODITYCODE> </Items> </Retailerstocklist> </GetRetailerStockList_response> </soap:Body> </soap:Envelope>
Example Code - JavaScript
function GetRetailerStockList_soap11(host,xmldata,username,password,result){ fetch(host + "/Livesync", { method: "POST", credentials: "include", headers: { "Authorization": "Basic " + btoa(username + ":" + password), "Content-Type": "text/xml; charset=utf-8", "Accept": "application/xml;", "SOAPAction": host + "/GetRetailerStockList", }, body: xmldata }).then(function(response){ // get the text out of the reply return response.text() }).then( function(text){ // do something with the text reply textToTextarea(text,result) }) } var host = "https://cpslive.co.uk"
Example Code - CURL
CURL --user Username :Password --header "Content-Type: text/xml; ; charset=utf-8" --header "Accept: application/xml" --header "SOAPAction: cpslive.co.uk /GetRetailerStockList" --data-binary @xmlDataFile.xml https://cpslive.co.uk /Livesync
Try It - Live
xmldata
Try it : Soap 1.1 POST result
The following is a sample SOAP 1.2 request and response. The placeholders shown need to be replaced with actual values.
Example Request
POST /Livesync HTTP/1.1 Authorization: Basic ZGVtbzpkZW1v Host: cpslive.co.uk Accept: application/xml Content-Type: application/soap+xml 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://www.w3.org/2003/05/soap-envelope"> <soap:Body> <GetRetailerStockList> <FirstStockCodeToGet>value </FirstStockCodeToGet> <LastStockCodeToGet>value </LastStockCodeToGet> <BrandFilter>value </BrandFilter> </GetRetailerStockList> </soap:Body> </soap:Envelope>
Example Response
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> <GetRetailerStockList_response> <Retailerstocklist> <Items> <STOCKCODE>value </STOCKCODE> <DESCRIPTION>value </DESCRIPTION> <BARCODE>value </BARCODE> <RETAILERCODE>value </RETAILERCODE> <AVAILABLEQUANTITY>value </AVAILABLEQUANTITY> <ACTUALFREESTOCKQUANTITY>value </ACTUALFREESTOCKQUANTITY> <RESTOCKDETAILS>value </RESTOCKDETAILS> <RETAILERPRICE>value </RETAILERPRICE> <TRADEPRICE>value </TRADEPRICE> <RRP>value </RRP> <LARGEIMAGE>value </LARGEIMAGE> <WEIGHTGRAMS>value </WEIGHTGRAMS> <BRAND>value </BRAND> <COMMODITYCODE>value </COMMODITYCODE> </Items> <Items> <STOCKCODE>value </STOCKCODE> <DESCRIPTION>value </DESCRIPTION> <BARCODE>value </BARCODE> <RETAILERCODE>value </RETAILERCODE> <AVAILABLEQUANTITY>value </AVAILABLEQUANTITY> <ACTUALFREESTOCKQUANTITY>value </ACTUALFREESTOCKQUANTITY> <RESTOCKDETAILS>value </RESTOCKDETAILS> <RETAILERPRICE>value </RETAILERPRICE> <TRADEPRICE>value </TRADEPRICE> <RRP>value </RRP> <LARGEIMAGE>value </LARGEIMAGE> <WEIGHTGRAMS>value </WEIGHTGRAMS> <BRAND>value </BRAND> <COMMODITYCODE>value </COMMODITYCODE> </Items> </Retailerstocklist> </GetRetailerStockList_response> </soap:Body> </soap:Envelope>
Example Code - JavaScript
function GetRetailerStockList_soap12(host,xmldata,username,password,result){ fetch(host + "/Livesync", { method: "POST", credentials: "include", headers: { "Authorization": "Basic " + btoa(username + ":" + password), "Content-Type": "application/soap+xml; charset=utf-8", "Accept": "application/xml;", }, body: xmldata }).then(function(response){ // get the text out of the reply return response.text() }).then( function(text){ // do something with the text reply textToTextarea(text,result) }) } var host = "https://cpslive.co.uk"
Example Code - CURL
CURL --user Username :Password --header "Content-Type: application/soap+xml; charset=utf-8" --header "Accept: application/xml" --data-binary @xmlDataFile.xml https://cpslive.co.uk /Livesync
Try It - Live
xmldata
Try it : Soap 1.2 POST result
The following is a sample HTTP POST request and response. The placeholders shown need to be replaced with actual values.
Example Request
POST /GetRetailerStockList HTTP/1.1 Authorization: Basic ZGVtbzpkZW1v Host: cpslive.co.uk Accept: application/xml Content-Type: application/x-www-form-urlencoded Content-Length: length FirstStockCodeToGet=value &LastStockCodeToGet=value &BrandFilter=value
Example Response
HTTP/1.1 200 OK Content-Type: text/xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <GetRetailerStockList_response> <Retailerstocklist> <Items> <STOCKCODE>value </STOCKCODE> <DESCRIPTION>value </DESCRIPTION> <BARCODE>value </BARCODE> <RETAILERCODE>value </RETAILERCODE> <AVAILABLEQUANTITY>value </AVAILABLEQUANTITY> <ACTUALFREESTOCKQUANTITY>value </ACTUALFREESTOCKQUANTITY> <RESTOCKDETAILS>value </RESTOCKDETAILS> <RETAILERPRICE>value </RETAILERPRICE> <TRADEPRICE>value </TRADEPRICE> <RRP>value </RRP> <LARGEIMAGE>value </LARGEIMAGE> <WEIGHTGRAMS>value </WEIGHTGRAMS> <BRAND>value </BRAND> <COMMODITYCODE>value </COMMODITYCODE> </Items> <Items> <STOCKCODE>value </STOCKCODE> <DESCRIPTION>value </DESCRIPTION> <BARCODE>value </BARCODE> <RETAILERCODE>value </RETAILERCODE> <AVAILABLEQUANTITY>value </AVAILABLEQUANTITY> <ACTUALFREESTOCKQUANTITY>value </ACTUALFREESTOCKQUANTITY> <RESTOCKDETAILS>value </RESTOCKDETAILS> <RETAILERPRICE>value </RETAILERPRICE> <TRADEPRICE>value </TRADEPRICE> <RRP>value </RRP> <LARGEIMAGE>value </LARGEIMAGE> <WEIGHTGRAMS>value </WEIGHTGRAMS> <BRAND>value </BRAND> <COMMODITYCODE>value </COMMODITYCODE> </Items> </Retailerstocklist> </GetRetailerStockList_response>
Example Code - JavaScript
function GetRetailerStockList_post(host,postdata,username,password,result){ fetch(host + "/GetRetailerStockList", { method: "POST", credentials: "include", headers: { "Authorization": "Basic " + btoa(username + ":" + password), "Content-Type": "application/x-www-form-urlencoded", "Accept": "application/xml;", }, body: postdata }).then(function(response){ // get the text out of the reply return response.text() }).then( function(text){ // do something with the text reply textToTextarea(text,result) }) } var host = "https://cpslive.co.uk"
Example Code - CURL
CURL --user Username :Password --header "Content-Type: application/x-www-form-urlencoded; charset=utf-8" --header "Accept: application/xml" --data "FirstStockCodeToGet=value &LastStockCodeToGet=value &BrandFilter=value " https://cpslive.co.uk /GetRetailerStockList
Try It - Live