Skip to Content
TimeToCargo

API reference

Download OpenAPI

List supported carriers

GET
/v2/companies

Returns SCAC codes, cn/bl/bk support flags and availability with active and deactivated_at for each type. Disabling one type does not change support for the others. Null means an unsupported type. For AUTO, all three types return { active: true, deactivated_at: null }, indicating automatic detection availability rather than the availability of every carrier. Cached status refreshes every two minutes; Core checks actual availability.

Authorization

api_key
queryapi_key<token>

Response Body

OK

application/json
  1. response
success*boolean

Whether processing succeeded. For tracking results, also check status: success=true does not mean data was found.

data*

Key is the full company name, value includes SCAC and supported tracking type flags.

Example Request
curl -X GET 'https://tracking.timetocargo.com/v2/companies'
{  "success": true,  "data": {    "Akkon Lines": {      "scac": "AKKU",      "cn": false,      "bl": true,      "bk": true,      "availability": {        "cn": null,        "bl": {          "active": true,          "deactivated_at": null        },        "bk": {          "active": true,          "deactivated_at": null        }      }    },    "Aliança Navegação e Logística Ltda.": {      "scac": "ANRM",      "cn": true,      "bl": true,      "bk": true,      "availability": {        "cn": {          "active": true,          "deactivated_at": null        },        "bl": {          "active": true,          "deactivated_at": null        },        "bk": {          "active": true,          "deactivated_at": null        }      }    },    "American President Lines": {      "scac": "APLU",      "cn": true,      "bl": true,      "bk": true,      "availability": {        "cn": {          "active": true,          "deactivated_at": null        },        "bl": {          "active": true,          "deactivated_at": null        },        "bk": {          "active": true,          "deactivated_at": null        }      }    },    "Arkas Container Transport S.A.": {      "scac": "ARKU",      "cn": true,      "bl": true,      "bk": true,      "availability": {        "cn": {          "active": true,          "deactivated_at": null        },        "bl": {          "active": true,          "deactivated_at": null        },        "bk": {          "active": true,          "deactivated_at": null        }      }    }  }}
GET
/v2/tracking/batch

Returns the state of a task created with POST /v2/tracking/batch. In data.status, CREATED means queued, HANDLING means processing, and PROCESSED means complete. Once complete, read data.results and stop requesting the task state. Use tracking requests or webhooks for later shipment updates. Task data is cached for up to 6 hours.

Authorization

api_key
queryapi_key<token>

Query Parameters

task_id*string

The unique identifier of the tracking task. It is obtained when creating a request via POST /v2/tracking/batch

Formatuuid

Response Body

OK

application/json
  1. response
success*boolean

Whether processing succeeded. For tracking results, also check status: success=true does not mean data was found.

data*|

Task state and tracking results, when processing is complete

status*string

Request execution status

Value in"OK""WRONG_PARAMS""UNEXPECTED_ERROR""API_KEY_WRONG""API_KEY_LIMIT_REACHED""API_KEY_RATE_LIMIT""LOW_BALANCE""SERVICE_UNAVAILABLE"
Example Request
curl -X GET 'https://tracking.timetocargo.com/v2/tracking/batch?task_id=aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee'
{  "success": true,  "data": {    "task_id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",    "status": "PROCESSED",    "results": [      {        "success": true,        "data": {          "summary": {            "origin": {              "location": 0,              "terminal": 0,              "date": "2023-03-25T00:00:00"            },            "pol": {              "location": 0,              "terminal": 0,              "date": "2023-03-25T00:00:00"            },            "pod": {              "location": 0,              "terminal": 0,              "date": "2023-03-25T00:00:00",              "eta_shift_days": null            },            "destination": {              "location": 0,              "terminal": 0,              "date": "2023-03-25T00:00:00"            },            "company": {              "name": "MSC",              "full_name": "Mediterranean Shipping Company",              "url": "https://www.msc.com/",              "scacs": [                "MEDU",                "MSCU"              ]            }          },          "locations": [            {              "id": 0,              "name": "Gothenburg",              "state": "Halland",              "terminal": "Port of Gothenburg",              "country": "Sweden",              "lat": 57.70887,              "lng": 11.97456            }          ],          "terminals": [            {              "id": 0,              "name": "Port of Gothenburg"            }          ],          "containers": [            {              "number": "TCKU7858986",              "type": "40' High Cube Dry",              "events": [                {                  "location": 0,                  "terminal": 0,                  "status": "On Board",                  "status_code": "CLL",                  "date": "2023-10-25T11:11:11",                  "actual": false,                  "vessel": "Evergreen Teresa",                  "voyage": "V. 284"                }              ],              "iso_code": "45GP"            }          ],          "route_info": {            "route": [              {                "path": [                  [                    48.698306,                    14.042056                  ],                  [                    45.039944,                    12.751222                  ],                  [                    43.463278,                    12.6745                  ],                  [                    32.566855,                    29.927166                  ],                  [                    32.284501,                    31.232806                  ]                ],                "type": "sea"              }            ],            "current_position": [              32.284501,              31.232806            ],            "last_updated": "2023-10-25T11:11:11",            "course": 247.34          },          "shipment_status": "IN_TRANSIT",          "references": {            "booking_numbers": [              "2315887441"            ],            "bill_of_lading_numbers": [              "MEDUH1234567"            ]          },          "tracking_metadata": {            "id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",            "end_date": "2025-06-29T14:12:00.000Z",            "status": "ACTIVE",            "note": "Order 4521",            "created_at": "2025-06-29T14:12:00.000Z",            "updated_at": "2025-06-30T06:00:00.000Z"          }        },        "status": "OK",        "status_description": "Information found",        "request": {          "track_number": {            "type": "container",            "value": "TCKU7858986"          },          "company": "MEDU"        }      }    ]  },  "status": "OK"}
POST
/v2/tracking/batch

Creates a task for between 1 and 500 tracking numbers. Processing is asynchronous. The API returns a task_id without waiting for tracking results. Use it with GET /v2/tracking/batch to retrieve the task state and results later. Task data is cached for up to 6 hours.

Authorization

api_key
queryapi_key<token>

Query Parameters

need_route?boolean

Whether to include route information

Defaultfalse

Request Body

application/json
  1. body
tracked_items*array<>

Array of tracking numbers (max 500)

Itemsitems <= 500

Response Body

OK

application/json
  1. response
success*boolean

Whether processing succeeded. For tracking results, also check status: success=true does not mean data was found.

data*|

Details of the created task

status*string

Request execution status

Value in"OK""WRONG_PARAMS""UNEXPECTED_ERROR""API_KEY_WRONG""API_KEY_LIMIT_REACHED""API_KEY_RATE_LIMIT""LOW_BALANCE""SERVICE_UNAVAILABLE"
Example Request
curl -X POST 'https://tracking.timetocargo.com/v2/tracking/batch?need_route=false' \  -H 'Content-Type: application/json' \  -d '{  "tracked_items": [    {      "company": "COSU",      "track_number": {        "value": "CSNU6184414",        "type": "container"      }    },    {      "company": "AKKU",      "track_number": {        "value": "AKKNEM25072638",        "type": "bl"      }    }  ]}'
{  "success": true,  "data": {    "task_id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"  },  "status": "OK"}

Track a shipment

GET
/v2/tracking

Track one reference. Use key aaaaaaaa-bbbb-4ccc-8ddd-eeeeeeeeeeee to test your integration. It returns the same sample response for any type, with the X-Demo-Response: true header. No tracking is created and no credits are used. Limited to 60 requests per minute per IP.

Authorization

api_key
queryapi_key<token>

Query Parameters

company*string

Carrier SCAC code or AUTO for automatic carrier detection. Both support containers, bills of lading, and bookings with an explicit or omitted type. Use GET /v2/companies to retrieve codes and supported tracking types.

type?string

Number type: container, bl or bk. Omit to detect automatically. Empty values and AUTO are invalid.

Value in"container""bl""bk"
value*string

Tracking number value.

force_update?boolean

Force refresh tracking data

Defaultfalse
need_route?boolean

Whether to include route information

Defaultfalse

Response Body

OK

application/json
  1. response
success*boolean

Whether processing succeeded. For tracking results, also check status: success=true does not mean data was found.

data*|

Tracking information

status*string

Request execution status

Value in"OK""WRONG_PARAMS""UNEXPECTED_ERROR""INFO_NOT_FOUND""LINE_IS_UNDER_MAINTENANCE""LINE_NO_RESPONSE""API_KEY_WRONG""API_KEY_LIMIT_REACHED""API_KEY_RATE_LIMIT""LOW_BALANCE""SERVICE_UNAVAILABLE"
status_description*|

Status description

request?

Original tracking request: number, type, and requested company

Example Request
curl -X GET 'https://tracking.timetocargo.com/v2/tracking?company=AUTO&type=container&value=CSNU6184414&force_update=false&need_route=false'
{  "success": true,  "data": {    "summary": {      "origin": {        "location": 0,        "terminal": 0,        "date": "2023-03-25T00:00:00"      },      "pol": {        "location": 0,        "terminal": 0,        "date": "2023-03-25T00:00:00"      },      "pod": {        "location": 0,        "terminal": 0,        "date": "2023-03-25T00:00:00",        "eta_shift_days": null      },      "destination": {        "location": 0,        "terminal": 0,        "date": "2023-03-25T00:00:00"      },      "company": {        "name": "MSC",        "full_name": "Mediterranean Shipping Company",        "url": "https://www.msc.com/",        "scacs": [          "MEDU",          "MSCU"        ]      }    },    "locations": [      {        "id": 0,        "name": "Gothenburg",        "state": "Halland",        "terminal": "Port of Gothenburg",        "country": "Sweden",        "lat": 57.70887,        "lng": 11.97456      }    ],    "terminals": [      {        "id": 0,        "name": "Port of Gothenburg"      }    ],    "containers": [      {        "number": "TCKU7858986",        "type": "40' High Cube Dry",        "events": [          {            "location": 0,            "terminal": 0,            "status": "On Board",            "status_code": "CLL",            "date": "2023-10-25T11:11:11",            "actual": false,            "vessel": "Evergreen Teresa",            "voyage": "V. 284"          }        ],        "iso_code": "45GP"      }    ],    "route_info": {      "route": [        {          "path": [            [              48.698306,              14.042056            ],            [              45.039944,              12.751222            ],            [              43.463278,              12.6745            ],            [              32.566855,              29.927166            ],            [              32.284501,              31.232806            ]          ],          "type": "sea"        }      ],      "current_position": [        32.284501,        31.232806      ],      "last_updated": "2023-10-25T11:11:11",      "course": 247.34    },    "shipment_status": "IN_TRANSIT",    "references": {      "booking_numbers": [        "2315887441"      ],      "bill_of_lading_numbers": [        "MEDUH1234567"      ]    },    "tracking_metadata": {      "id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",      "end_date": "2025-06-29T14:12:00.000Z",      "status": "ACTIVE",      "note": "Order 4521",      "created_at": "2025-06-29T14:12:00.000Z",      "updated_at": "2025-06-30T06:00:00.000Z"    }  },  "status": "OK",  "status_description": "Information found",  "request": {    "track_number": {      "type": "container",      "value": "TCKU7858986"    },    "company": "MEDU"  }}

List tracked shipments

GET
/v2/shipments

Example request: https://tracking.timetocargo.com/v2/shipments?api_key=aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee&page=1&limit=50&status=ACTIVE

Authorization

api_key
queryapi_key<token>

Query Parameters

need_route?boolean

Whether to include route information

Defaultfalse
page?number

Page number

Range1 <= value <= 100000000
Default1
limit?number

Number of trackings per page

Range1 <= value <= 500
Default50
status?string

Filter shipments by status. Available values: ACTIVE, ARCHIVED

Value in"ACTIVE""ARCHIVED"

Response Body

OK

application/json
  1. response
success*boolean

Whether processing succeeded. For tracking results, also check status: success=true does not mean data was found.

data*|null

Shipments information with pagination

status*string

Request execution status

Value in"OK""WRONG_PARAMS""UNEXPECTED_ERROR""INFO_NOT_FOUND""LINE_IS_UNDER_MAINTENANCE""LINE_NO_RESPONSE""API_KEY_WRONG""API_KEY_LIMIT_REACHED""API_KEY_RATE_LIMIT""LOW_BALANCE""SERVICE_UNAVAILABLE"
status_description*|

Status description

Example Request
curl -X GET 'https://tracking.timetocargo.com/v2/shipments?need_route=false&page=1&limit=50&status=ACTIVE'
{  "success": true,  "data": {    "data": [      {        "id": "d8976b45-e3e6-4115-b723-57f9b95fc76b",        "tracked_item": {          "track_number": "MSCU1234567",          "track_number_type": "container",          "company_id": 60,          "data": {            "success": true,            "data": {              "summary": {                "origin": {                  "location": 0,                  "terminal": 0,                  "date": "2023-03-25T00:00:00"                },                "pol": {                  "location": 0,                  "terminal": 0,                  "date": "2023-03-25T00:00:00"                },                "pod": {                  "location": 0,                  "terminal": 0,                  "date": "2023-03-25T00:00:00",                  "eta_shift_days": null                },                "destination": {                  "location": 0,                  "terminal": 0,                  "date": "2023-03-25T00:00:00"                },                "company": {                  "name": "MSC",                  "full_name": "Mediterranean Shipping Company",                  "url": "https://www.msc.com/",                  "scacs": [                    "MEDU",                    "MSCU"                  ]                }              },              "locations": [                {                  "id": 0,                  "name": "Gothenburg",                  "state": "Halland",                  "terminal": "Port of Gothenburg",                  "country": "Sweden",                  "lat": 57.70887,                  "lng": 11.97456                }              ],              "terminals": [                {                  "id": 0,                  "name": "Port of Gothenburg"                }              ],              "containers": [                {                  "number": "TCKU7858986",                  "type": "40' High Cube Dry",                  "events": [                    {                      "location": 0,                      "terminal": 0,                      "status": "On Board",                      "status_code": "CLL",                      "date": "2023-10-25T11:11:11",                      "actual": false,                      "vessel": "Evergreen Teresa",                      "voyage": "V. 284"                    }                  ],                  "iso_code": "45GP"                }              ],              "route_info": {                "route": [                  {                    "path": [                      [                        48.698306,                        14.042056                      ],                      [                        45.039944,                        12.751222                      ],                      [                        43.463278,                        12.6745                      ],                      [                        32.566855,                        29.927166                      ],                      [                        32.284501,                        31.232806                      ]                    ],                    "type": "sea"                  }                ],                "current_position": [                  32.284501,                  31.232806                ],                "last_updated": "2023-10-25T11:11:11",                "course": 247.34              },              "shipment_status": "IN_TRANSIT",              "references": {                "booking_numbers": [                  "2315887441"                ],                "bill_of_lading_numbers": [                  "MEDUH1234567"                ]              }            },            "status": "OK",            "status_description": "Information found"          },          "updated_at": "2026-04-08T12:08:55.307Z",          "checked_at": "2026-04-08T12:08:55.307Z",          "company_name": "Mediterranean Shipping Company"        },        "start_date": "2026-04-08T12:26:56.940Z",        "end_date": "2026-04-12T09:18:49.395Z",        "status": "ACTIVE",        "note": "Order 4521",        "created_at": "2026-04-08T12:08:54.569Z",        "track_number": "MSCU1234567"      }    ],    "meta": {      "itemsPerPage": 50,      "totalItems": 145,      "currentPage": 2,      "totalPages": 3,      "sortBy": [        [          "created_at",          "DESC"        ],        [          "id",          "DESC"        ]      ],      "filter": {        "status": "$eq:ACTIVE"      }    },    "links": {      "first": "/v2/shipments?page=1&limit=50&status=ACTIVE",      "previous": "/v2/shipments?page=1&limit=50&status=ACTIVE",      "current": "/v2/shipments?page=2&limit=50&status=ACTIVE",      "next": "/v2/shipments?page=3&limit=50&status=ACTIVE",      "last": "/v2/shipments?page=3&limit=50&status=ACTIVE"    }  },  "status": "OK",  "status_description": "Information found"}
DELETE
/v2/shipments

A non-archived tracking record created no more than 72 hours ago is deleted with a refund of one tracking credit if shipment_status is not IN_TRANSIT, including DELIVERED, UNKNOWN, and STUCK. Records with IN_TRANSIT and non-archived records older than 72 hours are archived without a refund. Records that are already archived are deleted without a refund. Deleted IDs are returned in data.deleted, and archived IDs in data.archived.

Authorization

api_key
queryapi_key<token>

Request Body

application/json
  1. body
shipmentIds*array<string>

List of UUIDs of shipments that you want to delete

Response Body

OK

application/json
  1. response
success*boolean

Whether processing succeeded. For tracking results, also check status: success=true does not mean data was found.

data*|

Information about deleted and archived shipments

status*string

Request execution status

Value in"OK""WRONG_PARAMS""UNEXPECTED_ERROR""INFO_NOT_FOUND""LINE_IS_UNDER_MAINTENANCE""LINE_NO_RESPONSE""API_KEY_WRONG""API_KEY_LIMIT_REACHED""API_KEY_RATE_LIMIT""LOW_BALANCE""SERVICE_UNAVAILABLE"
status_description*|

Status description

Example Request
curl -X DELETE 'https://tracking.timetocargo.com/v2/shipments' \  -H 'Content-Type: application/json' \  -d '{  "shipmentIds": [    "9ff48bf7-4541-49e2-947c-c269200e030f",    "fb8936b9-ff16-4776-8710-d4073ab06d1e",    "2305a40b-97b2-4c1b-94c4-6d9416b22bde"  ]}'
{  "success": true,  "data": {    "deleted": [      "9ff48bf7-4541-49e2-947c-c269200e030f",      "fb8936b9-ff16-4776-8710-d4073ab06d1e"    ],    "archived": [      "2305a40b-97b2-4c1b-94c4-6d9416b22bde"    ]  },  "status": "OK",  "status_description": "Shipments have been successfully removed"}
PATCH
/v2/shipments/{id}

Updates the shipment note, including for archived shipments. To delete the note, send an empty string { "note": "" } in the request body. Maximum length is 40 characters. Other body fields are rejected.

Authorization

api_key
queryapi_key<token>

Path Parameters

id*string

Tracked shipment ID

Formatuuid

Request Body

application/json
  1. body
note*string

Note, limited to 40 characters including spaces and line breaks. Length is counted before trimming edges. To delete the note, send an empty string "note": "". Null is not accepted as input.

Lengthlength <= 40

Response Body

OK

application/json
  1. response
success*boolean

Whether processing succeeded. For tracking results, also check status: success=true does not mean data was found.

data*

Updated shipment, including stored tracking data and route information. Does not trigger tracking.

status*string

Request execution status

Value in"OK""WRONG_PARAMS""UNEXPECTED_ERROR""INFO_NOT_FOUND""LINE_IS_UNDER_MAINTENANCE""LINE_NO_RESPONSE""API_KEY_WRONG""API_KEY_LIMIT_REACHED""API_KEY_RATE_LIMIT""LOW_BALANCE""SERVICE_UNAVAILABLE"
status_description*|

Status description

Example Request
curl -X PATCH 'https://tracking.timetocargo.com/v2/shipments/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee' \  -H 'Content-Type: application/json' \  -d '{  "note": "Order 123"}'
{  "success": true,  "data": {    "id": "d8976b45-e3e6-4115-b723-57f9b95fc76b",    "tracked_item": {      "track_number": "MSCU1234567",      "track_number_type": "container",      "company_id": 60,      "data": {        "success": true,        "data": {          "summary": {            "origin": {              "location": 0,              "terminal": 0,              "date": "2023-03-25T00:00:00"            },            "pol": {              "location": 0,              "terminal": 0,              "date": "2023-03-25T00:00:00"            },            "pod": {              "location": 0,              "terminal": 0,              "date": "2023-03-25T00:00:00",              "eta_shift_days": null            },            "destination": {              "location": 0,              "terminal": 0,              "date": "2023-03-25T00:00:00"            },            "company": {              "name": "MSC",              "full_name": "Mediterranean Shipping Company",              "url": "https://www.msc.com/",              "scacs": [                "MEDU",                "MSCU"              ]            }          },          "locations": [            {              "id": 0,              "name": "Gothenburg",              "state": "Halland",              "terminal": "Port of Gothenburg",              "country": "Sweden",              "lat": 57.70887,              "lng": 11.97456            }          ],          "terminals": [            {              "id": 0,              "name": "Port of Gothenburg"            }          ],          "containers": [            {              "number": "TCKU7858986",              "type": "40' High Cube Dry",              "events": [                {                  "location": 0,                  "terminal": 0,                  "status": "On Board",                  "status_code": "CLL",                  "date": "2023-10-25T11:11:11",                  "actual": false,                  "vessel": "Evergreen Teresa",                  "voyage": "V. 284"                }              ],              "iso_code": "45GP"            }          ],          "route_info": {            "route": [              {                "path": [                  [                    48.698306,                    14.042056                  ],                  [                    45.039944,                    12.751222                  ],                  [                    43.463278,                    12.6745                  ],                  [                    32.566855,                    29.927166                  ],                  [                    32.284501,                    31.232806                  ]                ],                "type": "sea"              }            ],            "current_position": [              32.284501,              31.232806            ],            "last_updated": "2023-10-25T11:11:11",            "course": 247.34          },          "shipment_status": "IN_TRANSIT",          "references": {            "booking_numbers": [              "2315887441"            ],            "bill_of_lading_numbers": [              "MEDUH1234567"            ]          }        },        "status": "OK",        "status_description": "Information found"      },      "updated_at": "2026-04-08T12:08:55.307Z",      "checked_at": "2026-04-08T12:08:55.307Z",      "company_name": "Mediterranean Shipping Company"    },    "start_date": "2026-04-08T12:26:56.940Z",    "end_date": "2026-04-12T09:18:49.395Z",    "status": "ACTIVE",    "note": "Order 4521",    "created_at": "2026-04-08T12:08:54.569Z",    "track_number": "MSCU1234567"  },  "status": "OK",  "status_description": "Information found"}

Get API key information

GET
/v2/apikey

Returns remaining group credits, the current plan requests_limit and scheduled limits_reset_at in UTC. The date does not guarantee renewal or payment; unavailable details are null.

Authorization

api_key
queryapi_key<token>

Query Parameters

api_key?string

API key. Provide api_key or its legacy value alias.

Formatuuid
value?stringDeprecated

Deprecated alias for api_key. Provide api_key or value.

Formatuuid

Response Body

OK

application/json
  1. response
success*boolean

Whether processing succeeded. For tracking results, also check status: success=true does not mean data was found.

data*
Example Request
curl -X GET 'https://tracking.timetocargo.com/v2/apikey?api_key=aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee&value=aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee'
{  "success": true,  "data": {    "creation_date": "2023-03-23T21:49:43.000Z",    "updated_at": "2026-10-20T12:00:00.000Z",    "api_key": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",    "requests_remaining_count": 45,    "requests_limit": 100,    "limits_reset_at": "2026-11-01T00:00:00.000Z"  }}

List webhook event types

GET
/v2/webhook-event-types

Authorization

api_key
queryapi_key<token>

Response Body

OK

application/json
  1. response
success*boolean

Whether processing succeeded. For tracking results, also check status: success=true does not mean data was found.

data*array<>
status*string

Request execution status

Value in"OK""WRONG_PARAMS""UNEXPECTED_ERROR""INFO_NOT_FOUND""LINE_IS_UNDER_MAINTENANCE""LINE_NO_RESPONSE""API_KEY_WRONG""API_KEY_LIMIT_REACHED""API_KEY_RATE_LIMIT""LOW_BALANCE""SERVICE_UNAVAILABLE""NOT_FOUND"
status_description*|

Status description

Example Request
curl -X GET 'https://tracking.timetocargo.com/v2/webhook-event-types'
{  "success": true,  "data": [    {      "type": "tracking.eta_update",      "group": "tracking",      "description": "Estimated arrival date changed"    },    {      "type": "tracking.history_update",      "group": "tracking",      "description": "An event was added to the tracking history"    },    {      "type": "tracking.info_found",      "group": "tracking",      "description": "Tracking data was found"    },    {      "type": "tracking.info_not_found",      "group": "tracking",      "description": "Tracking data was not found"    },    {      "type": "tracking.auto_archiving",      "group": "tracking",      "description": "Subscriptions were automatically archived"    },    {      "type": "tracking.delivered",      "group": "tracking",      "description": "Shipment was delivered"    }  ],  "status": "OK",  "status_description": "Request completed successfully"}

List webhook deliveries

GET
/v2/webhook-notifications

Returns the webhook delivery history for your callback_url values.

By default, the response includes only failed deliveries. To select another status, pass status=pending or status=delivered. Use webhook_id to limit the results to one webhook.

Results are paginated. The envelope data contains paginated data, meta, and links.

Authorization

api_key
queryapi_key<token>

Query Parameters

status?string

Delivery status. Defaults to failed.

Default"failed"
Value in"pending""delivered""failed"
webhook_id?string

ID of the webhook whose deliveries should be returned

Formatuuid
page?integer

Page number

Range1 <= value
Default1
limit?integer

Number of deliveries per page

Range1 <= value <= 100
Default50

Response Body

OK

application/json
  1. response
success*boolean

Whether processing succeeded. For tracking results, also check status: success=true does not mean data was found.

data*|null
status*string

Request execution status

Value in"OK""WRONG_PARAMS""UNEXPECTED_ERROR""INFO_NOT_FOUND""LINE_IS_UNDER_MAINTENANCE""LINE_NO_RESPONSE""API_KEY_WRONG""API_KEY_LIMIT_REACHED""API_KEY_RATE_LIMIT""LOW_BALANCE""SERVICE_UNAVAILABLE""NOT_FOUND"
status_description*|

Status description

Example Request
curl -X GET 'https://tracking.timetocargo.com/v2/webhook-notifications?status=failed&webhook_id=aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee&page=1&limit=50'
{  "success": true,  "data": {    "data": [      {        "id": "cccccccc-dddd-eeee-ffff-aaaaaaaaaaaa",        "webhook_id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",        "event_type": "tracking.delivered",        "payload": {          "id": "cccccccc-dddd-eeee-ffff-aaaaaaaaaaaa",          "type": "tracking.delivered",          "api_version": "2026-07-09",          "created_at": "2026-07-08T13:11:22.758Z",          "resource": {            "tracked_item_id": "eeeeeeee-ffff-aaaa-bbbb-cccccccccccc",            "track_number": {              "type": "container",              "value": "MSBU6501445"            },            "company": "Mediterranean Shipping Company",            "company_scac": "MSCU"          },          "data": {            "shipment_status": "DELIVERED",            "route": {              "origin": "Ho Chi Minh City, VN",              "pol": "Wilmington, US",              "pod": "Long Beach, US",              "destination": "Dallas, US"            },            "final_location": "DALLAS, US",            "current_position": null,            "event": {              "location": "DALLAS, US",              "status": "Delivered",              "status_code": "CDC",              "date": "2026-07-07T00:00:00",              "actual": true,              "vessel": null,              "voyage": null            }          },          "changes": []        },        "status": "delivered",        "attempt_count": 1,        "next_attempt_at": null,        "delivered_at": "2026-07-08T13:16:38.565Z",        "created_at": "2026-07-08T13:16:38.371Z",        "webhook": {          "id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",          "callback_url": "https://example.com/webhooks/timetocargo",          "is_active": true,          "event_types": [            "tracking.eta_update",            "tracking.history_update",            "tracking.info_found",            "tracking.info_not_found",            "tracking.auto_archiving",            "tracking.delivered"          ],          "created_at": "2026-07-08T09:39:36.311Z",          "updated_at": "2026-07-08T13:10:43.554Z"        },        "attempts": [          {            "id": "dddddddd-eeee-ffff-aaaa-bbbbbbbbbbbb",            "notification_id": "cccccccc-dddd-eeee-ffff-aaaaaaaaaaaa",            "attempt_number": 1,            "http_status": 200,            "error_message": null,            "attempted_at": "2026-07-08T13:16:38.396Z"          }        ]      }    ],    "meta": {      "itemsPerPage": 50,      "totalItems": 1,      "currentPage": 1,      "totalPages": 1,      "sortBy": [        [          "created_at",          "DESC"        ],        [          "id",          "DESC"        ]      ],      "searchBy": [],      "search": "",      "select": []    },    "links": {      "first": "/v2/webhook-notifications?page=1&limit=50&status=failed",      "previous": null,      "current": "/v2/webhook-notifications?page=1&limit=50&status=failed",      "next": null,      "last": "/v2/webhook-notifications?page=1&limit=50&status=failed"    }  },  "status": "OK",  "status_description": "Request completed successfully"}

List webhooks

GET
/v2/webhooks

Authorization

api_key
queryapi_key<token>

Response Body

OK

application/json
  1. response
success*boolean

Whether processing succeeded. For tracking results, also check status: success=true does not mean data was found.

data*array<>
status*string

Request execution status

Value in"OK""WRONG_PARAMS""UNEXPECTED_ERROR""INFO_NOT_FOUND""LINE_IS_UNDER_MAINTENANCE""LINE_NO_RESPONSE""API_KEY_WRONG""API_KEY_LIMIT_REACHED""API_KEY_RATE_LIMIT""LOW_BALANCE""SERVICE_UNAVAILABLE""NOT_FOUND"
status_description*|

Status description

Example Request
curl -X GET 'https://tracking.timetocargo.com/v2/webhooks'
{  "success": true,  "data": [    {      "id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",      "callback_url": "https://example.com/webhooks/timetocargo",      "is_active": true,      "event_types": [        "tracking.eta_update",        "tracking.history_update",        "tracking.info_found",        "tracking.info_not_found",        "tracking.auto_archiving",        "tracking.delivered"      ],      "created_at": "2026-07-08T09:39:36.311Z",      "updated_at": "2026-07-08T13:10:43.554Z"    }  ],  "status": "OK",  "status_description": "Request completed successfully"}

Create webhook

POST
/v2/webhooks

Creates a webhook for your account.

The response data includes a signing secret (22 characters from the base64url alphabet: A–Z, a–z, 0–9, -, _). The secret is shown only in this response and is not returned when the webhook is read later, so store it securely immediately.

For each delivery, TimeToCargo sends a POST request to your callback_url. The request contains a WebhookOutgoingPayload JSON object and these headers:

  • x-timetocargo-signature — HMAC SHA-256 signature of timestamp + '.' + rawBody, prefixed with sha256=;
  • x-timetocargo-timestamp — Unix timestamp used to generate the signature;
  • x-timetocargo-event-id — unique event ID matching payload.id;
  • x-timetocargo-delivery-id — unique delivery attempt ID.

Authorization

api_key
queryapi_key<token>

Request Body

application/json
  1. body
callback_url*string

URL where TimeToCargo will send webhooks

Formaturi
is_active?boolean

Whether the webhook receives regular events. You can send a test delivery to an inactive webhook.

Defaulttrue
event_types?array<>

Event types to deliver. If omitted, the webhook receives all public event types. tracking.test is always available for test deliveries.

Items1 <= items

Response Body

OK

application/json
  1. response
success*boolean

Whether processing succeeded. For tracking results, also check status: success=true does not mean data was found.

data*|null
status*string

Request execution status

Value in"OK""WRONG_PARAMS""UNEXPECTED_ERROR""INFO_NOT_FOUND""LINE_IS_UNDER_MAINTENANCE""LINE_NO_RESPONSE""API_KEY_WRONG""API_KEY_LIMIT_REACHED""API_KEY_RATE_LIMIT""LOW_BALANCE""SERVICE_UNAVAILABLE""NOT_FOUND"
status_description*|

Status description

Example Request
curl -X POST 'https://tracking.timetocargo.com/v2/webhooks' \  -H 'Content-Type: application/json' \  -d '{  "callback_url": "https://example.com/webhooks/timetocargo",  "is_active": true,  "event_types": [    "tracking.eta_update",    "tracking.history_update",    "tracking.info_found",    "tracking.info_not_found",    "tracking.auto_archiving",    "tracking.delivered"  ]}'
{  "success": true,  "data": {    "id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",    "callback_url": "https://example.com/webhooks/timetocargo",    "is_active": true,    "event_types": [      "tracking.eta_update",      "tracking.history_update",      "tracking.info_found",      "tracking.info_not_found",      "tracking.auto_archiving",      "tracking.delivered"    ],    "created_at": "2026-07-08T09:39:36.311Z",    "updated_at": "2026-07-08T13:10:43.554Z",    "secret": "AaBbCcDdEe-_0123456789"  },  "status": "OK",  "status_description": "Request completed successfully"}

Get webhook

GET
/v2/webhooks/{id}

Authorization

api_key
queryapi_key<token>

Path Parameters

id*string

Webhook ID

Formatuuid

Response Body

OK

application/json
  1. response
success*boolean

Whether processing succeeded. For tracking results, also check status: success=true does not mean data was found.

data*|null
status*string

Request execution status

Value in"OK""WRONG_PARAMS""UNEXPECTED_ERROR""INFO_NOT_FOUND""LINE_IS_UNDER_MAINTENANCE""LINE_NO_RESPONSE""API_KEY_WRONG""API_KEY_LIMIT_REACHED""API_KEY_RATE_LIMIT""LOW_BALANCE""SERVICE_UNAVAILABLE""NOT_FOUND"
status_description*|

Status description

Example Request
curl -X GET 'https://tracking.timetocargo.com/v2/webhooks/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee'
{  "success": true,  "data": {    "id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",    "callback_url": "https://example.com/webhooks/timetocargo",    "is_active": true,    "event_types": [      "tracking.eta_update",      "tracking.history_update",      "tracking.info_found",      "tracking.info_not_found",      "tracking.auto_archiving",      "tracking.delivered"    ],    "created_at": "2026-07-08T09:39:36.311Z",    "updated_at": "2026-07-08T13:10:43.554Z"  },  "status": "OK",  "status_description": "Request completed successfully"}

Update webhook

PATCH
/v2/webhooks/{id}

Updates the callback_url, activation status, and subscribed event types. With regenerate_secret=true, the response data includes the new secret. It is shown only in that response and is not returned when the webhook is read later.

Authorization

api_key
queryapi_key<token>

Path Parameters

id*string

Webhook ID

Formatuuid

Request Body

application/json
  1. body
callback_url?string

URL where TimeToCargo will send webhooks

Formaturi
is_active?boolean

Whether the webhook receives regular events. You can send a test delivery to an inactive webhook.

event_types?array<>

Event types to deliver. If omitted, the event type list remains unchanged. tracking.test is always available for test deliveries.

Items1 <= items
regenerate_secret?boolean

Whether to generate a new signing secret for webhook verification

Defaultfalse

Response Body

OK

application/json
  1. response
success*boolean

Whether processing succeeded. For tracking results, also check status: success=true does not mean data was found.

data*||null
status*string

Request execution status

Value in"OK""WRONG_PARAMS""UNEXPECTED_ERROR""INFO_NOT_FOUND""LINE_IS_UNDER_MAINTENANCE""LINE_NO_RESPONSE""API_KEY_WRONG""API_KEY_LIMIT_REACHED""API_KEY_RATE_LIMIT""LOW_BALANCE""SERVICE_UNAVAILABLE""NOT_FOUND"
status_description*|

Status description

Example Request
curl -X PATCH 'https://tracking.timetocargo.com/v2/webhooks/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee' \  -H 'Content-Type: application/json' \  -d '{  "is_active": true,  "regenerate_secret": false,  "event_types": [    "tracking.eta_update",    "tracking.history_update"  ]}'
{  "success": true,  "data": {    "id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",    "callback_url": "https://example.com/webhooks/timetocargo",    "is_active": true,    "event_types": [      "tracking.eta_update",      "tracking.history_update",      "tracking.info_found",      "tracking.info_not_found",      "tracking.auto_archiving",      "tracking.delivered"    ],    "created_at": "2026-07-08T09:39:36.311Z",    "updated_at": "2026-07-08T13:10:43.554Z"  },  "status": "OK",  "status_description": "Request completed successfully"}

Delete webhook

DELETE
/v2/webhooks/{id}

Authorization

api_key
queryapi_key<token>

Path Parameters

id*string

Webhook ID

Formatuuid

Response Body

OK

application/json
  1. response
success*boolean

Whether processing succeeded. For tracking results, also check status: success=true does not mean data was found.

data*null
status*string

Request execution status

Value in"OK""WRONG_PARAMS""UNEXPECTED_ERROR""INFO_NOT_FOUND""LINE_IS_UNDER_MAINTENANCE""LINE_NO_RESPONSE""API_KEY_WRONG""API_KEY_LIMIT_REACHED""API_KEY_RATE_LIMIT""LOW_BALANCE""SERVICE_UNAVAILABLE""NOT_FOUND"
status_description*|

Status description

Example Request
curl -X DELETE 'https://tracking.timetocargo.com/v2/webhooks/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee'
{  "success": true,  "data": null,  "status": "OK",  "status_description": "Request completed successfully"}

Send test webhook

POST
/v2/webhooks/{id}/test

Sends a tracking.test event to your callback_url.

Authorization

api_key
queryapi_key<token>

Path Parameters

id*string

Webhook ID

Formatuuid

Response Body

OK

application/json
  1. response
success*boolean

Whether processing succeeded. For tracking results, also check status: success=true does not mean data was found.

data*|null
status*string

Request execution status

Value in"OK""WRONG_PARAMS""UNEXPECTED_ERROR""INFO_NOT_FOUND""LINE_IS_UNDER_MAINTENANCE""LINE_NO_RESPONSE""API_KEY_WRONG""API_KEY_LIMIT_REACHED""API_KEY_RATE_LIMIT""LOW_BALANCE""SERVICE_UNAVAILABLE""NOT_FOUND"
status_description*|

Status description

Example Request
curl -X POST 'https://tracking.timetocargo.com/v2/webhooks/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/test'

{  "success": true,  "data": {    "success": true,    "http_status": 200  },  "status": "OK",  "status_description": "Request completed successfully"}

Receive tracking event

When an event you subscribed to occurs, TimeToCargo sends a POST request to your callback_url.

Return 200 OK as soon as you receive the event. If processing takes time, enqueue the event, send the response, and then process it asynchronously. TimeToCargo waits up to 10 seconds for a response.

Delivery succeeds with any 2xx status. TimeToCargo retries after 408, 409, 425, 429, and 5xx statuses, as well as timeouts and DNS or network errors. It does not retry after 400, 401, 403, 404, or 422. After a 429 response, TimeToCargo honors the Retry-After header when present. Each delivery can have up to five attempts.

To verify the source of the request, use the webhook secret and the x-timetocargo-timestamp and x-timetocargo-signature headers. The signature is an HMAC SHA-256 digest of timestamp + '.' + rawBody, prefixed with sha256=. Use the unchanged request body as rawBody. Signature verification is optional, but recommended.

Node.js / Express

import crypto from 'node:crypto';import express from 'express';const app = express();const secret = process.env.TIMETOCARGO_WEBHOOK_SECRET;if (!secret) {    throw new Error('TIMETOCARGO_WEBHOOK_SECRET is not set');}function queueWebhook(payload: unknown): void {    // Enqueue the event, save it to your database,    // or pass it to another service for processing.    console.log('Webhook received from TimeToCargo:', payload);}app.post('/webhooks/timetocargo', express.raw({ type: 'application/json' }), (req, res) => {    const timestamp = req.header('x-timetocargo-timestamp');    const signature = req.header('x-timetocargo-signature');    if (!timestamp || !signature) {        return res.sendStatus(401);    }    const expected =        'sha256=' + crypto.createHmac('sha256', secret).update(timestamp).update('.').update(req.body).digest('hex');    const signatureBuffer = Buffer.from(signature);    const expectedBuffer = Buffer.from(expected);    if (signatureBuffer.length !== expectedBuffer.length || !crypto.timingSafeEqual(signatureBuffer, expectedBuffer)) {        return res.sendStatus(401);    }    const payload = JSON.parse(req.body.toString('utf8'));    queueWebhook(payload);    return res.sendStatus(200);});app.listen(3000, () => {    console.log('Webhook server is running on port 3000');});

Python / FastAPI

import hmacimport hashlibimport osfrom fastapi import FastAPI, Request, HTTPExceptionapp = FastAPI()secret = os.environ["TIMETOCARGO_WEBHOOK_SECRET"].encode()def enqueue_webhook(payload: dict) -> None:    # Enqueue the event, save it to your database,    # or pass it to another service for processing.    print("Webhook received from TimeToCargo:", payload)@app.post("/webhooks/timetocargo")async def timetocargo_webhook(request: Request):    body = await request.body()    timestamp = request.headers.get("x-timetocargo-timestamp")    signature = request.headers.get("x-timetocargo-signature")    if not timestamp or not signature:        raise HTTPException(status_code=401)    digest = hmac.new(        secret,        timestamp.encode() + b"." + body,        hashlib.sha256,    ).hexdigest()    expected = f"sha256={digest}"    if not hmac.compare_digest(signature, expected):        raise HTTPException(status_code=401)    payload = await request.json()    enqueue_webhook(payload)    return {"ok": True}

Header Parameters

x-timetocargo-signature*string

HMAC SHA-256 signature of timestamp + '.' + rawBody, prefixed with sha256=. Use the unchanged request body as rawBody.

x-timetocargo-timestamp*string

Unix timestamp used to generate the signature

x-timetocargo-event-id*string

Unique event ID matching payload.id

Formatuuid
x-timetocargo-delivery-id*string

Unique delivery attempt ID

Formatuuid

Request Body

application/json
  1. body
id*string
Formatuuid
type*string
api_version*string
created_at*string
Formatdate-time
resource*|

Technical context for the tracked item. The value is null for account-level events such as tracking.auto_archiving and tracking.test.

data*
changes*array<>

Response Body

Delivery failed: the server returned 400 Bad Request. TimeToCargo will not retry it.

Example Requests
POST/trackingWebhookDelivery
Request Body
application/json
{  "id": "cccccccc-dddd-eeee-ffff-aaaaaaaaaaaa",  "type": "tracking.eta_update",  "api_version": "2026-07-09",  "created_at": "2026-07-08T13:11:22.758Z",  "resource": {    "tracked_item_id": "eeeeeeee-ffff-aaaa-bbbb-cccccccccccc",    "track_number": {      "type": "container",      "value": "MSBU6501445"    },    "company": "Mediterranean Shipping Company",    "company_scac": "MSCU"  },  "data": {    "shipment_status": "IN_TRANSIT",    "route": {      "origin": "Wilmington, US",      "pol": "Wilmington, US",      "pod": "Long Beach, US",      "destination": "Dallas, US"    },    "eta": "2026-07-15T00:00:00",    "current_position": {      "lat": 33.74,      "lng": -118.27,      "updated_at": "2026-07-08T12:00:00.000Z"    }  },  "changes": [    {      "field": "eta",      "old": "2026-07-01T00:00:00",      "new": "2026-07-15T00:00:00"    }  ]}
Header Parameters
{  "x-timetocargo-signature": "sha256=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",  "x-timetocargo-timestamp": "1783512000",  "x-timetocargo-event-id": "cccccccc-dddd-eeee-ffff-aaaaaaaaaaaa",  "x-timetocargo-delivery-id": "dddddddd-eeee-ffff-aaaa-bbbbbbbbbbbb"}