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
List: ErrorQueue
List: StockQtyListing
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 /GetLiveMultipleStockQuantity <?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> <GetLiveMultipleStockQuantity> <FirstStockCodeToGet>value </FirstStockCodeToGet> <LastStockCodeToGet>value </LastStockCodeToGet> </GetLiveMultipleStockQuantity> </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> <GetLiveMultipleStockQuantity_response> <StockQtyListing> <Item> <STOCKCODE>value </STOCKCODE> <DESCRIPTION>value </DESCRIPTION> <AVAILABLEQUANTITY>value </AVAILABLEQUANTITY> <ACTUALFREESTOCKQUANTITY>value </ACTUALFREESTOCKQUANTITY> <RESTOCKDETAILS>value </RESTOCKDETAILS> </Item> <Item> <STOCKCODE>value </STOCKCODE> <DESCRIPTION>value </DESCRIPTION> <AVAILABLEQUANTITY>value </AVAILABLEQUANTITY> <ACTUALFREESTOCKQUANTITY>value </ACTUALFREESTOCKQUANTITY> <RESTOCKDETAILS>value </RESTOCKDETAILS> </Item> </StockQtyListing> </GetLiveMultipleStockQuantity_response> </soap:Body> </soap:Envelope>
Example Code - JavaScript
function GetLiveMultipleStockQuantity_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 + "/GetLiveMultipleStockQuantity", }, 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 /GetLiveMultipleStockQuantity" --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> <GetLiveMultipleStockQuantity> <FirstStockCodeToGet>value </FirstStockCodeToGet> <LastStockCodeToGet>value </LastStockCodeToGet> </GetLiveMultipleStockQuantity> </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> <GetLiveMultipleStockQuantity_response> <StockQtyListing> <Item> <STOCKCODE>value </STOCKCODE> <DESCRIPTION>value </DESCRIPTION> <AVAILABLEQUANTITY>value </AVAILABLEQUANTITY> <ACTUALFREESTOCKQUANTITY>value </ACTUALFREESTOCKQUANTITY> <RESTOCKDETAILS>value </RESTOCKDETAILS> </Item> <Item> <STOCKCODE>value </STOCKCODE> <DESCRIPTION>value </DESCRIPTION> <AVAILABLEQUANTITY>value </AVAILABLEQUANTITY> <ACTUALFREESTOCKQUANTITY>value </ACTUALFREESTOCKQUANTITY> <RESTOCKDETAILS>value </RESTOCKDETAILS> </Item> </StockQtyListing> </GetLiveMultipleStockQuantity_response> </soap:Body> </soap:Envelope>
Example Code - JavaScript
function GetLiveMultipleStockQuantity_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 /GetLiveMultipleStockQuantity 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
Example Response
HTTP/1.1 200 OK Content-Type: text/xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <GetLiveMultipleStockQuantity_response> <StockQtyListing> <Item> <STOCKCODE>value </STOCKCODE> <DESCRIPTION>value </DESCRIPTION> <AVAILABLEQUANTITY>value </AVAILABLEQUANTITY> <ACTUALFREESTOCKQUANTITY>value </ACTUALFREESTOCKQUANTITY> <RESTOCKDETAILS>value </RESTOCKDETAILS> </Item> <Item> <STOCKCODE>value </STOCKCODE> <DESCRIPTION>value </DESCRIPTION> <AVAILABLEQUANTITY>value </AVAILABLEQUANTITY> <ACTUALFREESTOCKQUANTITY>value </ACTUALFREESTOCKQUANTITY> <RESTOCKDETAILS>value </RESTOCKDETAILS> </Item> </StockQtyListing> </GetLiveMultipleStockQuantity_response>
Example Code - JavaScript
function GetLiveMultipleStockQuantity_post(host,postdata,username,password,result){ fetch(host + "/GetLiveMultipleStockQuantity", { 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 " https://cpslive.co.uk /GetLiveMultipleStockQuantity
Try It - Live