type: object
description: |
    A shipment — the unit that moves through the picking / packing / labeling /
    dispatch state machine. Mirrors `FabricatorSchemas.BigShipment`. Driven by
    `PUT /admin/shipper/shipment/{id}` actions; one shipment per shipment group
    on a `BigOrder`.
required: [id, bigOrderId, shopifyOrderId, status]
properties:
    id:
        type: string
        description: 10-digit shipment id (custom format generated server-side).
    createdAt: { type: string, format: date-time }
    creatorBigscreenAccountId:
        type: string
        description: Account that created the shipment.
    bigOrderId: { type: string }
    shopifyOrderId: { type: string }
    shopifyShippingMetaData:
        type: object
        additionalProperties: true
        description: Snapshot of Shopify shipping address and related metadata.
    status:
        type: string
        description: |
            State-machine position. Values in `FabricatorSchemas.BigShipmentStatus`
            (`Init`, `Picking`, `ReadyToPack`, `Packing`, `WaitingForPickup`,
            `Shipped`, `Cancelled`).
    name:
        type: string
        description: Operator-supplied label.
    priority:
        type: integer
        description: Display priority (lower-than-zero values represent unset).
    inventoryItemIds:
        type: array
        items: { type: string }
        description: Inventory items currently attached to this shipment.
    history:
        type: array
        items:
            type: object
            additionalProperties: true
        description: Append-only history; one entry per state transition or significant action.
    currentShippingLabel:
        type: object
        additionalProperties: true
        description: |
            Most recent label payload (Shippo transaction): tracking number, label URL,
            carrier, service, rate. Empty until `GenerateShippingLabel` runs.
    inventorySlots:
        type: array
        items:
            type: object
            additionalProperties: true
        description: Inventory slot manifest — one entry per item the shipment expects.
    shipmentGroupId:
        type: string
        description: Groups this shipment with sibling shipments for the same Big Order.
example:
    id: "5193045862"
    createdAt: "2026-04-12T22:18:04.000Z"
    creatorBigscreenAccountId: "acct_01HXJ4Q12345"
    bigOrderId: "01HXJ4S3M0Q3TRBQ3JV9P5W2VC"
    shopifyOrderId: "6107853586649"
    status: "Picking"
    priority: 0
    inventoryItemIds: []
    history:
        - status: "Init"
          message: "Shipment initialized"
          createdAt: 1747088284000
    inventorySlots: []
    shipmentGroupId: "default"
