Canada Post API - get shipping rates (SOAP)

Brelupheigree

New Member
Objective Retrieve shipping rates from Canada Post using their developer API: Canada Post APIProblemNo values are returned from Canada Post. I'm an XML newbie and not sure if my coding is correct. I'm using sample code from Canada Post's developer program shown below.Code\[code\]<!DOCTYPE html><html><header><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:rate="http://www.canadapost.ca/ws/soap/ship/rate"><soapenv:Header/><soapenv:Body> <rate:get-rates-request> <!--You may enter the following 2 items in any order--> <mailing-scenario> <customer-number> <!-- my number is here --></customer-number> <contract-id><!-- my ID is here --></contract-id> <!--You may enter the following 9 items in any order--> <parcel-characteristics> <!--You may enter the following 5 items in any order--> <weight>1</weight> </parcel-characteristics> <origin-postal-code>V6B4A2</origin-postal-code> <destination> <!--You have a CHOICE of the next 3 items at this level--> <domestic> <postal-code>J0E1X0</postal-code> </domestic> <!--<united-states> <zip-code>?</zip-code> </united-states> <international> <country-code>?</country-code> </international>--> </destination> </mailing-scenario> </rate:get-rates-request> </soapenv:Body></soapenv:Envelope></header><body></body></html>\[/code\]
 
Back
Top