DataShift
FreightAPI Reference

Rates | Freight API

Freight API reference for rates: quote a consignment across every active carrier account at once, with price, transit days and delivery date.

POST
/rates

Fans out to every active carrier connector for the authenticated tenant and returns all available services. Uses Promise.allSettled — one carrier being down does not fail the request; its error entry is included in the response instead.

Authorization

FreightApiKey
headerAuthorizationBearer <dsfrt_<64-hex-chars>>

API key issued from Settings → Freight → API Keys. The raw key is shown once at creation.

Request Body

application/json
  1. body
from*
to*
packages*array<>
Items1 <= items
dangerousGoods*boolean
date?string

Shipping date (YYYY-MM-DD). Defaults to today in timezone if supplied, otherwise Australia/Sydney.

Formatdate
localDateTime?string

Current local time (yyyy-MM-ddTHH:mm:ss, no TZ suffix). Used by TNT to determine booking cutoff eligibility. Defaults to the current time in timezone if supplied, otherwise Australia/Sydney.

Formatdate-time
serviceCode?string

If set, returns pricing for this service only. Omit (or pass null) to receive all available services.

isDocument?boolean

Mark as a document shipment (TNT AU — affects packaging type and commodity code)

businessUnit?string

Selects which TGE AU business unit config (account code / rate card) to use. Ignored by carriers other than TGE AU.

Value in"IPEC""PRIORITY_AU"
timezone?string

IANA timezone of the collection location, used by TNT AU to default date/localDateTime when they are not supplied. Must be one of the seven distinct AU state/territory IANA zones (e.g. Australia/Sydney, Australia/Perth) — any other value is ignored and the server falls back to its own resolved timezone. Ignored by carriers other than TNT AU.

Response Body

Rate results from all connectors. Each entry is either a successful carrier result or an error — check success to distinguish.

application/json
  1. response
quoteId*string

Identifies this rate-shop call as a whole — every rate across every carrier in results was requested together under this id. Not the same as any individual rate's own rateId. Returned even when the tenant has no active connectors, in which case results is empty.

results*array<>
Example Request
curl -X POST 'https://datashift.com.au/api/freight/rates' \  -H 'Content-Type: application/json' \  -d '{  "from": {    "suburb": "Sydney",    "postcode": "2000",    "state": "NSW",    "residential": false  },  "to": {    "suburb": "Melbourne",    "postcode": "3000",    "state": "VIC",    "residential": false  },  "packages": [    {      "count": 1,      "lengthCm": 30,      "widthCm": 20,      "heightCm": 20,      "weightKg": 5    }  ],  "dangerousGoods": false}'
Example Response
{  "quoteId": "b2c3d4e5-...",  "results": [    {      "connectorId": "conn_tnt_01",      "carrier": "TNT AU",      "success": true,      "rates": [        {          "rateId": "a1b2c3d4-...",          "serviceCode": "76",          "description": "Road Express",          "price": 18.18,          "currency": "AUD",          "eta": "2026-06-26T17:00:00",          "bookingCutoff": "16:00:00",          "collectionCutoff": "16:00:00"        }      ]    },    {      "connectorId": "conn_startrack_01",      "carrier": "StarTrack",      "success": false,      "error": {        "message": "Carrier API unavailable",        "code": "HTTP_503"      }    }  ]}
POST
/{connectorId}/rates

Queries a single carrier connector. Set serviceCode to get pricing for one service only; omit it to receive all available services.

Authorization

FreightApiKey
headerAuthorizationBearer <dsfrt_<64-hex-chars>>

API key issued from Settings → Freight → API Keys. The raw key is shown once at creation.

Path Parameters

connectorId*string

Database ID of the carrier connector account (from GET /connectors)

Request Body

application/json
  1. body
from*
to*
packages*array<>
Items1 <= items
dangerousGoods*boolean
date?string

Shipping date (YYYY-MM-DD). Defaults to today in timezone if supplied, otherwise Australia/Sydney.

Formatdate
localDateTime?string

Current local time (yyyy-MM-ddTHH:mm:ss, no TZ suffix). Used by TNT to determine booking cutoff eligibility. Defaults to the current time in timezone if supplied, otherwise Australia/Sydney.

Formatdate-time
serviceCode?string

If set, returns pricing for this service only. Omit (or pass null) to receive all available services.

isDocument?boolean

Mark as a document shipment (TNT AU — affects packaging type and commodity code)

businessUnit?string

Selects which TGE AU business unit config (account code / rate card) to use. Ignored by carriers other than TGE AU.

Value in"IPEC""PRIORITY_AU"
timezone?string

IANA timezone of the collection location, used by TNT AU to default date/localDateTime when they are not supplied. Must be one of the seven distinct AU state/territory IANA zones (e.g. Australia/Sydney, Australia/Perth) — any other value is ignored and the server falls back to its own resolved timezone. Ignored by carriers other than TNT AU.

Response Body

Available rated services for this connector

application/json
  1. response
quoteId*string

Identifies this rate-shop call as a whole — every rate in rates was requested together under this id.

rates*array<>
Example Request
curl -X POST 'https://datashift.com.au/api/freight/string/rates' \  -H 'Content-Type: application/json' \  -d '{  "from": {    "suburb": "Sydney",    "postcode": "2000",    "state": "NSW",    "residential": false  },  "to": {    "suburb": "Melbourne",    "postcode": "3000",    "state": "VIC",    "residential": false  },  "packages": [    {      "count": 1,      "lengthCm": 30,      "widthCm": 20,      "heightCm": 20,      "weightKg": 5    }  ],  "dangerousGoods": false,  "serviceCode": "76"}'
Example Response
{  "quoteId": "b2c3d4e5-...",  "rates": [    {      "serviceCode": "76",      "description": "Road Express",      "price": 18.18,      "currency": "AUD",      "eta": "2026-06-26T17:00:00",      "bookingCutoff": "16:00:00",      "collectionCutoff": "16:00:00"    }  ]}