Webhooks

The Webhooks API allows you to subscribe for updates to events by registering your endpoint that will receive event notifications.

If webhook callout cannot be delivered because the endpoint was down, or for any other reason, it is retried multiple times for a period of at least one day.

CreateWebhook

Create a webhook to subscribe to a type of event.

Current retry behavior for webhooks (subject to change) is as follows:

  • If there is an error calling the endpoint it is first retried after about 5 minutes
  • It is then retried with exponentially increasing interval
  • Maximum interval between two retries is one hour
  • Total number of attempts is 10
SecurityBEARER
Request
Request Body schema: application/json
required
type
required
string

Types of webhooks available.

Examples: Freight.TrackingUpdated - Inbound.Received - Inbound.ShipmentStatusChanged - Inventory.Adjusted - Order.Cancelled - Order.Shipped - Return.Updated - Shipment.Cancelled - Shipment.Created - Shipment.Shipped
url
required
string^https:\/\/.+

Webhook URL where events should be sent to. Must begin with 'https://'.

method
required
string (WebhookRequestMethod)
Enum: "POST" "PUT"
authMethod
string (WebhookAuthType)
  • NONE: No authentication needed to send webhook events to the specified webhook URL
  • BASIC_AUTH: Basic authentication (username and password) if required by the webhook URL
  • TOKEN: A token is sent as the tokenHeader header value
Enum: "BASIC_AUTH" "TOKEN" "NONE"
username
string

Required if auth_method is BASIC_AUTH.

password
string

Required if auth_method is BASIC_AUTH.

token
string

Required if auth_method is TOKEN.

tokenHeader
string

Required if auth_method is TOKEN.

Responses
202

Webhook has been created

400

Bad Request

401

Unauthorized

409

Conflict

422

Unprocessable Entity

post/logistics/api/2023-07/webhooks
Request samples
application/json
{
  • "type": "string",
  • "url": "string",
  • "method": "POST",
  • "authMethod": "BASIC_AUTH",
  • "username": "string",
  • "password": "string",
  • "token": "string",
  • "tokenHeader": "string"
}
Response samples
application/json
{
  • "type": "string",
  • "url": "string",
  • "method": "POST",
  • "authMethod": "BASIC_AUTH",
  • "username": "string",
  • "password": "string",
  • "token": "string",
  • "tokenHeader": "string",
  • "id": 0
}

GetWebhooks

Get all webhooks currently registered and active.

SecurityBEARER
Responses
200

List of webhook entries

Response Schema: application/json
Array
type
required
string

Types of webhooks available.

Examples: Freight.TrackingUpdated - Inbound.Received - Inbound.ShipmentStatusChanged - Inventory.Adjusted - Order.Cancelled - Order.Shipped - Return.Updated - Shipment.Cancelled - Shipment.Created - Shipment.Shipped
url
required
string^https:\/\/.+

Webhook URL where events should be sent to. Must begin with 'https://'.

method
required
string (WebhookRequestMethod)
Enum: "POST" "PUT"
authMethod
string (WebhookAuthType)
  • NONE: No authentication needed to send webhook events to the specified webhook URL
  • BASIC_AUTH: Basic authentication (username and password) if required by the webhook URL
  • TOKEN: A token is sent as the tokenHeader header value
Enum: "BASIC_AUTH" "TOKEN" "NONE"
username
string

Required if auth_method is BASIC_AUTH.

password
string

Required if auth_method is BASIC_AUTH.

token
string

Required if auth_method is TOKEN.

tokenHeader
string

Required if auth_method is TOKEN.

id
required
number <double> (WebhookIdType) ^\d+$

A unique identifier for a webhook.

401

Unauthorized

get/logistics/api/2023-07/webhooks
Response samples
application/json
[
  • {
    • "type": "string",
    • "url": "string",
    • "method": "POST",
    • "authMethod": "BASIC_AUTH",
    • "username": "string",
    • "password": "string",
    • "token": "string",
    • "tokenHeader": "string",
    • "id": 0
    }
]

GetWebhook

Get a specific webhook using the webhook identifier.

SecurityBEARER
Request
path Parameters
webhookId
required
number <double> (WebhookIdType) ^\d+$

A unique identifier for a webhook.

Responses
200

Webhook details

Response Schema: application/json
type
required
string

Types of webhooks available.

Examples: Freight.TrackingUpdated - Inbound.Received - Inbound.ShipmentStatusChanged - Inventory.Adjusted - Order.Cancelled - Order.Shipped - Return.Updated - Shipment.Cancelled - Shipment.Created - Shipment.Shipped
url
required
string^https:\/\/.+

Webhook URL where events should be sent to. Must begin with 'https://'.

method
required
string (WebhookRequestMethod)
Enum: "POST" "PUT"
authMethod
string (WebhookAuthType)
  • NONE: No authentication needed to send webhook events to the specified webhook URL
  • BASIC_AUTH: Basic authentication (username and password) if required by the webhook URL
  • TOKEN: A token is sent as the tokenHeader header value
Enum: "BASIC_AUTH" "TOKEN" "NONE"
username
string

Required if auth_method is BASIC_AUTH.

password
string

Required if auth_method is BASIC_AUTH.

token
string

Required if auth_method is TOKEN.

tokenHeader
string

Required if auth_method is TOKEN.

id
required
number <double> (WebhookIdType) ^\d+$

A unique identifier for a webhook.

401

Unauthorized

404

A webhook with the webhook id provided was not found

get/logistics/api/2023-07/webhooks/{webhookId}
Response samples
application/json
{
  • "type": "string",
  • "url": "string",
  • "method": "POST",
  • "authMethod": "BASIC_AUTH",
  • "username": "string",
  • "password": "string",
  • "token": "string",
  • "tokenHeader": "string",
  • "id": 0
}

DeleteWebhook

Delete a webhook that has been created.

SecurityBEARER
Request
path Parameters
webhookId
required
number <double> (WebhookIdType) ^\d+$

A unique identifier for a webhook.

Responses
204

Webhook has been deleted

401

Unauthorized

404

A webhook with the webhook id provided was not found

delete/logistics/api/2023-07/webhooks/{webhookId}
Response samples
application/json
{
  • "status": 401,
  • "type": "string",
  • "title": "string",
  • "detail": "string",
  • "instance": "string",
  • "code": 401,
  • "message": "string"
}