Shipping update webhook

Webhook 225 views

Configuring the Webhook

Logivery allows you to set up webhooks to send automatic notifications to external systems whenever there are updates or changes to your shipments (including details about orders and individual order items).

Each webhook created on Logivery includes the following settings:

  • Description: A short description to help identify the webhook.
  • Destination URL: The address to which Logivery will send notifications.
  • Trigger Event: Currently the only supported event is “Shipment Status Change”.
  • Shipping Statuses: Specific selection of shipping and tracking statuses that trigger the webhook notification.
  • Dataset: Determines the structure and content of the data sent. Currently, the "Shipping Essentials" dataset is available.
  • Webhook Filters: Allows you to define filters to limit shipments that trigger the webhook.
  • Secret Key: A security code that is added to the URL to ensure authenticity and security in the transmission.

Notification format

Logivery sends a notification whenever there is a change in the status of a shipment (identified by the "reference" field).

Notifications are sent via POST requests.

The secret key is included in the HTTP header with the X-WEBHOOK-KEY parameter.

Here is the sample request:

{ 
    "reference": "Q",
    "orders": {
        "50444": {
            "items": [
                "12427A"
            ],
            "number": "50444",
            "secondary_id": 1532
        }
    },
    "courier": {
        "code": "BRTN",
        "reference": "BRT",
        "identifier": "BRTN_8"
    },

    "containers": [{
            "type": "BOX_STANDARD_1",
            "width": 40,
            "height": 25,
            "length": 35,
            "weight": 0.32,
            "identifier": "S",
            "weight_uom": "Kg",
            "tare_weight": 0.05,
            "total_weight": 0.37,
            "dimension_uom": "cm",
            "tracking_number": "",
            "external_identifier": "#0"
        }
    ],
    "identifier": null,
    "shipping_date": null,
    "shipping_state": "READY",
    "collection_state": "",
    "deadline_shipping_date": "13-02-2025 12:00:42"
}

Notes

In the webhook message, the orders section indicates the orders related to the specific shipment notified.

In the courier group we find information on the shipping service used:

  • "code": "BRTN": identification code of the selected courier
  • "reference": "BRT": custom alphanumeric reference for the shipping service (freely chosen by the seller via Logivery, for example a descriptive name)
  • "identifier": "BRTN_8": unique identifier of the shipping service generated by the combination of "code" and service ID

The containers field lists the packages included in the shipment, indicating dimensions, type (e.g., box, envelope, or pallet), the tracking number, and the identifier of each package.

The identifier field represents a custom identifier for the shipment (usually optional).

The shipping_date field indicates the shipping date (if available).

The shipping_state field shows the current status of the shipment.

The collection_state field indicates the status of the shipment acceptance confirmation.

The deadline_shipping_date field represents the date by which the shipment must be made.