OnlineAPI
Click here for a complete list of operations.
OnlineOrder_GetShipMethods_v3
This method will return the allowable shipping methods for a specified online order. Note: Because different shipping methods will be available depending upon setup and territory. One should always call this method to return the shipping methods for a specified online order as even the total weight of an online order can change which shipping methods are available. In addition to previus versions, this retrieves the tax rate and tax included shipping price of the online order for the found shipping methods. This is useful for those companies that manage Simple Extended Tax Engine for handling VAT tax calculations.
Other Inputs: LocaleID (1 being default) and IncludeTax (specify whether PriceInclTax and TaxRate output parameters should be calculated, if IncludeTax is set to False, PriceInclTax and TaxRate will be null).
Output Messages: This method will return a status message of the transaction. Besides, the output Success will return 1 or 0 if there was success or not, respectively
INVALID_CREDENTIALS: Means that credentials are incorrect or invalid
INVALID_ONLINEORDERID: Means that provided OnlineOrder# was not found in the system
NO_SHIPCOUNTRY_FOUND: Means that user set IncludeTax enable and provided OnlineOrder# does not have an allocated ship country yet. For calculating shipping tax is mandatory to set at least a shipping country.
TRANSACTION_DISPATCHED_EXCEPTION: In case we get an error in the transaction, we will communicate that by this message.
NO_DATA_FOUND: This is not an error. Success output is set to 1. This message indicates that query was executed correctly but doesn't retrieve any shipping method.
SUCCESS: Means that API method retrieved shipping methods correctly.
Other Notes: If IncludeTax is set enable, and records were retrieved successfully but TaxRate and PriceInclTax are NULL means this method was not able to calculate the shiping tax rate for the found ship methods.
Test
The test form is only available for requests from the local machine.SOAP 1.1
The following is a sample SOAP 1.1 request and response. The placeholders shown need to be replaced with actual values.
POST /adapturedemo/webservice/OnlineAPI.asmx HTTP/1.1 Host: api.securefreedom.com Content-Type: text/xml; charset=utf-8 Content-Length: length SOAPAction: "http://www.securefreedom.com/OnlineOrder_GetShipMethods_v3" <?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> <OnlineOrder_GetShipMethods_v3 xmlns="http://www.securefreedom.com/"> <Credentials> <Username>string</Username> <Password>string</Password> <Token>string</Token> </Credentials> <OnlineOrderID>int</OnlineOrderID> <LocaleID>int</LocaleID> <IncludeTax>boolean</IncludeTax> </OnlineOrder_GetShipMethods_v3> </soap:Body> </soap:Envelope>
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> <OnlineOrder_GetShipMethods_v3Response xmlns="http://www.securefreedom.com/"> <OnlineOrder_GetShipMethods_v3Result> <ShipMethods> <ShipMethods_v3> <ShipMethodID>int</ShipMethodID> <Description>string</Description> <Price>decimal</Price> <PriceInclTax>double</PriceInclTax> <TaxRate>double</TaxRate> <SortOrder>int</SortOrder> <SMTSortOrder>int</SMTSortOrder> </ShipMethods_v3> <ShipMethods_v3> <ShipMethodID>int</ShipMethodID> <Description>string</Description> <Price>decimal</Price> <PriceInclTax>double</PriceInclTax> <TaxRate>double</TaxRate> <SortOrder>int</SortOrder> <SMTSortOrder>int</SMTSortOrder> </ShipMethods_v3> </ShipMethods> </OnlineOrder_GetShipMethods_v3Result> </OnlineOrder_GetShipMethods_v3Response> </soap:Body> </soap:Envelope>
SOAP 1.2
The following is a sample SOAP 1.2 request and response. The placeholders shown need to be replaced with actual values.
POST /adapturedemo/webservice/OnlineAPI.asmx HTTP/1.1 Host: api.securefreedom.com Content-Type: application/soap+xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope"> <soap12:Body> <OnlineOrder_GetShipMethods_v3 xmlns="http://www.securefreedom.com/"> <Credentials> <Username>string</Username> <Password>string</Password> <Token>string</Token> </Credentials> <OnlineOrderID>int</OnlineOrderID> <LocaleID>int</LocaleID> <IncludeTax>boolean</IncludeTax> </OnlineOrder_GetShipMethods_v3> </soap12:Body> </soap12:Envelope>
HTTP/1.1 200 OK Content-Type: application/soap+xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope"> <soap12:Body> <OnlineOrder_GetShipMethods_v3Response xmlns="http://www.securefreedom.com/"> <OnlineOrder_GetShipMethods_v3Result> <ShipMethods> <ShipMethods_v3> <ShipMethodID>int</ShipMethodID> <Description>string</Description> <Price>decimal</Price> <PriceInclTax>double</PriceInclTax> <TaxRate>double</TaxRate> <SortOrder>int</SortOrder> <SMTSortOrder>int</SMTSortOrder> </ShipMethods_v3> <ShipMethods_v3> <ShipMethodID>int</ShipMethodID> <Description>string</Description> <Price>decimal</Price> <PriceInclTax>double</PriceInclTax> <TaxRate>double</TaxRate> <SortOrder>int</SortOrder> <SMTSortOrder>int</SMTSortOrder> </ShipMethods_v3> </ShipMethods> </OnlineOrder_GetShipMethods_v3Result> </OnlineOrder_GetShipMethods_v3Response> </soap12:Body> </soap12:Envelope>