Events

The Events API allows you to retrieve historical events.

GetEvents

Get all events matching certain criteria.

SecurityBEARER
Request
query Parameters
limit
number <double> [ 1 .. 100 ]
Default: 100
ids
Array of strings (EventId)
type
string^([\w\.]{0,50})$
after
string <date-time>
page_info
string
Responses
200

OK

Response Schema: application/json
Array
id
required
string
type
required
string
time
required
string
payload
required
object (EventPayloadType)

Event payload

get/logistics/api/2024-07/events
Response samples
application/json
[
  • {
    • "id": "string",
    • "type": "string",
    • "time": "string",
    • "payload": {
      • "property1": "string",
      • "property2": "string"
      }
    }
]

Parcel.TrackingUpdatedWebhook

Event for a parcel tracking update.

Request
Request Body schema: application/json
required
logisticsAccountId
required
string

Logistics account ID

logisticsEventId
required
string

Logistics event ID

logisticsEventType
required
string

Event type

logisticsEventTime
required
string

Time when the event occurred

trackingCode
required
string
status
required
string
message
required
string
eventTime
required
string
required
object (EventLocation)
city
string
state
string
country
string
zip
string
Responses
200

Return a 200 status to indicate that the data was received successfully

Request samples
application/json
{
  • "logisticsAccountId": "string",
  • "logisticsEventId": "string",
  • "logisticsEventType": "string",
  • "logisticsEventTime": "string",
  • "trackingCode": "string",
  • "status": "string",
  • "message": "string",
  • "eventTime": "string",
  • "location": {
    • "city": "string",
    • "state": "string",
    • "country": "string",
    • "zip": "string"
    }
}

Return.UpdatedWebhook

Event when a return order has been updated.

Request
Request Body schema: application/json
required
id
required
number <double>

Unique identifier of the return.

status
required
string (LogisticsReturnStatus)

The current status of the return.

Enum: "CREATED" "SHIPPED" "RECEIVED_FOR_PROCESSING" "PROCESSED" "CANCELLED"
object (DeliverrAddress)

Source address where the return was shipped from, if known.

name
required
string
company
string
street1
required
string
street2
string
city
required
string
zip
required
string
state
required
string
country
required
string
phone
string
email
string
isResidential
boolean
required
object (ShippingLabel)

The label used to ship the return.

trackingCode
required
string

The tracking code of the label.

trackingStatus
required
string (LogisticsReturnTrackingStatusResponse)

The current tracking status of the return.

Enum: "CREATED" "SHIPPED" "DELIVERED" "CANCELLED" "FAILED"
carrier
required
string

The name of the carrier providing the label.

trackingUrl
string

The tracking URL, if available.

labelUrl
string

The URL of the label, if available.

rma
required
string

RMA of the return.

externalReturnId
required
string

A unique reference to the return order in the external system submitting the request.

required
Array of objects (ReturnItem)

Items contained in the return.

Array
identifier
required
string

The identifier provided when creating the return item.

expectedQuantity
required
number <double>

The quantity provided when creating the return item.

required
Array of objects (InspectedItem)

The list of items with the given identifier that have completed inspection at the warehouse.

shippedAt
string <date-time>

Date when the return was shipped.

receivedAt
string <date-time>

Date when the return was received at the warehouse.

inspectedAt
string <date-time>

Date when the return was inspected at the warehouse.

logisticsAccountId
required
string

Logistics account ID

logisticsEventId
required
string

Logistics event ID

logisticsEventType
required
string

Event type

logisticsEventTime
required
string

Time when the event occurred

Responses
200

Return a 200 status to indicate that the data was received successfully

Request samples
application/json
{
  • "id": 0,
  • "status": "CREATED",
  • "sourceAddress": {
    • "name": "string",
    • "company": "string",
    • "street1": "string",
    • "street2": "string",
    • "city": "string",
    • "zip": "string",
    • "state": "string",
    • "country": "string",
    • "phone": "string",
    • "email": "string",
    • "isResidential": true
    },
  • "shippingLabel": {
    • "trackingCode": "string",
    • "trackingStatus": "CREATED",
    • "carrier": "string",
    • "trackingUrl": "string",
    • "labelUrl": "string"
    },
  • "rma": "string",
  • "externalReturnId": "string",
  • "returnItems": [
    • {
      • "identifier": "string",
      • "expectedQuantity": 0,
      • "inspectedItems": [
        ]
      }
    ],
  • "shippedAt": "2019-08-24T14:15:22Z",
  • "receivedAt": "2019-08-24T14:15:22Z",
  • "inspectedAt": "2019-08-24T14:15:22Z",
  • "logisticsAccountId": "string",
  • "logisticsEventId": "string",
  • "logisticsEventType": "string",
  • "logisticsEventTime": "string"
}

Inventory.AdjustedWebhook

Event when inventory changed.

Request
Request Body schema: application/json
required
logisticsAccountId
required
string

Logistics account ID

logisticsEventId
required
string

Logistics event ID

logisticsEventType
required
string

Event type

logisticsEventTime
required
string

Time when the event occurred

adjustmentId
required
string
reason
required
string
Reason Description
ADJUSTMENT These are reflecting adjustments done in warehouse by associates. For example, when they relocate items from place to place etc
ASN_RECEIVE Any receive in the destination warehouse, either direct or via crossdock
DAMAGE Damage related negative adjustments
RETURN Positive adjustments for returns
TRANSFER Currently only includes FC to FC and direct RS to FC, not via Hubs or CD
QUARANTINE Product or lot quarantine
RELOCATE Relocated within a warehouse
COUNT This is when associates count inventory in a bin; can reflect inventory lost, found or relocated
SHIPPED Negative adjustment based on order shipment
required
Array of objects (Adjustment)
Array
logisticsSKU
required
string (ProductIdType) = 11 characters ^D[0-9a-zA-Z]+$

The globally unique product identifier created by Flexport and assigned on product creation. May be referred to in other documentation as the Flexport SKU or DSKU.

required
Array of objects (Change)
Responses
200

Return a 200 status to indicate that the data was received successfully

Request samples
application/json
{
  • "logisticsAccountId": "string",
  • "logisticsEventId": "string",
  • "logisticsEventType": "string",
  • "logisticsEventTime": "string",
  • "adjustmentId": "string",
  • "reason": "string",
  • "adjustments": [
    • {
      • "logisticsSKU": "stringstrin",
      • "changes": [
        ]
      }
    ]
}

Shipment.CreatedWebhook

Event when a new shipment was created.

Request
Request Body schema: application/json
required
logisticsAccountId
required
string

Logistics account ID

logisticsEventId
required
string

Logistics event ID

logisticsEventType
required
string

Event type

logisticsEventTime
required
string

Time when the event occurred

id
required
string (ShipmentIdType) ^\d+$

A unique identifier for this shipment.

orderId
required
string (OrderIdType) ^\d+$

A unique identifier for this order.

externalOrderId
required
string (ExternalOrderIdType)

A unique order reference meaningful to the external system submitting the order.

Responses
200

Return a 200 status to indicate that the data was received successfully

Request samples
application/json
{
  • "logisticsAccountId": "string",
  • "logisticsEventId": "string",
  • "logisticsEventType": "string",
  • "logisticsEventTime": "string",
  • "id": "string",
  • "orderId": "string",
  • "externalOrderId": "string"
}

Shipment.CancelledWebhook

Event when a new shipment was cancelled.

Request
Request Body schema: application/json
required
logisticsAccountId
required
string

Logistics account ID

logisticsEventId
required
string

Logistics event ID

logisticsEventType
required
string

Event type

logisticsEventTime
required
string

Time when the event occurred

id
required
string (ShipmentIdType) ^\d+$

A unique identifier for this shipment.

orderId
required
string (OrderIdType) ^\d+$

A unique identifier for this order.

externalOrderId
required
string (ExternalOrderIdType)

A unique order reference meaningful to the external system submitting the order.

Responses
200

Return a 200 status to indicate that the data was received successfully

Request samples
application/json
{
  • "logisticsAccountId": "string",
  • "logisticsEventId": "string",
  • "logisticsEventType": "string",
  • "logisticsEventTime": "string",
  • "id": "string",
  • "orderId": "string",
  • "externalOrderId": "string"
}

Shipment.ShippedWebhook

Order may contain one or more shipments. Each shipment triggers a Shipment.Shipped event. After the entire order ships, Order.Shipped is triggered.

Request
Request Body schema: application/json
required
logisticsAccountId
required
string

Logistics account ID

logisticsEventId
required
string

Logistics event ID

logisticsEventType
required
string

Event type

logisticsEventTime
required
string

Time when the event occurred

id
required
string (ShipmentIdType) ^\d+$

A unique identifier for this shipment.

orderId
required
string (OrderIdType) ^\d+$

A unique identifier for this order.

externalOrderId
required
string (ExternalOrderIdType)

A unique order reference meaningful to the external system submitting the order.

Responses
200

Return a 200 status to indicate that the data was received successfully

Request samples
application/json
{
  • "logisticsAccountId": "string",
  • "logisticsEventId": "string",
  • "logisticsEventType": "string",
  • "logisticsEventTime": "string",
  • "id": "string",
  • "orderId": "string",
  • "externalOrderId": "string"
}

Shipment.PartiallyShippedWebhook

Event when a new shipment was partially shipped.

Request
Request Body schema: application/json
required
logisticsAccountId
required
string

Logistics account ID

logisticsEventId
required
string

Logistics event ID

logisticsEventType
required
string

Event type

logisticsEventTime
required
string

Time when the event occurred

id
required
string (ShipmentIdType) ^\d+$

A unique identifier for this shipment.

orderId
required
string (OrderIdType) ^\d+$

A unique identifier for this order.

externalOrderId
required
string (ExternalOrderIdType)

A unique order reference meaningful to the external system submitting the order.

Responses
200

Return a 200 status to indicate that the data was received successfully

Request samples
application/json
{
  • "logisticsAccountId": "string",
  • "logisticsEventId": "string",
  • "logisticsEventType": "string",
  • "logisticsEventTime": "string",
  • "id": "string",
  • "orderId": "string",
  • "externalOrderId": "string"
}

Inbound.ReceivedWebhook

Event when an inbound was received.

Request
Request Body schema: application/json
required
logisticsAccountId
required
string

Logistics account ID

logisticsEventId
required
string

Logistics event ID

logisticsEventType
required
string

Event type

logisticsEventTime
required
string

Time when the event occurred

type
required
string
Enum: "SELLABLE" "DAMAGED"
amount
required
integer <int32>
shipmentItemId
required
integer <int32>
Responses
200

Return a 200 status to indicate that the data was received successfully

Request samples
application/json
{
  • "logisticsAccountId": "string",
  • "logisticsEventId": "string",
  • "logisticsEventType": "string",
  • "logisticsEventTime": "string",
  • "type": "SELLABLE",
  • "amount": 0,
  • "shipmentItemId": 0
}

Inbound.ShipmentStatusChangedWebhook

Event when an inbound shipment status has changed.

Request
Request Body schema: application/json
required
logisticsAccountId
required
string

Logistics account ID

logisticsEventId
required
string

Logistics event ID

logisticsEventType
required
string

Event type

logisticsEventTime
required
string

Time when the event occurred

status
required
string
shipmentId
required
string (ShipmentIdType) ^\d+$

A unique identifier for this shipment.

Responses
200

Return a 200 status to indicate that the data was received successfully

Request samples
application/json
{
  • "logisticsAccountId": "string",
  • "logisticsEventId": "string",
  • "logisticsEventType": "string",
  • "logisticsEventTime": "string",
  • "status": "string",
  • "shipmentId": "string"
}

Freight.TrackingUpdatedWebhook

Event for a freight tracking update.

Request
Request Body schema: application/json
required
required
object (FreightStopDetails)
required
object (AppointmentWindow)
required
object (DeliverrAddress)
required
object (FreightStopDetails)
required
object (AppointmentWindow)
required
object (DeliverrAddress)
bolId
required
string
mode
required
string (FreightShipmentMode)
Enum: "LTL" "FTL" "DRAYAGE" "INTERMODAL" "TRANSLOAD" "VLTL" "FCL" "LCL"
bolStatus
required
string (FreightBolStatus)
Enum: "CANCELLED" "TENDERED" "CREATED" "IN_TRANSIT" "DELIVERED"
carrierName
string
estimatedPickupTime
string <date-time>
estimatedDeliveryTime
string <date-time>
estimatedPortDepartureTime
string <date-time>
estimatedPortArrivalTime
string <date-time>
totalPallets
number <double>
required
Array of objects (FreightTrackingEvent)
Array
occurredAt
required
string <date-time>
object (FreightTrackingLocation)
eventType
required
string (FreightTrackingEventType)
Enum: "CANCELLED" "TENDERED" "CREATED" "DELIVERED" "ESTIMATED_PICKUP_DATE_CHANGED" "PICKED_UP" "LOCATION_UPDATED" "ESTIMATED_DELIVERY_DATE_CHANGED" "CONTAINER_FULL_INGATED" "CONTAINER_DEPARTED" "CONTAINER_BERTHED_AT_TRANSSHIPMENT_PORT" "CONTAINER_LOADED_AT_TRANSSHIPMENT_PORT" "CONTAINER_DEPARTED_FROM_TRANSSHIPMENT_PORT" "CONTAINER_BERTHED" "CONTAINER_DISCHARGED" "CONTAINER_AVAILABLE" "CONTAINER_RETURNED"
bolStatus
required
string (FreightBolStatus)
Enum: "CANCELLED" "TENDERED" "CREATED" "IN_TRANSIT" "DELIVERED"
object (DeliverrAddress)
updatedAt
required
string <date-time>
Responses
200

Return a 200 status to indicate that the data was received successfully

Request samples
application/json
{
  • "pickupDetails": {
    • "appointmentWindow": {
      • "startTime": "string",
      • "endTime": "string",
      • "date": "string"
      },
    • "address": {
      • "name": "string",
      • "company": "string",
      • "street1": "string",
      • "street2": "string",
      • "city": "string",
      • "zip": "string",
      • "state": "string",
      • "country": "string",
      • "phone": "string",
      • "email": "string",
      • "isResidential": true
      }
    },
  • "deliveryDetails": {
    • "appointmentWindow": {
      • "startTime": "string",
      • "endTime": "string",
      • "date": "string"
      },
    • "address": {
      • "name": "string",
      • "company": "string",
      • "street1": "string",
      • "street2": "string",
      • "city": "string",
      • "zip": "string",
      • "state": "string",
      • "country": "string",
      • "phone": "string",
      • "email": "string",
      • "isResidential": true
      }
    },
  • "bolId": "string",
  • "mode": "LTL",
  • "bolStatus": "CANCELLED",
  • "carrierName": "string",
  • "estimatedPickupTime": "2019-08-24T14:15:22Z",
  • "estimatedDeliveryTime": "2019-08-24T14:15:22Z",
  • "estimatedPortDepartureTime": "2019-08-24T14:15:22Z",
  • "estimatedPortArrivalTime": "2019-08-24T14:15:22Z",
  • "totalPallets": 0,
  • "events": [
    • {
      • "occurredAt": "2019-08-24T14:15:22Z",
      • "location": {
        },
      • "eventType": "CANCELLED",
      • "bolStatus": "CANCELLED",
      • "address": {
        }
      }
    ],
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Order.CancelledWebhook

Event if an order was cancelled.

Request
Request Body schema: application/json
required
logisticsAccountId
required
string

Logistics account ID

logisticsEventId
required
string

Logistics event ID

logisticsEventType
required
string

Event type

logisticsEventTime
required
string

Time when the event occurred

id
required
string (OrderIdType) ^\d+$

A unique identifier for this order.

orderId
required
string (OrderIdType) ^\d+$

A unique identifier for this order.

externalOrderId
required
string (ExternalOrderIdType)

A unique order reference meaningful to the external system submitting the order.

Responses
200

Return a 200 status to indicate that the data was received successfully

Request samples
application/json
{
  • "logisticsAccountId": "string",
  • "logisticsEventId": "string",
  • "logisticsEventType": "string",
  • "logisticsEventTime": "string",
  • "id": "string",
  • "orderId": "string",
  • "externalOrderId": "string"
}

Order.ShippedWebhook

Order.Shipped is sent when the entire order has shipped. If order consists of multiple shipments, each shipment also triggers a Shipment.Shipped event.

Request
Request Body schema: application/json
required
logisticsAccountId
required
string

Logistics account ID

logisticsEventId
required
string

Logistics event ID

logisticsEventType
required
string

Event type

logisticsEventTime
required
string

Time when the event occurred

id
required
string (OrderIdType) ^\d+$

A unique identifier for this order.

orderId
required
string (OrderIdType) ^\d+$

A unique identifier for this order.

externalOrderId
required
string (ExternalOrderIdType)

A unique order reference meaningful to the external system submitting the order.

Responses
200

Return a 200 status to indicate that the data was received successfully

Request samples
application/json
{
  • "logisticsAccountId": "string",
  • "logisticsEventId": "string",
  • "logisticsEventType": "string",
  • "logisticsEventTime": "string",
  • "id": "string",
  • "orderId": "string",
  • "externalOrderId": "string"
}