Getting Started
In Depth Guides
Useful Info
Shipments
Tracking Requests
Webhooks
Webhook Notifications
Containers
Shipping Lines
Terminals
Webhooks
Create a webhook
You can configure a webhook via the API to be notified about events that happen in your Terminal49 account. These events can be realted to tracking_requests, shipments and containers.
This is the recommended way tracking shipments and containers via the API. You should use this instead of polling our the API periodically.
POST
/
webhooks
curl --request POST \
--url https://api.terminal49.com/v2/webhooks \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"data": {
"attributes": {
"url": "https://webhook.site/",
"events": [
"container.transport.vessel_arrived",
"container.transport.vessel_discharged",
"container.transport.vessel_loaded",
"container.transport.vessel_departed",
"container.transport.rail_departed",
"container.transport.rail_arrived",
"container.transport.rail_loaded",
"container.transport.rail_unloaded",
"container.transport.transshipment_arrived",
"container.transport.transshipment_discharged",
"container.transport.transshipment_loaded",
"container.transport.transshipment_departed",
"container.transport.feeder_arrived",
"container.transport.feeder_discharged",
"container.transport.feeder_loaded",
"container.transport.feeder_departed",
"container.transport.empty_out",
"container.transport.full_in",
"container.transport.full_out",
"container.transport.empty_in",
"container.transport.vessel_berthed",
"shipment.estimated.arrival",
"tracking_request.succeeded",
"tracking_request.failed",
"tracking_request.awaiting_manifest",
"tracking_request.tracking_stopped",
"container.created",
"container.updated",
"container.pod_terminal_changed",
"container.transport.arrived_at_inland_destination",
"container.transport.estimated.arrived_at_inland_destination",
"container.pickup_lfd.changed",
"container.transport.available"
],
"active": true
},
"type": "webhook"
}
}'
{
"data": {
"type": "webhook",
"id": "9809fb96-7754-488f-99df-29ca8d410d89",
"attributes": {
"url": "https://webhook.site/",
"active": true,
"events": [
"tracking_request.succeeded"
],
"secret": "C193J3QOXMFH",
"created_at": "2020-06-05T19:06:13Z"
}
}
}
Authorizations
Token YOUR_API_TOKEN
The APIs require authentication to be done using header-based API Key and Secret Authentication.
API key and secret are sent va the Authorization
request header.
You send your API key and secret in the following way:
Authorization: Token YOUR_API_KEY
Body
application/json
The body is of type object
.
Response
201
application/json
Create a test webhook endpoint
The response is of type object
.
Was this page helpful?
curl --request POST \
--url https://api.terminal49.com/v2/webhooks \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"data": {
"attributes": {
"url": "https://webhook.site/",
"events": [
"container.transport.vessel_arrived",
"container.transport.vessel_discharged",
"container.transport.vessel_loaded",
"container.transport.vessel_departed",
"container.transport.rail_departed",
"container.transport.rail_arrived",
"container.transport.rail_loaded",
"container.transport.rail_unloaded",
"container.transport.transshipment_arrived",
"container.transport.transshipment_discharged",
"container.transport.transshipment_loaded",
"container.transport.transshipment_departed",
"container.transport.feeder_arrived",
"container.transport.feeder_discharged",
"container.transport.feeder_loaded",
"container.transport.feeder_departed",
"container.transport.empty_out",
"container.transport.full_in",
"container.transport.full_out",
"container.transport.empty_in",
"container.transport.vessel_berthed",
"shipment.estimated.arrival",
"tracking_request.succeeded",
"tracking_request.failed",
"tracking_request.awaiting_manifest",
"tracking_request.tracking_stopped",
"container.created",
"container.updated",
"container.pod_terminal_changed",
"container.transport.arrived_at_inland_destination",
"container.transport.estimated.arrived_at_inland_destination",
"container.pickup_lfd.changed",
"container.transport.available"
],
"active": true
},
"type": "webhook"
}
}'
{
"data": {
"type": "webhook",
"id": "9809fb96-7754-488f-99df-29ca8d410d89",
"attributes": {
"url": "https://webhook.site/",
"active": true,
"events": [
"tracking_request.succeeded"
],
"secret": "C193J3QOXMFH",
"created_at": "2020-06-05T19:06:13Z"
}
}
}
Assistant
Responses are generated using AI and may contain mistakes.