Last updated: 2018-08-21
Get the user manual in PDF
To use the TranspariX Engine API follow these steps:
The QueryData object contains the details of the shipment (or route) and other query parameters (most of them optional). An example:
{
"databaseCode": "ACME-TEST",
"divisionCode": "ACME-DIV-01",
"targetCurrencyCode": "EUR",
"shipment":
{
"shipmentId": 0,
"pickup":
{
"countryCode": "PE",
"postalCode": "LIMA18",
"requestedDate": "2017-04-18"
},
"delivery":
{
"countryCode": "NL",
"postalCode": "1438AN"
},
"packages":
[
{
"packageId": 1,
"packageTypeCode": "BOX",
"weight": 2.3,
"length": 40,
"width": 50,
"height": 60
},
{
"packageId": 2,
"packageTypeCode": "BOX",
"weight": 2.3,
"length": 40,
"width": 50,
"height": 60
}
],
"packageCount": 2,
"totalWeight": 4.6,
"totalVolume": 0.24
},
"settings":
{
"engineVersion": "v8",
"calculateCostPerPackage": "true",
"ignoreSurcharges": "true"
}
}
Some notes:
POST the QueryData object to https://rate-engine-api.transparix.com/api/v1/engine
The ResultData object contains the list of forwarder services that match the requested query parameters. An example:
{
"engineVersion": "8.2018.07.17",
"resultDataVersion": "1.2018.07.25",
"forwarderServices":
[
{
"enabled": true,
"rateCode": "RATE-01",
"forwarderCode": "DHL",
"serviceCode": "DHL-X",
"transitTime": 3,
"estimatedPickupDate": "2017-12-13",
"estimatedDeliveryDate": "2017-12-16",
"deliveryTimeStart": null,
"deliveryTimeEnd": null,
"currencyCodeBeforeExchange": "EUR",
"freightRateBeforeExchange": 120,
"currencyCode": "EUR",
"freightRate": 120,
"totalSurcharge": 0,
"totalCost": 120
},
{
"enabled": true,
"rateCode": "RATE-02",
"forwarderCode": "UPS",
"serviceCode": "UPS-X",
"transitTime": 3,
"estimatedPickupDate": "2017-12-13",
"estimatedDeliveryDate": "2017-12-16",
"deliveryTimeStart": null,
"deliveryTimeEnd": null,
"currencyCodeBeforeExchange": "EUR",
"freightRateBeforeExchange": 140,
"currencyCode": "EUR",
"freightRate": 140,
"totalSurcharge": 0,
"totalCost": 140
},
],
"shipmentCostBreakdown":
{
"listOfCostPerPackage":
[
{
"packageId": 1,
"rateCode": "RATE-01",
"partOfFreightRate": 60,
"partOfTotalSurcharge": 0,
"partOfTotalCost": 60,
"percentageOfFreightRate": 50,
"percentageOfTotalSurcharge": 0,
"percentageOfTotalCost": 50
},
{
"packageId": 2,
"rateCode": "RATE-01",
"partOfFreightRate": 60,
"partOfTotalSurcharge": 0,
"partOfTotalCost": 60,
"percentageOfFreightRate": 50,
"percentageOfTotalSurcharge": 0,
"percentageOfTotalCost": 50
},
{
"packageId": 1,
"rateCode": "RATE-02",
"partOfFreightRate": 70,
"partOfTotalSurcharge": 0,
"partOfTotalCost": 70,
"percentageOfFreightRate": 50,
"percentageOfTotalSurcharge": 0,
"percentageOfTotalCost": 50
},
{
"packageId": 2,
"rateCode": "RATE-02",
"partOfFreightRate": 70,
"partOfTotalSurcharge": 0,
"partOfTotalCost": 70,
"percentageOfFreightRate": 50,
"percentageOfTotalSurcharge": 0,
"percentageOfTotalCost": 50
}
],
"listOfSurchargePerPackage": []
}
}
When running Engine 7, only one code (the customer DB code) can be provided. Some (fictional) examples:
When running Engine 8, two codes (the Engine DB code and the customer DB code) separated by a semi-colon can be provided. Some (fictional) examples:
The first part is the Engine database code. Some (real) examples:
The second part is the customer database code. Some (fictional) examples:
If only one database code is provided, then each environment will connect to its default database (for example: https://rate-engine-api-TEST.transparix.com will connect to the Engine TEST database) and the provided code will be assumed to be the customer database code.
The Query-Builder endpoint builds a QueryData object from an existing shipment.
GET https://rate-engine-api.transparix.com/api/v1/engine/query-builder/tx7/{databaseCode}/{shipmentId}