Shipping Cost Estimation
Shipping cost estimation
To estimate the cost of shipping your goods, you can use this resource.
- Requires authentication: Yes
- Requires sender ID: Yes
Usage
Requesting a cost estimation for a consignment
cURLcurl -g -XPOST Denne e-postadressen er beskyttet mot programmer som samler e-postadresser. Du må aktivere javaskript for å kunne se den. -H'X-Cargonizer-Key: 12345' -H'X-Cargonizer-Sender: 678' 'https://cargonizer.no/consignment_costs.xml'
HTTPPOST /consignment_costs.xml HTTP/1.1 Host: cargonizer.no X-Cargonizer-Key: 12345 X-Cargonizer-Sender: 678 <contents of file "consignment.xml">
Pseudocodehttp = new HTTPRequest(); http.method = 'POST'; http.url = 'https://cargonizer.no/consignment_costs.xml'; http.headers.add('X-Cargonizer-Key', '12345'); http.headers.add('X-Cargonizer-Sender', '678'); http.body = new File('consignment.xml').read(); response = http.execute();
The contents of consignment_costs.xml are the same as those for creating a consignment.
Example of a minimal consignment_costs.xml for calculating shipping cost
<consignments>
<consignment transport_agreement="12345">
<product>bring2_business_parcel</product>
<parts>
<consignee>
<name>Juan Ponce De Leon</name>
<country>NO</country>
<postcode>1337</postcode>
</consignee>
</parts>
<items>
<item type="package" amount="1" weight="12" volume="27"/>
</items>
</consignment>
</consignments>
Note: Weight in kg. Volume in dm3.
XML Response Description
Gross amount is the freight price without your transport agreement and net amount is the freight price calculated by using your transport agreement.
<estimated-cost type=”float”> | Gross price |
<gross-amount type=”float”> | Gross price |
<net-amount type=”float”> | Net price |
XML Response with Example Values
<?xml version="1.0" encoding="UTF-8"?>
<consignment-cost>
<estimated-cost type="float">96.25</estimated-cost>
<gross-amount type="float">96.25</gross-amount>
<net-amount type="float">55.30</net-amount>
</consignment-cost>