---
title: "Erp sales order shipment created"
method: POST
path: "erp-sales-order-shipment.created"
---

# Erp sales order shipment created

`POST erp-sales-order-shipment.created` (webhook)

When a Sales Order Shipment is created.

## Payload

- union
  - ErpSalesOrderShipmentsCreatedFullWebhook
    - `connection_id` string, required
    - `data` ErpSalesOrderShipmentApiItemSchema, required
      - `id` string, required: The unique ID of the shipment transaction in the ERP.
      - `sales_order_id` string, required: ID of the parent sales order this shipment fulfills.
      - `created_date` string, date-time, required: The date the sales order shipment was created.
      - `updated_date` string, date-time, required: The date the sales order shipment was last updated.
      - `shipment_number` string, nullable, required: The user-facing identifier of the shipment as assigned by the ERP.
      - `shipped_date` string, date-time, required: Date the shipment was sent.
      - `location_id` string, nullable, required: ID of the location the shipment was sent from.
      - `notes` string[], required: List of free-form notes recorded on the shipment.
      - `packages` ErpSalesOrderShipmentPackage[], required: Per-parcel breakdown of the shipment. Mirrors the WMS shipment.packages shape — one entry per package shipped, carrying its own tracking number and measurements.
        - `package_id` string, required: The ID of the package within the shipment.
        - `tracking_number` string, nullable, required: The carrier tracking number for the package.
        - `measurements` PackageMeasurements, required
          - `length` number, nullable, required
          - `width` number, nullable, required
          - `height` number, nullable, required
          - `unit` 'cm' | 'in', nullable, required: The unit of measurement for the size of the package.
          - `weight` number, nullable, required
          - `weight_unit` 'kg' | 'oz' | 'lb', nullable, required: The unit of measurement for the weight of the package.
      - `line_items` ErpSalesOrderShipmentLineItem[], required: Items included in this shipment. Splits into one entry per (item, lot, bin) triple — a 100-unit ship of one item drawn from two lots (60 + 40) across two bins emits one entry per (lot, bin).
        - `shipment_line_item_id` string, required: ID of the line within the shipment record.
        - `line_item_id` string, nullable, required: ID of the source sales-order line that this shipment line fulfills. Joins back to the parent sales order's `line_items[*].line_item_id`. Null when the ERP doesn't expose the link.
        - `item_id` string, required: ID of the inventory item shipped.
        - `sku` string, required: SKU / item number of the item shipped.
        - `quantity` number, required: Quantity shipped on this line.
        - `is_kit` boolean, required: Whether this line is a kit. A kit ships as a unit, so its components are not listed as separate lines here; they are nested under `kit_components`.
        - `kit_components` ErpSalesOrderShipmentKitComponent[], required: The items that shipped inside this kit line, and the lots or bins each was drawn from. Empty unless the line is a kit.
          - `line_item_id` string, nullable, required: Line-unique ID of the component on the source sales order.
          - `item_id` string, required: ID of the component item shipped.
          - `sku` string, required: SKU / item number of the component item.
          - `quantity` number, required: Quantity of this component shipped.
          - `lots` ErpSalesOrderShipmentKitComponentLot[], required: The lots and bins this component was drawn from. Empty for components that are not lot or bin tracked.
            - `lot_id` string, nullable, required: ID of the lot this component was drawn from.
            - `lot_name` string, nullable, required: Human-readable lot name.
            - `bin_id` string, nullable, required: ID of the bin this component was drawn from.
            - `bin_name` string, nullable, required: Human-readable bin name.
            - `quantity` number, required: Quantity drawn from this lot or bin.
        - `lot_id` string, nullable, required: ID of the lot this line was drawn from. Null for non-lot-tracked items.
        - `lot_name` string, nullable, required: Human-readable name of the lot this line was drawn from.
        - `expiration_date` string, date-time, nullable, required: Expiration date of the lot this line was drawn from.
        - `bin_id` string, nullable, required: ID of the bin this line was drawn from. Null for non-bin-tracked items.
        - `bin_name` string, nullable, required: Human-readable name of the bin this line was drawn from.
      - `custom_fields` object, required: Per-account custom fields defined on the sales order shipment. Keys are the field names as defined in the ERP; each value carries the raw value, its declared type, and a human-readable label.
      - `external_system_url` string, nullable, required: URL link to the sales order shipment in the external system (WMS/Freight etc).
      - `trackstar_tags` unknown[], nullable, required: A list of custom tags associated with the resource. A tag can be either a string or a dictionary with one key-value pair.
        - unknown
      - `additional_fields` object, required: Integration-specific fields
      - `trackstar_created_date` string, date-time, required
      - `trackstar_updated_date` string, date-time, required
    - `event_type` 'erp-sales-order-shipment.created', required
    - `integration_name` string, required
    - `integration_type` string, required
  - ErpSalesOrderShipmentsCreatedTruncatedWebhook
    - `connection_id` string, required
    - `data` ErpSalesOrderShipmentsCreatedTruncatedData, required
      - `id` string: The record this event is about. Absent on connection webhooks, which carry dates rather than a row.
    - `event_type` 'erp-sales-order-shipment.created', required
    - `integration_name` string, required
    - `integration_type` string, required
    - `data_truncated` boolean, required: Always true on this shape. The event was too large to send in full, so `data` holds only the `id` and `previous_attributes` is empty.
    - `data_url` string, required: Called with your usual API key, it returns a download link for this event exactly as it would have been delivered.

## Acknowledgement `200`

Success

---

[API](https://skmtc.dev/trackstarhq/apis/trackstar-api.md) - [All operations](https://skmtc.dev/trackstarhq/apis/trackstar-api/llms.txt) - [OpenAPI document](https://skmtc.dev/trackstarhq/apis/trackstar-api/revisions/08647f790594?raw)
