# Packing webhooks

Path: `/label-provider/webhooks`

These are the two events that kick off label generation. Subscribe to one of them **and**
`turbo_label_packing_created`. Both carry the ids you need for the shipment-tracking and
attach calls.

> **NOTE: shipment_tracking not yet populated**
>
> On both events the box's `shipment_tracking` object is not yet populated — only
> the packing box `id` and the `shipment_tracking.id` are present. You
> populate the rest via [the PUT endpoint](/label-provider/shipment-tracking).

## packing_box_closed

Fires as each box is closed.

**Webhook event:&#x20;**`packing_box_closed`

| Field                                   | Type | Required | Description                                             |
| --------------------------------------- | ---- | -------- | ------------------------------------------------------- |
| type                                    |      |          | Unique per kind of webhook.                             |
| data.warehouse_id                      |      |          | Warehouse where the event was triggered.                |
| data.sales_order_id                   |      |          | Unique id of the order in Pulpo.                        |
| data.sales_order.order_num            |      |          | Order number on the customer side.                      |
| data.sales_order.merchant_id          |      |          | Customer of the fulfiller (single default for non-3PL). |
| data.sales_order.merchant_channel_id |      |          | Selling channel — e.g. to only label Amazon orders.     |
| packing_boxes.packing_order_id       |      |          | Unique id of the packing task.                          |
| packing_boxes.shipment_tracking.id    |      |          | Tracking id for this box — needed for the PUT calls.    |
| packing_boxes.id                       |      |          | Unique id of the box in Pulpo.                          |
| packing_box_items.quantity            |      |          | Quantity of the product in this box.                    |
| packing_box_items.product_id         |      |          | Unique product id in Pulpo.                             |
| packing_box_items.product.sku         |      |          | SKU (unique per Tenant + Merchant).                     |

Sample payload:

```json
{
  "warehouse_name": "simon_warehouse_1",
  "warehouse_id": 2236,
  "updated_at": "2026-09-23T13:36:48",
  "type": "packing_box_closed",
  "inserted_at": "2026-09-23T13:36:48",
  "id": "8053797e-9fee-4abb-b9a4-721a2fb6dc03",
  "data": {
    "warehouse_id": 2236,
    "sequence_number": "PA-0000054",
    "sales_order_id": 26167904,
    "sales_order": {
      "merchant_channel_id": 1068,
      "merchant_id": 1053,
      "order_num": "ORDER_587493"
    },
    "packing_boxes": [
      {
        "width": 15,
        "weight": 336.2,
        "state": "packed",
        "inserted_at": "2026-09-23T13:36:47",
        "shipment_tracking": {
          "id": 63898
        },
        "packing_order_id": 46093,
        "packing_box_items": [
          {
            "line_order_id": null,
            "quantity": 12,
            "product_id": 9169276,
            "product": {
              "tenant_id": 1445,
              "sku": "NP0001"
            }
          },
          {
            "line_order_id": null,
            "quantity": 4,
            "product_id": 9169283,
            "product": {
              "tenant_id": 1445,
              "sku": "SP0002"
            }
          }
        ],
        "name": "BOX S",
        "loaded_shipping_box_id": null,
        "length": 20,
        "id": 72384,
        "height": 10,
        "box_number": 1,
        "attributes": {},
        "attachments": []
      }
    ],
    "owner": {},
    "origin_location_id": 1065394,
    "items": [
      {
        "suggested_batches": [],
        "requested_quantity": 12,
        "product": {},
        "packed_quantity": 12,
        "id": 66631,
        "batches": []
      }
    ],
    "inserted_at": "2026-09-23T13:28:10",
    "id": 46093,
    "end_date": null,
    "destination_location_id": null,
    "attachments": [],
    "source_channel": true
  }
}
```

## packing_order_finished

Fires when the whole packing task is finished. Same key fields as above, plus batch detail
under `items[].batches[]` (`batch_id`, `quantity`, `batch.type` = lot/serial,
`batch.product_id`).

**Webhook event:&#x20;**`packing_order_finished`

Sample payload:

```json
{
  "warehouse_name": "simon_warehouse_1",
  "warehouse_id": 2236,
  "type": "packing_order_finished",
  "inserted_at": "2026-09-23T13:39:19",
  "id": "23f5ddab-8189-491a-b814-71190b0272d7",
  "data": {
    "warehouse_id": 2236,
    "sequence_number": "PA-0000054",
    "sales_order_id": 26167904,
    "sales_order": {
      "order_num": "ORDER_587493",
      "merchant_id": 1053,
      "merchant_channel_id": 1068
    },
    "packing_boxes": [
      {
        "width": 15,
        "weight": 336.2,
        "shipment_tracking": {
          "id": 63898,
          "status": "pulpowms_label_generated",
          "tracking_code": "PA-0000054-72384"
        },
        "packing_order_id": 46093,
        "packing_box_items": [
          {
            "quantity": 12,
            "product_id": 9169276
          }
        ],
        "attachments": [
          {
            "id": "5cdee5d4-70bb-446b-a9eb-b9dbda0c5151",
            "type": "label",
            "extension": "pdf",
            "url": "https://s3.eu-central-1.amazonaws.com/pulpo-wms-eu-show-attachments/uploads/5cdee5d4-70bb-446b-a9eb-b9dbda0c5151.pdf"
          }
        ],
        "name": "BOX S",
        "length": 20,
        "inserted_at": "2026-09-23T13:36:47",
        "id": 72384,
        "height": 10,
        "box_number": 1
      }
    ],
    "owner": {},
    "items": [
      {
        "suggested_batches": [],
        "requested_quantity": 12,
        "product": {
          "tenant_id": 1445
        },
        "packed_quantity": 12,
        "id": 66633,
        "batches": [
          {
            "quantity": 12,
            "packing_item_id": 66633,
            "batch_id": 163923,
            "batch": {
              "type": "lot",
              "product_id": 9169279,
              "id": 163923
            }
          }
        ]
      }
    ],
    "inserted_at": "2026-09-23T13:28:10",
    "id": 46093,
    "end_date": null,
    "destination_location_id": null,
    "attachments": []
  }
}
```

---

Website version: https://connect.pulpo.co/label-provider/webhooks
Whole guide in one file: https://connect.pulpo.co/llms-full.txt
Index of all pages: https://connect.pulpo.co/llms.txt
