Prices is how you send price inquiries before booking a shipment and retrieve stored prices for follow-up.
The prices are based on your agreement with the carrier. Currently, there is support for Bring, DB Schenker, DHL Express, DHL Freight, TNT and UPS.
Go to:
The REST API endpoints are only accessible via HTTPS and are located at api.unifaun.com.
https://api.unifaun.com/rs-extapi/v1
Before getting started you need to know your developer ID and create an API key.
Fetch shipment price
POST /prices
Fetches price information about a shipment.
Specifications
You can add surcharges in amount, percentage or both.
If you enter both amount and percentage, the amount is added first and then the percentage is calculated. You write percentage as an integer, for example, "10" means "10%".
Body example
{
"additionalSurcharges": {
"percent": 10,
"amount": null
},
"shipment": {
"sender": {
"quickId": "SE"
},
"senderPartners": [{
"id": "DHL",
"custNo": "123456",
"priceEnquiry": "CARRIER"
}],
"parcels": [
{
"packageCode": "PC",
"copies": "1",
"weight": "2.6",
"length": "0.2",
"width": "0.2",
"height": "0.2",
"contents": "Stuff",
"valuePerParcel": true
}
],
"orderNo": "PRICE-1",
"senderReference": "AEXref",
"receiver": {
"name": "nShift Stockholm",
"address1": "Tegnérgatan 34",
"zipcode": "11359",
"country": "SE",
"city": "STOCKHOLM",
"phone": "+45317253500"
},
"service": {
"id": "AEX"
}
}
}
Response example
{
"priceData": {
"price": 151.12,
"additionalSurcharges": 15.13,
"priceWithAdditionalSurcharges": 166.24,
"totalWeight": null,
"chargeableWeight": 3.0
},
"errorList": null
}S
Fetch price for printed shipments
POST /prices/history
Fetches price information about a printed shipment.
Specifications
Max. 100 prices are returned per call. If more prices are available the done value in the result will be "false" and you should make another call to fetch the remaining prices.
If calls are made too fast the minDelay value in the result will return how many milliseconds you have to wait before calling again. To avoid an uneven call rate, max. one (1) call per five (5) minutes is recommended.
Query parameters
Parameter | Type | Description | Category |
fetchId |
string |
The ID of the next batch of prices to fetch. Save the fetchId returned by a previous call and use it as parameter value for the next call. |
Optional
|
For schema and testing, please refer to https://api.unifaun.com/rs-docs/.
For a description of properties, please see the Property reference guide.
For information about some crucial objects, please refer to REST API Objects.