# Happy path: outgoing process

Path: `/guide/outgoing`

The outgoing process starts with a **Sales Order** (`type = sales_order`) that is fulfilled
in a specific Warehouse. [Products](/guide/products) and the customer (`type = C` Third
Party) must already exist — `third_party_id` is required on the Sales Order. So must the
shipping method, if you assign one.

**Flow: Outgoing: SO → picking → packing → shipping → truck loading (PGI).**

1. **SO** — Create the sales order in bulk. Endpoint: `POST /sales/bulk/orders`

2. **Outgoing Orders** — The SO is split into one or more Fulfillment Orders.

3. **Picking** — Items are picked from storage. Endpoint: `GET /picking/orders`

4. **Packing** — Items are packed into boxes. Endpoint: `GET /packing/orders`

5. **Shipping** — Boxes are shipped.

6. **PIC / PGI** — Post goods issue — the order is fulfilled. Signalled by sales_order_finished.

## Before you start: shipping methods

A **shipping method** (carrier + service, e.g. "DHL Standard") must exist before you can
assign it to a sales order via `shipping_method_id`. Set your methods up once and keep
their ids(3PL fulfillers: , per merchant / single merchants: (nothing)).

> **WARNING: Always send merchant_id and merchant_channel_id in the bulk call**
>
> Otherwise new methods are created without a merchant and can't be found or deleted
> afterwards.

**Endpoint: Search shipping methods** — `GET /shipping/shipping_methods` (operationId: searchShippingMethods)

Look up the `id` to send as `shipping_method_id`.

**Endpoint: Get shipping method by ID** — `GET /shipping/shipping_methods/{id}` (operationId: getShippingMethod)

Fetch one shipping method by id.

**Endpoint: Create a shipping method** — `POST /shipping/shipping_methods` (operationId: createShippingMethod)

Create one shipping method.

**Endpoint: Bulk create or update shipping methods** — `PUT /shipping/bulk/shipping_methods` (operationId: bulkUpsertShippingMethods)

Create or update several methods at once, matched by `name`.

**Endpoint: Delete a shipping method** — `DELETE /shipping/shipping_methods/{id}` (operationId: deleteShippingMethod)

Delete a method that was never used on an order.

## Endpoints to consume

**Endpoint: Create third parties in bulk** — `POST /iam/bulk/third_parties` (operationId: bulkCreateThirdParties)

Create the customer (`type = C`) before creating the order — its `id` becomes
`third_party_id` below.

**Endpoint: Create sales orders in bulk** — `POST /sales/bulk/orders` (operationId: bulkCreateSalesOrders)

Create the sales order. Requires `order_num`, `third_party_id`, `priority`, and `ship_to`.

(3PL fulfillers: As a 3PL, you must send the correct `merchant_id` and `merchant_channel_id` — they must match the product and customer. / single merchants: As a single merchant, `merchant_channel_id` is optional and resolves to your default channel.)

> **Only for single merchants:**
>
> > **SUCCESS: Simpler for you**
> >
> > You can omit `merchant_id` / `merchant_channel_id` — Pulpo assigns your single default.

**Endpoint: Search sales orders** — `GET /sales/orders` (operationId: searchSalesOrders)

Track orders. Supports `delivery_date`, `inserted_at`, `updated_at` filters with
`between:`, `gte:`, `lte:` prefixes.

**Endpoint: Attach a file to a sales order** — `POST /sales/orders/{id}/attach` (operationId: attachFileToSalesOrder)

Attach a file such as a **delivery note** to the sales order: `type = document`,
`document_type = delivery_note`. One file per call.

**Endpoint: Delete a sales order attachment** — `DELETE /sales/orders/{id}/attachments/{attachment_id}` (operationId: deleteSalesOrderAttachment)

Remove an attachment again, by its `attachments[].id`.

### Create picklists

Picklists are created from **fulfillment orders** (`fulfillment_orders[].id` on the sales
order), not from sales orders. Pick the call that matches your picking type:

| Picking type             | Picklists                        | Call                                      |
| ------------------------ | -------------------------------- | ----------------------------------------- |
| **Standard**             | One per order                    | `POST /picking/bulk/orders`               |
| **Batch**                | One for all orders               | `POST /picking/orders` with `cart: false` |
| **Cart**                 | One for all orders, cart mode    | `POST /picking/orders` with `cart: true`  |
| **Turbo label standard** | One per order, labels first      | `POST /picking/bulk/orders/turbo`         |
| **Turbo label batch**    | One for all orders, labels first | `POST /picking/orders/turbo`              |

Batch and cart are all or nothing: if one order can't be picked, no picklist is created.
Standard handles each order on its own, so check both `created` and `errors`.

> **NOTE: Turbo label picking is asynchronous**
>
> The turbo calls answer `204` right away. Labels are then fetched from the carrier in the
> background, which can take a while. Poll the orders with `GET /sales/orders/fulfillments`
> until `process_information.status` is `turbo_label_created` (done) or
> `error_creating_picking` (see `errors`, the order can be sent again). Only trust a status
> whose `attributes.request_id` matches the `x-request-id` header of your call.

**Endpoint: Create standard picklists (one per order)** — `POST /picking/bulk/orders` (operationId: bulkCreatePickingOrders)

Standard picking. Optionally assign `pickers`.

**Endpoint: Create a batch or cart picklist** — `POST /picking/orders` (operationId: createPickingOrder)

Batch or cart picking.

**Endpoint: Create turbo label standard picklists (asynchronous)** — `POST /picking/bulk/orders/turbo` (operationId: bulkCreateTurboPickingOrders)

Turbo label standard picking. One label per unit, or per order with `turbo_label_per_order`.

**Endpoint: Create a turbo label batch picklist (asynchronous)** — `POST /picking/orders/turbo` (operationId: createTurboPickingOrder)

Turbo label batch picking. Cart mode is not supported.

**Endpoint: Search fulfillment orders** — `GET /sales/orders/fulfillments` (operationId: searchFulfillmentOrders)

Find fulfillment order ids and check the turbo label progress.

**Endpoint: Delete picklists in bulk** — `DELETE /picking/bulk/orders` (operationId: bulkDeletePickingOrders)

Delete picklists. The orders go back to `queue` and can be picked again, turbo labels
are removed.

## Events you can subscribe to

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

Fired right after the order is created, before picking starts. `fulfillment_orders` lists
the execution unit(s) the SO was split into.

Sample payload:

```json
{
  "data": {
    "id": 26167904,
    "order_num": "ORDER_587493",
    "type": "sales_order",
    "state": "queue",
    "priority": 2,
    "delivery_date": "2026-09-17T21:59:59",
    "notes": "This is an order note",
    "warehouse_id": 2236,
    "merchant_id": 1053,
    "merchant_channel_id": 1068,
    "third_party_id": 3733698,
    "shipping_method_id": 2832,
    "estimated_total_weight": 2952,
    "estimated_total_volume": 28,
    "attributes": {
      "manually_created": true
    },
    "fulfillment_orders": [
      {
        "id": 14262803,
        "state": "queue"
      }
    ],
    "creator": {
      "id": 4625,
      "username": "simon_user1",
      "first_name": "Lilyan",
      "last_name": "Rogahn"
    },
    "inserted_at": "2026-09-17T13:23:35",
    "updated_at": "2026-09-17T13:23:35",
    "third_party": {
      "id": 3733698,
      "name": "customer 1",
      "third_type": "C",
      "identifier_number": "43740000_customer_1",
      "identifier_type": "DNI",
      "merchant_id": 1053,
      "merchant_channel_id": 1068
    },
    "ship_to": {
      "name": "Braun and Sons",
      "company_name": "Oberbrunner Inc",
      "phone_number": "(785) 703-7088",
      "address": {
        "street": "412 Willms Underpass",
        "street2": "Apt. 848",
        "city": "New Elyse",
        "post_number": "47290",
        "country": "Montenegro",
        "country_alpha2": "ME",
        "country_code": "499",
        "email": "reynold.cremin@herman.biz"
      }
    },
    "items": [
      {
        "id": 9871264,
        "product_id": 9169279,
        "quantity": 12,
        "fulfilled_quantity": null,
        "required_date": "2026-10-31T22:59:59",
        "notes": "this is a LOT product",
        "batches": [],
        "product": {
          "id": 9169279,
          "sku": "LP0001",
          "name": "Drink 1",
          "management_type": "lot"
        }
      },
      {
        "id": 9871265,
        "product_id": 9169283,
        "quantity": 4,
        "fulfilled_quantity": null,
        "required_date": null,
        "notes": "this is a serial product with some suggested serials",
        "batches": [
          {
            "id": 4372,
            "batch_id": 210493,
            "suggested_quantity": 1,
            "batch": {
              "id": 210493,
              "type": "serial",
              "number": "345345645"
            }
          },
          {
            "id": 4373,
            "batch_id": 210494,
            "suggested_quantity": 1,
            "batch": {
              "id": 210494,
              "type": "serial",
              "number": "345354333"
            }
          }
        ],
        "product": {
          "id": 9169283,
          "sku": "SP0002",
          "name": "Television 2",
          "management_type": "serial"
        }
      }
    ]
  },
  "id": "5ca7db75-9d0c-4eec-ad4e-e036614bbe32",
  "status": "triggered",
  "type": "sales_order_created",
  "retry": false,
  "inserted_at": "2026-09-17T13:23:35",
  "updated_at": "2026-09-17T13:23:35",
  "warehouse_id": 2236,
  "merchant_id": 1053,
  "merchant_channel_id": 1068,
  "webhook_id": null,
  "merchant_channel_name": "default",
  "merchant_name": "default",
  "warehouse_name": "simon_warehouse_1"
}
```

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

Fired when any field on the order changes. The only sales order event with
`pre_event_data` — the order as it was right before the change — so you can diff it
against `data` instead of guessing. Note that updating items replaces the full item
list rather than editing lines in place.

Sample payload:

```json
{
  "data": {
    "id": 26167904,
    "order_num": "ORDER_587493",
    "state": "queue",
    "delivery_date": "2026-09-30T21:59:59",
    "notes": "This is a new order note",
    "estimated_total_weight": 3336,
    "estimated_total_volume": 40,
    "fulfillment_orders": [
      {
        "id": 14262841,
        "state": "queue"
      }
    ],
    "updated_at": "2026-09-17T13:24:34",
    "items": [
      {
        "id": 9871265,
        "product_id": 9169283,
        "quantity": 4,
        "notes": "this is a serial product with some suggested serials",
        "product": {
          "id": 9169283,
          "sku": "SP0002",
          "name": "Television 2",
          "management_type": "serial"
        }
      },
      {
        "id": 9871310,
        "product_id": 9169279,
        "quantity": 12,
        "notes": "this is a LOT product",
        "product": {
          "id": 9169279,
          "sku": "LP0001",
          "name": "Drink 1",
          "management_type": "lot"
        }
      }
    ]
  },
  "id": "f602d347-dee9-4a0f-8add-aabec9b2820e",
  "status": "triggered",
  "type": "sales_order_updated",
  "retry": false,
  "inserted_at": "2026-09-17T13:24:34",
  "updated_at": "2026-09-17T13:24:34",
  "warehouse_id": 2236,
  "merchant_id": 1053,
  "merchant_channel_id": 1068,
  "webhook_id": null,
  "merchant_channel_name": "default",
  "merchant_name": "default",
  "warehouse_name": "simon_warehouse_1",
  "pre_event_data": {
    "id": 26167904,
    "order_num": "ORDER_587493",
    "state": "queue",
    "delivery_date": "2026-09-17T21:59:59",
    "notes": "This is an order note",
    "estimated_total_weight": 2952,
    "estimated_total_volume": 28,
    "fulfillment_orders": [
      {
        "id": 14262803,
        "state": "queue"
      }
    ],
    "updated_at": "2026-09-17T13:23:35",
    "items": [
      {
        "id": 9871265,
        "product_id": 9169283,
        "quantity": 4,
        "notes": "this is a serial product with some suggested serials",
        "product": {
          "id": 9169283,
          "sku": "SP0002",
          "name": "Television 2",
          "management_type": "serial"
        }
      },
      {
        "id": 9871264,
        "product_id": 9169279,
        "quantity": 12,
        "notes": "this is a LOT product",
        "product": {
          "id": 9169279,
          "sku": "LP0001",
          "name": "Drink 1",
          "management_type": "lot"
        }
      }
    ]
  }
}
```

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

Fired when the order is cancelled — `state` and `fulfillment_orders[0].state` both flip
to `cancelled`. `state_transitions` gives the full history of state changes; for
returns, `reason_codes` and `return_labels` may be populated too.

Sample payload:

```json
{
  "data": {
    "id": 24104938,
    "order_num": "batch_print_001_copy_03",
    "state": "cancelled",
    "delivery_date": "2026-08-03T00:00:00",
    "priority": 2,
    "warehouse_id": 2236,
    "merchant_id": 1053,
    "merchant_channel_id": 1068,
    "third_party_id": 4271360,
    "shipping_method_id": 2832,
    "updated_at": "2026-09-17T13:28:30",
    "fulfillment_orders": [
      {
        "id": 13149181,
        "state": "cancelled"
      }
    ],
    "reason_codes": [
      {
        "id": 198,
        "code": "pulpo_0000001",
        "name": "return"
      }
    ],
    "return_labels": [
      {
        "id": 29673,
        "return_code": "PA-0000044-71898"
      }
    ],
    "state_transitions": [
      {
        "id": 594236,
        "previous_state": "queue",
        "new_state": "picking",
        "updated_at": "2026-08-05T05:42:42",
        "performer_name": "simon_user1"
      },
      {
        "id": 594385,
        "previous_state": "picking",
        "new_state": "queue",
        "updated_at": "2026-08-06T09:41:47",
        "performer_name": "simon_user1"
      },
      {
        "id": 616036,
        "previous_state": "queue",
        "new_state": "cancelled",
        "updated_at": "2026-09-17T13:28:30",
        "performer_name": "simon_user1"
      }
    ],
    "items": [
      {
        "id": 8553774,
        "product_id": 9169276,
        "quantity": 1,
        "product": {
          "id": 9169276,
          "sku": "NP0001",
          "name": "T-Shirt 1",
          "management_type": "none"
        }
      }
    ]
  },
  "id": "e0b41228-3bbb-472b-b9a1-51c17150cccb",
  "status": "triggered",
  "type": "sales_order_cancelled",
  "retry": false,
  "inserted_at": "2026-09-17T13:28:30",
  "updated_at": "2026-09-17T13:28:30",
  "warehouse_id": 2236,
  "merchant_id": 1053,
  "merchant_channel_id": 1068,
  "webhook_id": null,
  "merchant_channel_name": "default",
  "merchant_name": "default",
  "warehouse_name": "simon_warehouse_1",
  "pre_event_data": null
}
```

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

Fired when the warehouse task to pick a fulfillment order's items is created. Each item
links back to `sales_order_id` and `fulfillment_order_id`; `picked_quantity` starts at `0`.

Sample payload:

```json
{
  "data": {
    "id": 76130,
    "type": "normal",
    "state": "queue",
    "sequence_number": "PI-0000069",
    "warehouse_id": 2236,
    "notes": "THIS IS A TEST PICKING NOTE",
    "start_date": null,
    "end_date": null,
    "creator": {
      "id": 4625,
      "username": "simon_user1",
      "first_name": "Lilyan",
      "last_name": "Rogahn"
    },
    "inserted_at": "2026-09-17T13:31:45",
    "updated_at": "2026-09-17T13:31:45",
    "items": [
      {
        "id": 290052,
        "sales_order_id": 26167904,
        "fulfillment_order_id": 14262841,
        "product_id": 9169276,
        "requested_quantity": 12,
        "picked_quantity": 0,
        "suggested_batches": [],
        "product": {
          "id": 9169276,
          "sku": "NP0001",
          "name": "T-Shirt 1",
          "management_type": "none"
        }
      },
      {
        "id": 290055,
        "sales_order_id": 26167904,
        "fulfillment_order_id": 14262841,
        "product_id": 9169283,
        "requested_quantity": 4,
        "picked_quantity": 0,
        "suggested_batches": [
          {
            "id": 1811,
            "quantity": 1,
            "batch_id": 210493,
            "batch": {
              "id": 210493,
              "type": "serial",
              "number": "345345645"
            }
          },
          {
            "id": 1812,
            "quantity": 1,
            "batch_id": 210494,
            "batch": {
              "id": 210494,
              "type": "serial",
              "number": "345354333"
            }
          }
        ],
        "product": {
          "id": 9169283,
          "sku": "SP0002",
          "name": "Television 2",
          "management_type": "serial"
        }
      }
    ]
  },
  "id": "0f8c39a6-3aac-466d-883b-13111f1ab959",
  "status": "triggered",
  "type": "picking_order_created",
  "retry": false,
  "inserted_at": "2026-09-17T13:31:45",
  "updated_at": "2026-09-17T13:31:45",
  "warehouse_id": 2236,
  "merchant_id": 1053,
  "merchant_channel_id": 1068,
  "webhook_id": null,
  "merchant_channel_name": "default",
  "merchant_name": "default",
  "warehouse_name": "simon_warehouse_1",
  "pre_event_data": null
}
```

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

Fired once picking is done — `state: "ended"` and `picked_quantity` matches
`requested_quantity` on every item. `batches` now lists which batch/location each unit
was actually picked from (`suggested_batches` was just the pre-pick suggestion).

Sample payload:

```json
{
  "data": {
    "id": 76130,
    "type": "normal",
    "state": "ended",
    "sequence_number": "PI-0000069",
    "warehouse_id": 2236,
    "notes": "THIS IS A TEST PICKING NOTE",
    "start_date": "2026-09-23T13:27:17",
    "end_date": "2026-09-23T13:28:11",
    "creator": {
      "id": 4625,
      "username": "simon_user1",
      "first_name": "Lilyan",
      "last_name": "Rogahn"
    },
    "items": [
      {
        "id": 290052,
        "sales_order_id": 26167904,
        "fulfillment_order_id": 14262841,
        "product_id": 9169276,
        "requested_quantity": 12,
        "picked_quantity": 12,
        "batches": [
          {
            "id": 60590,
            "quantity": 12,
            "batch_id": null,
            "origin_location_id": 986900
          }
        ],
        "product": {
          "id": 9169276,
          "sku": "NP0001",
          "name": "T-Shirt 1",
          "management_type": "none"
        }
      },
      {
        "id": 290055,
        "sales_order_id": 26167904,
        "fulfillment_order_id": 14262841,
        "product_id": 9169283,
        "requested_quantity": 4,
        "picked_quantity": 4,
        "batches": [
          {
            "id": 60589,
            "quantity": 1,
            "batch_id": 210504,
            "origin_location_id": 986915,
            "batch": {
              "id": 210504,
              "type": "serial",
              "number": "3453543"
            }
          },
          {
            "id": 60591,
            "quantity": 1,
            "batch_id": 210520,
            "origin_location_id": 986901,
            "batch": {
              "id": 210520,
              "type": "serial",
              "number": "345345654"
            }
          }
        ],
        "product": {
          "id": 9169283,
          "sku": "SP0002",
          "name": "Television 2",
          "management_type": "serial"
        }
      }
    ]
  },
  "id": "db1c40e5-19b5-4bb6-9f4b-80086d38098c",
  "status": "triggered",
  "type": "picking_order_finished",
  "params": {
    "skip_packing_enabled": false,
    "shipping_process_enabled": true,
    "shipping_location_id": null
  },
  "retry": false,
  "inserted_at": "2026-09-23T13:28:11",
  "updated_at": "2026-09-23T13:28:11",
  "warehouse_id": 2236,
  "merchant_id": 1053,
  "merchant_channel_id": 1068,
  "webhook_id": null,
  "merchant_channel_name": "default",
  "merchant_name": "default",
  "warehouse_name": "simon_warehouse_1",
  "pre_event_data": null
}
```

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

Fired when the packing task is created, right after picking finishes. Each item already
carries the picked `batches` to pack; `packed_quantity` is `null` until packing starts.

Sample payload:

```json
{
  "data": {
    "id": 46093,
    "type": "normal",
    "state": "queue",
    "sequence_number": "PA-0000054",
    "warehouse_id": 2236,
    "fulfillment_order_id": 14262841,
    "sales_order_id": 26167904,
    "origin_location_id": 1065394,
    "destination_location_id": null,
    "start_date": null,
    "end_date": null,
    "inserted_at": "2026-09-23T13:28:10",
    "updated_at": "2026-09-23T13:28:10",
    "sales_order": {
      "order_num": "ORDER_587493",
      "third_party": {
        "id": 3733698,
        "name": "customer 1"
      }
    },
    "fulfillment_order": {
      "sequence_number": "FO-0000071",
      "order_num": "ORDER_587493"
    },
    "items": [
      {
        "id": 66631,
        "product_id": 9169276,
        "requested_quantity": 12,
        "packed_quantity": null,
        "batches": [
          {
            "id": 58999,
            "quantity": 12,
            "batch_id": null,
            "cart_box_id": null
          }
        ],
        "product": {
          "id": 9169276,
          "sku": "NP0001",
          "name": "T-Shirt 1",
          "management_type": "none"
        }
      },
      {
        "id": 66634,
        "product_id": 9169283,
        "requested_quantity": 4,
        "packed_quantity": null,
        "batches": [
          {
            "id": 59002,
            "quantity": 1,
            "batch_id": 210504,
            "cart_box_id": null,
            "batch": {
              "id": 210504,
              "type": "serial",
              "number": "3453543"
            }
          },
          {
            "id": 59003,
            "quantity": 1,
            "batch_id": 210518,
            "cart_box_id": null,
            "batch": {
              "id": 210518,
              "type": "serial",
              "number": "5646234"
            }
          }
        ],
        "product": {
          "id": 9169283,
          "sku": "SP0002",
          "name": "Television 2",
          "management_type": "serial"
        }
      }
    ]
  },
  "id": "5196ec1f-275f-43bc-91cf-b1ef8e058235",
  "status": "triggered",
  "type": "packing_order_created",
  "retry": false,
  "inserted_at": "2026-09-23T13:28:11",
  "updated_at": "2026-09-23T13:28:11",
  "warehouse_id": 2236,
  "merchant_id": 1053,
  "merchant_channel_id": 1068,
  "webhook_id": null,
  "merchant_channel_name": "default",
  "merchant_name": "default",
  "warehouse_name": "simon_warehouse_1",
  "pre_event_data": null
}
```

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

Fired once packing is done — `state: "ended"` and `packed_quantity` matches
`requested_quantity` on every item. `packing_boxes` lists the closed boxes, each with its
`shipment_tracking` status and, once a label was generated, an `attachments` entry for
the label file.

Sample payload:

```json
{
  "data": {
    "id": 46093,
    "type": "normal",
    "state": "ended",
    "sequence_number": "PA-0000054",
    "warehouse_id": 2236,
    "fulfillment_order_id": 14262841,
    "sales_order_id": 26167904,
    "origin_location_id": 1065394,
    "start_date": "2026-09-23T13:36:19",
    "end_date": null,
    "inserted_at": "2026-09-23T13:28:10",
    "updated_at": "2026-09-23T13:39:19",
    "sales_order": {
      "order_num": "ORDER_587493",
      "third_party": {
        "id": 3733698,
        "name": "customer 1"
      }
    },
    "fulfillment_order": {
      "sequence_number": "FO-0000071",
      "order_num": "ORDER_587493"
    },
    "items": [
      {
        "id": 66631,
        "product_id": 9169276,
        "requested_quantity": 12,
        "packed_quantity": 12,
        "batches": [
          {
            "id": 58999,
            "quantity": 12,
            "batch_id": null,
            "cart_box_id": null
          }
        ],
        "product": {
          "id": 9169276,
          "sku": "NP0001",
          "name": "T-Shirt 1",
          "management_type": "none"
        }
      },
      {
        "id": 66634,
        "product_id": 9169283,
        "requested_quantity": 4,
        "packed_quantity": 4,
        "batches": [
          {
            "id": 59002,
            "quantity": 1,
            "batch_id": 210504,
            "cart_box_id": null,
            "batch": {
              "id": 210504,
              "type": "serial",
              "number": "3453543"
            }
          },
          {
            "id": 59003,
            "quantity": 1,
            "batch_id": 210518,
            "cart_box_id": null,
            "batch": {
              "id": 210518,
              "type": "serial",
              "number": "5646234"
            }
          }
        ],
        "product": {
          "id": 9169283,
          "sku": "SP0002",
          "name": "Television 2",
          "management_type": "serial"
        }
      }
    ],
    "packing_boxes": [
      {
        "id": 72384,
        "name": "BOX S",
        "state": "packed",
        "box_number": 1,
        "length": 20,
        "width": 15,
        "height": 10,
        "weight": 336.2,
        "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"
          }
        ],
        "shipment_tracking": {
          "id": 63898,
          "status": "pulpowms_label_generated",
          "tracking_code": "PA-0000054-72384"
        }
      }
    ]
  },
  "id": "23f5ddab-8189-491a-b814-71190b0272d7",
  "status": "triggered",
  "type": "packing_order_finished",
  "retry": false,
  "inserted_at": "2026-09-23T13:39:19",
  "updated_at": "2026-09-23T13:39:19",
  "warehouse_id": 2236,
  "merchant_id": 1053,
  "merchant_channel_id": 1068,
  "webhook_id": null,
  "merchant_channel_name": "default",
  "merchant_name": "default",
  "warehouse_name": "simon_warehouse_1",
  "pre_event_data": null
}
```

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

`packing_order_finished` and `packing_order_closed` mark different moments — `finished`
fires while the warehouse user is still in the packing app (labels can still be attached
for them to print); `closed` fires once the order has actually left that workflow and no
one is on it anymore. `destination_location_id` and `params.shipping_location_id` are
only populated here, once the box's next location is known.

Sample payload:

```json
{
  "data": {
    "id": 46093,
    "type": "normal",
    "state": "closed",
    "sequence_number": "PA-0000054",
    "warehouse_id": 2236,
    "fulfillment_order_id": 14262841,
    "sales_order_id": 26167904,
    "origin_location_id": 1065394,
    "destination_location_id": 987074,
    "start_date": "2026-09-23T13:36:19",
    "end_date": "2026-09-23T13:41:04",
    "inserted_at": "2026-09-23T13:28:10",
    "updated_at": "2026-09-23T13:41:04",
    "sales_order": {
      "order_num": "ORDER_587493",
      "third_party": {
        "id": 3733698,
        "name": "customer 1"
      }
    },
    "fulfillment_order": {
      "sequence_number": "FO-0000071",
      "order_num": "ORDER_587493"
    },
    "items": [
      {
        "id": 66631,
        "product_id": 9169276,
        "requested_quantity": 12,
        "packed_quantity": 12,
        "product": {
          "id": 9169276,
          "sku": "NP0001",
          "name": "T-Shirt 1",
          "management_type": "none"
        }
      }
    ],
    "packing_boxes": [
      {
        "id": 72384,
        "name": "BOX S",
        "state": "packed",
        "box_number": 1,
        "shipment_tracking": {
          "id": 63898,
          "status": "pulpowms_label_generated",
          "tracking_code": "PA-0000054-72384"
        }
      }
    ]
  },
  "id": "c6917133-8f5c-4eea-932f-c1e25115dda1",
  "status": "triggered",
  "type": "packing_order_closed",
  "params": {
    "skip_packing_enabled": false,
    "shipping_process_enabled": true,
    "shipping_location_id": 987074
  },
  "retry": false,
  "inserted_at": "2026-09-23T13:41:04",
  "updated_at": "2026-09-23T13:41:04",
  "warehouse_id": 2236,
  "merchant_id": 1053,
  "merchant_channel_id": 1068,
  "webhook_id": null,
  "merchant_channel_name": "default",
  "merchant_name": "default",
  "warehouse_name": "simon_warehouse_1",
  "pre_event_data": null
}
```

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

Equivalent to **Post Goods Issue (PGI)** — `state: "ended"` and `fulfilled_quantity`
matches `quantity` on every item. For lot/serial-managed items, `shipped_batches` lists
exactly which batch/lot/serial units went out. `return_labels` may already carry a code
if a return was pre-generated for this shipment.

Sample payload:

```json
{
  "data": {
    "id": 26167904,
    "order_num": "ORDER_587493",
    "state": "ended",
    "delivery_date": "2026-09-30T21:59:59",
    "notes": "This is a new order note",
    "warehouse_id": 2236,
    "merchant_id": 1053,
    "merchant_channel_id": 1068,
    "third_party_id": 3733698,
    "shipping_method_id": 2832,
    "fulfillment_orders": [
      {
        "id": 14262841,
        "state": "ended"
      }
    ],
    "return_labels": [
      {
        "id": 29896,
        "return_code": "PA-0000054-72384"
      }
    ],
    "state_transitions": [
      {
        "id": 616037,
        "previous_state": "queue",
        "new_state": "picking",
        "updated_at": "2026-09-17T13:31:45",
        "performer_name": "simon_user1"
      },
      {
        "id": 621559,
        "previous_state": "picking",
        "new_state": "packing",
        "updated_at": "2026-09-23T13:28:10",
        "performer_name": "simon_user1"
      },
      {
        "id": 621564,
        "previous_state": "packing",
        "new_state": "shipping",
        "updated_at": "2026-09-23T13:41:03",
        "performer_name": "simon_user1"
      },
      {
        "id": 621565,
        "previous_state": "shipping",
        "new_state": "ended",
        "updated_at": "2026-09-23T13:42:58",
        "performer_name": "simon_user1"
      }
    ],
    "items": [
      {
        "id": 9871263,
        "product_id": 9169276,
        "quantity": 12,
        "fulfilled_quantity": 12,
        "shipped_batches": [],
        "product": {
          "id": 9169276,
          "sku": "NP0001",
          "name": "T-Shirt 1",
          "management_type": "none"
        }
      },
      {
        "id": 9871265,
        "product_id": 9169283,
        "quantity": 4,
        "fulfilled_quantity": 4,
        "shipped_batches": [
          {
            "quantity": 1,
            "batch_id": 210504,
            "batch_number": "3453543",
            "batch_type": "serial"
          },
          {
            "quantity": 1,
            "batch_id": 210518,
            "batch_number": "5646234",
            "batch_type": "serial"
          }
        ],
        "product": {
          "id": 9169283,
          "sku": "SP0002",
          "name": "Television 2",
          "management_type": "serial"
        }
      }
    ]
  },
  "id": "5653dfbd-c97f-4d7d-9203-232b022beba6",
  "status": "triggered",
  "type": "sales_order_finished",
  "retry": false,
  "inserted_at": "2026-09-23T13:42:58",
  "updated_at": "2026-09-23T13:42:58",
  "warehouse_id": 2236,
  "merchant_id": 1053,
  "merchant_channel_id": 1068,
  "webhook_id": null,
  "merchant_channel_name": "default",
  "merchant_name": "default",
  "warehouse_name": "simon_warehouse_1",
  "pre_event_data": null
}
```

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

Fires at the **fulfillment order** level, alongside `sales_order_finished` — a sales
order can have more than one fulfillment order (partial fulfillment, multi-warehouse),
so watch this one if you need per-FO completion rather than whole-order. Each item links
back to the sales order's line via `sales_item_id`; oddly, `fulfilled_quantity` stays
`null` here even though `state` is `"ended"` — use `sales_order_finished`'s items if you
need the actually-fulfilled quantities.

Sample payload:

```json
{
  "data": {
    "id": 14262841,
    "sequence_number": "FO-0000071",
    "order_num": "ORDER_587493",
    "state": "ended",
    "sales_order_id": 26167904,
    "warehouse_id": 2236,
    "merchant_id": 1053,
    "merchant_channel_id": 1068,
    "third_party_id": 3733698,
    "shipping_method_id": 2832,
    "packing_location_id": 1065394,
    "delivery_date": "2026-09-30T21:59:59",
    "notes": "This is a new order note",
    "inserted_at": "2026-09-17T13:24:34",
    "updated_at": "2026-09-23T13:42:58",
    "return_labels": [
      {
        "id": 29896,
        "return_code": "PA-0000054-72384"
      }
    ],
    "items": [
      {
        "id": 9887789,
        "sales_item_id": 9871263,
        "product_id": 9169276,
        "quantity": 12,
        "fulfilled_quantity": null,
        "product": {
          "id": 9169276,
          "sku": "NP0001",
          "name": "T-Shirt 1",
          "management_type": "none"
        }
      }
    ]
  },
  "id": "a9890438-894c-48a8-bf89-66f45746a5d7",
  "status": "triggered",
  "type": "fulfillment_order_finished",
  "params": {
    "shipping_process_enabled": true,
    "shipping_location_id": 987074
  },
  "retry": false,
  "inserted_at": "2026-09-23T13:42:58",
  "updated_at": "2026-09-23T13:42:58",
  "warehouse_id": 2236,
  "merchant_id": 1053,
  "merchant_channel_id": 1068,
  "webhook_id": null,
  "merchant_channel_name": "default",
  "merchant_name": "default",
  "warehouse_name": "simon_warehouse_1",
  "pre_event_data": null
}
```

> **TIP: Generating shipping labels?**
>
> If an external system produces your shipping labels, follow the dedicated
> [Shipping Label Provider](/label-provider/overview) track — it covers the packing
> webhooks, the shipment-tracking state machine and the attach endpoint end to end.

---

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