Authentication

The Better Tracking API is secured from unauthorised use by restricting requests using basic HTTP authentication.

The Authorization header should contain an API key, a unique alphanumeric string that associates your customer billing account with your requests.

To get an api key please contact the BetterTracking team at tracking@bettermile.com.

Parcel

The Parcel endpoint returns information regarding a given parcel. This broadly includes shipper and consignee address, delivery information, ETA timestamps and much more.

SecuritybasicAuth
Request
path Parameters
parcelIdentifier
required
string

Parcel number or tracking id

Example: 10362781851
Responses
200

Parcel response

401

Authorization information is missing or invalid

429

Rate limit exceeded

default

Error message

get/external/parcel/{parcelIdentifier}
Request samples
Response samples
application/json
{
  • "trackingId": "YUTKBBTN",
  • "parcelNumber": "10362781851",
  • "status": {
    },
  • "shipperId": "bmw",
  • "jobType": "DELIVERY",
  • "supportedCustomizedDeliveryTypes": [
    ],
  • "customizedDelivery": {
    },
  • "fromAddress": {
    },
  • "toAddress": {
    }
}

Tracking Availability

Checks if parcel is in delivery and real time tracking is available

SecuritybasicAuth
Request
path Parameters
parcelIdentifier
required
string

Parcel number or tracking id

Example: 10362781851
Responses
200

Parcel is in delivery and available for real time tracking

401

Authorization information is missing or invalid

404

Parcel not found or not available for real time tracking

429

Rate limit exceeded

default

Error message

get/external/parcel/{parcelIdentifier}/availability
Request samples
Response samples
application/json
{
  • "timestamp": "2022-01-15T14:33:25Z",
  • "path": "/v1/external/parcel",
  • "status": 401,
  • "error": "Unauthorized",
  • "message": "Authorization required",
  • "requestId": "331f2ea7-197"
}

Tracking Subscribe

This endpoint allows you to subscribe to tracking updates for a specific parcel. It provides detailed information about the parcel’s status, ensuring that it can be tracked throughout its journey.

Securityapi_key
Request
Request Body schema: application/json
required
parcelNumber
required
string
tenantId
required
string
Responses
200

OK

401

Unauthorized

404

Parcel not found

500

Server error

post/parcel-tracking-subscribe
Request samples
application/json
{
  • "parcelNumber": "string",
  • "tenantId": "string"
}
Response samples
application/json
{
  • "parcelNumber": "string",
  • "tenantId": "string",
  • "status": {
    }
}

Availability EventWebhook POST

Parcel is available for real time tracking

SecuritysharedAccessSignature
Request
Request Body schema: application/json
parcelNumber
string
tenantId
string
createdAt
string <date-time>
Responses
200

event received and processed

Request samples
application/json
{
  • "parcelNumber": "string",
  • "tenantId": "string",
  • "createdAt": "2019-08-24T14:15:22Z"
}

Tracking EventWebhook POST

Parcel tracking update

SecuritysharedAccessSignature
Request
Request Body schema: application/json
parcelNumber
string
tenantId
string
object
Responses
200

event received and processed

Request samples
application/json
{
  • "parcelNumber": "string",
  • "tenantId": "string",
  • "status": {
    }
}