> ## Documentation Index
> Fetch the complete documentation index at: https://docs.publica.la/llms.txt
> Use this file to discover all available pages before exploring further.

# shipping_note.status_changed

Announces that a shipping note was created or that its status changed. A shipping note is one shipment of physical products that your store sends to the buyer or hands over at a pickup point. The payload below goes in the `data` field of the [envelope](./overview.md#envelope), and follows the [payload conventions](./overview.md#payload-conventions).

## When it is sent

When Publica.la creates a shipping note, with `previous_status` `null` and `shipping_note.status` `order-generated`:

- A purchase that ships, when its shipping payment is approved.
- Each renewal of a subscription that ships, when the shipping payment of the renewal is approved.
- Each month of an annual plan that ships: the first note when the shipping payment of the year is approved, then one note per month of the paid year, up to 12, while the order is approved.
- A note that Publica.la support creates for an order whose approved shipping payment has no note.

Then each time the status of the note changes, whatever the new status. Your store's staff change it on the **Shipments** page of the dashboard. `previous_status` is the status before the change.

Saving the status a note already has sends nothing.

The idempotency key is `shipping_note.status_changed:shipping_note:<shipping note id>:status:<new status>:at:<Unix timestamp of the change, in seconds>`, for example `shipping_note.status_changed:shipping_note:6001:status:in-transit:at:1768573800`. Each creation and each change has its own key, also when a note goes back to a status it had before, unless it goes back within the same second it left it: then the key repeats.

The deliveries of one note are not guaranteed to arrive in the [order](./overview.md#delivery) of its changes. Use `shipping_note.updated_at` to ignore a delivery older than one you already processed.

### Tell a creation from a change

| Delivery                     | `previous_status`                       |
| ---------------------------- | --------------------------------------- |
| The note was created         | `null`                                  |
| The status of a note changed | The status before the change, a string. |

### Statuses

| `shipping_note.status` | Label in the dashboard | `delivery` | `warehouse` |
| ---------------------- | ---------------------- | ---------- | ----------- |
| `order-generated`      | Order Generated        | Yes        | Yes         |
| `in-transit`           | In Transit             | Yes        | No          |
| `pickup`               | In Pickup Point        | No         | Yes         |
| `delivered`            | Delivered              | Yes        | No          |
| `completed`            | Completed              | Yes        | Yes         |
| `cancelled`            | Cancelled              | Yes        | Yes         |
| `pending`              | Pending                | No         | No          |

Every note starts at `order-generated`. The `delivery` and `warehouse` columns show the statuses the **Shipments** page offers for each [`type`](#delivery-and-pickup). The page offers no `pending`. The order of the statuses is not enforced: a note can move from any status to any other.

### Relation to `charge.paid`

The shipping payment a note belongs to is `shipping_note.payment_id`. It is the payment with `sale_type` `shipping` in the [`charge.paid`](./charge-paid.md) of the charge that paid it. The creation of the note and the `charge.paid` are independent deliveries and can arrive in any order. The notes of months 2 to 12 of an annual plan come from no new charge, so no `charge.paid` is sent with them. A status change comes from no charge.

## Payload

The payload of the creation of a note:

```json
{
  "shipping_note": {
    "id": "6001",
    "uuid": "5f0c9a52-1d7e-4b8a-9c3e-0a6b2d4f8e11",
    "status": "order-generated",
    "type": "delivery",
    "shipment_number": 1,
    "period_length": 1,
    "recurring_cycle": null,
    "payment_id": "4003",
    "amount_in_cents": 500,
    "currency_id": "USD",
    "carrier": {
      "id": "701",
      "title": "Home delivery",
      "description": "3 to 5 business days"
    },
    "recipient": {
      "name": "Jane Buyer",
      "national_id": "20123456789",
      "phone": "+54 11 5555 0100",
      "address_line_1": "Av. Example 123",
      "address_line_2": null,
      "city": "Buenos Aires",
      "state": "C",
      "country": "AR",
      "postal_code": "C1001",
      "other_information": null,
      "extra_1": null,
      "extra_2": null
    },
    "created_at": "2026-01-15T14:30:10Z",
    "updated_at": "2026-01-15T14:30:10Z"
  },
  "previous_status": null,
  "order": {
    "id": "1001",
    "uuid": "9b2f6c1e-4a7d-4e8b-9f3a-2c5d8e1f0a42",
    "external_id": "ORD-1001",
    "created_at": "2026-01-15T14:30:00Z"
  },
  "user": {
    "id": "501",
    "uuid": "3e7a1d2c-8b4f-4c6e-a9d1-7f2b5c8e0d13",
    "external_id": "USR-501",
    "email": "buyer@example.com",
    "name": "Jane Buyer"
  },
  "products": [
    {
      "id": "2001",
      "type": "content",
      "quantity": 1,
      "amount_in_cents": 1349,
      "currency_id": "USD",
      "content": {
        "id": "301",
        "external_id": "9780000000001",
        "name": "An Example Book",
        "file_type": "physical"
      },
      "plan": null,
      "coupon": {
        "code": "WELCOME10",
        "discount_percentage": 10,
        "shipping_discount_percentage": null,
        "take_quantity": null,
        "pay_quantity": null
      }
    },
    {
      "id": "2002",
      "type": "content",
      "quantity": 2,
      "amount_in_cents": 899,
      "currency_id": "USD",
      "content": {
        "id": "302",
        "external_id": "9780000000002",
        "name": "Another Example Book",
        "file_type": "physical"
      },
      "plan": null,
      "coupon": {
        "code": "WELCOME10",
        "discount_percentage": 10,
        "shipping_discount_percentage": null,
        "take_quantity": null,
        "pay_quantity": null
      }
    }
  ]
}
```

A status change has the same shape. The example payload that [Send test](./overview.md#test-deliveries) sends for this event is a status change from `order-generated` to `in-transit`, so `shipping_note.status` is `in-transit` and `previous_status` is `order-generated`. An endpoint that also receives `order.paid` or `charge.paid` gets the sample of that event instead: see [Test deliveries](./overview.md#test-deliveries).

## `data.previous_status`

| Field             | Type           | Description                                                                            |
| ----------------- | -------------- | -------------------------------------------------------------------------------------- |
| `previous_status` | string or null | Status of the note before the change. `null` when the delivery announces its creation. |

## `data.shipping_note`

| Field             | Type            | Description                                                                                                                                                                                                   |
| ----------------- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `id`              | string          | Shipping note id.                                                                                                                                                                                             |
| `uuid`            | string          | Shipping note UUID.                                                                                                                                                                                           |
| `status`          | string          | Status of the note after the change. `order-generated` on its creation. See [Statuses](#statuses).                                                                                                            |
| `type`            | string          | `delivery` or `warehouse`. See [Delivery and pickup](#delivery-and-pickup).                                                                                                                                   |
| `shipment_number` | integer         | Number of this shipment among the notes of `payment_id`, starting at 1. On an annual plan, the number of the shipment within the paid year, from 1 to 12. Otherwise `1`.                                      |
| `period_length`   | integer         | Shipments that `payment_id` pays for: `12` on an annual plan, `1` otherwise.                                                                                                                                  |
| `recurring_cycle` | integer or null | Billing cycle of the subscription that `payment_id` belongs to, starting at 1. `null` for a one-time order, and when the cycle of the shipping payment is not known. The 12 notes of an annual plan share it. |
| `payment_id`      | string          | Id of the approved shipping payment the note belongs to.                                                                                                                                                      |
| `amount_in_cents` | integer         | Shipping amount of this shipment, tax included.                                                                                                                                                               |
| `currency_id`     | string          | ISO 4217 currency code of `amount_in_cents`.                                                                                                                                                                  |
| `carrier`         | object          | The shipping method the buyer chose.                                                                                                                                                                          |
| `recipient`       | object          | The person who receives the shipment, and where.                                                                                                                                                              |
| `created_at`      | string          | ISO 8601 UTC time the note was created.                                                                                                                                                                       |
| `updated_at`      | string          | ISO 8601 UTC time of the last change of the note. Compare it with the value of the last delivery you processed to ignore an older one that arrives late.                                                      |

`carrier` and `recipient` are the note's snapshot of the order's shipping details, taken when the note is created. A buyer can change the shipping address of an order between shipments, so a later note of the same order carries the address in force when that note was created.

`carrier`:

| Field         | Type           | Description                                                                                         |
| ------------- | -------------- | --------------------------------------------------------------------------------------------------- |
| `id`          | string         | Carrier id.                                                                                         |
| `title`       | string or null | Name of the carrier or pickup point.                                                                |
| `description` | string or null | Description of the carrier, such as a delivery time or a pickup point's address. `null` when empty. |

`recipient` has these fields, each a string or `null`. An empty value is sent as `null`.

| Field               | Description                                                                            |
| ------------------- | -------------------------------------------------------------------------------------- |
| `name`              | Name of the person who receives the shipment.                                          |
| `national_id`       | National id number.                                                                    |
| `phone`             | Phone number.                                                                          |
| `address_line_1`    | First line of the address.                                                             |
| `address_line_2`    | Second line of the address.                                                            |
| `city`              | City.                                                                                  |
| `state`             | State or province, usually a subdivision code without the country prefix, such as `C`. |
| `country`           | ISO 3166-1 alpha-2 country code.                                                       |
| `postal_code`       | Postal code.                                                                           |
| `other_information` | Additional information the buyer entered.                                              |
| `extra_1`           | First extra field of your store's shipping settings.                                   |
| `extra_2`           | Second extra field of your store's shipping settings.                                  |

When the buyer gave no shipping details, every field of `recipient` is `null`, `name` included.

For a pickup note (`type` `warehouse`), the address fields of `recipient` are always `null`: `address_line_1`, `address_line_2`, `city`, `state`, `country`, `postal_code`, `other_information`, `extra_1` and `extra_2`. `name`, `national_id` and `phone` are still sent.

## Delivery and pickup

| `type`      | Meaning                   | `recipient`                                                                                                |
| ----------- | ------------------------- | ---------------------------------------------------------------------------------------------------------- |
| `delivery`  | Delivery to an address.   | Name, contact details and the address to deliver to.                                                       |
| `warehouse` | Pickup at a pickup point. | `name`, `national_id` and `phone`. The address fields are always `null`. `carrier` names the pickup point. |

## `data.order`, `data.user` and `data.products`

`order` and `user` go as references, with the identity of the order the note belongs to and of its buyer only, because the event is about the note: `order` has `id`, `uuid`, `external_id` and `created_at`, and `user` has `id`, `uuid`, `external_id`, `email` and `name`. Each key means the same as in [`order.paid`](./order-paid.md#dataorder).

`products` has the same fields as in [`order.paid`](./order-paid.md#dataproducts), and lists only the lines the note ships, sorted by `id`. The digital lines of the order are not in it; [`order.paid`](./order-paid.md) sends every line.

- A line of physical content has `content.file_type` `physical`.
- A line of a physical subscription (`type` `subscription`) has `content: null` and its `plan`. The content of each shipment of a subscription is not in the payload.
- `quantity` is the number of units on the line, and `amount_in_cents` the unit amount.

There is no `payments` section. The shipping payment is `shipping_note.payment_id`.

## Related Documentation

- [Webhooks](./overview.md): Endpoints, request format, signature verification and delivery.
- [`order.paid`](./order-paid.md): The fields of `order`, `user` and `products`.
- [`charge.paid`](./charge-paid.md): The event sent for every approved charge, shipping payments included.
