type: object
description: |
    Bigscreen's first-party order — mirrors a Shopify order and is enriched with
    fabricator state (line items, shipping summary, checklist result, IPD,
    state-machine position). Mirrors `FabricatorSchemas.BigOrder`.

    Created by `POST /admin/shop/order` once a Shopify order is fulfillable, then
    advanced through actions on `PUT /admin/shop/order/{bigOrderId}`. Most fields
    on this object are populated by the checklist pipeline rather than the caller.
required: [id, ownerBigscreenAccountId, creatorBigscreenAccountId, shopifyOrderId, shopifyCustomerId, state]
properties:
    id: { type: string, description: BigOrder id (UUID). }
    createdAt: { type: string, format: date-time }
    ownerBigscreenAccountId:
        type: string
        description: Customer (the buyer's Bigscreen account).
    creatorBigscreenAccountId:
        type: string
        description: Account that triggered creation (often the same as owner for self-checkout).
    shopifyOrderId:
        type: string
        description: Numeric Shopify order id.
    shopifyCustomerId:
        type: string
        description: Numeric Shopify customer id.
    shopifyOrderName:
        type: string
        description: "Shopify's human-readable order name (e.g. `#1234`)."
    shopifyOrderSnapshot:
        type: object
        additionalProperties: true
        description: Snapshot of the Shopify order payload at last sync. Shape per Shopify Admin API.
    shopifyOrderStatus:
        type: string
        description: Cached `ShopifyOrder.financial_status` / `fulfillment_status` summary.
    lineItems:
        type: array
        deprecated: true
        items: { $ref: "./BigLineItem.yaml" }
        description: Deprecated — use `currentLineItems`.
    lineItemsV1:
        type: array
        deprecated: true
        items: { $ref: "./BigLineItem.yaml" }
        description: Backup of the deprecated V1 line items.
    lineItemsV2:
        type: array
        deprecated: true
        items: { $ref: "./BigLineItem.yaml" }
    currentLineItems:
        type: array
        items: { $ref: "./BigLineItem.yaml" }
        description: The current (unfulfilled) line items on the order.
    lineItemSummary:
        type: object
        additionalProperties: true
        description: Snapshot of the line-item layout at the last checklist run, including fulfilled and refunded items.
    origin:
        type: string
        description: "Origin of the order — `FabricatorSchemas.BigOrderOrigin` (e.g. `Customer`, `TestData`, `Unknown`)."
    state:
        type: string
        description: "State-machine position — `FabricatorSchemas.BigOrderState`. Immutable except via `applyAction`."
    nextAction:
        type: string
        description: |
            Next action the checklist computed. Values in `FabricatorSchemas.BigOrderAction`
            (e.g. `SendScanRequest`, `AdminOverrideIPD`, `CreateJob`, `CreateShipment`,
            `ShipIt`, `Complete`, `Unknown`).
    priority:
        type: integer
        description: "Operator-set priority (clamped server-side to `[-1, 100]`)."
    purpose:
        type: string
        description: Free-text purpose tag used in test orders.
    name:
        type: string
        description: Operator-supplied label.
    level:
        type: string
        example: ShopifyOrder
    version:
        type: string
        example: V3
    checklistResult:
        type: object
        additionalProperties: true
        description: Last checklist result stored on the order.
    ipd:
        type: integer
        description: Final IPD (-1 if unset).
    ipdSource:
        type: string
        description: "`FabricatorSchemas.BigOrderIpdSource` — where the IPD value came from (`Customer`, `Admin`, `Preprocessor`, `Unknown`)."
    history:
        type: array
        items: { type: object, additionalProperties: true }
        description: Append-only audit trail.
    tags:
        type: array
        items: { type: string }
    shipmentHold:
        description: "If set, blocks shipment creation. `FabricatorSchemas.BigOrderShipmentHold`."
    shippingServiceLevel:
        type: string
        description: Selected service level (e.g. `Standard`, `Express`).
example:
    id: "01HXJ4S3M0Q3TRBQ3JV9P5W2VC"
    createdAt: "2026-04-08T17:42:11.000Z"
    ownerBigscreenAccountId: "acct_01HXJ4Q12345"
    creatorBigscreenAccountId: "acct_01HXJ4Q12345"
    shopifyOrderId: "6107853586649"
    shopifyCustomerId: "7421003628825"
    shopifyOrderName: "#10042"
    shopifyOrderStatus: "paid"
    origin: "Customer"
    state: "AwaitingScanRequest"
    nextAction: "SendScanRequest"
    priority: 0
    purpose: ""
    name: ""
    level: "ShopifyOrder"
    version: "V3"
    ipd: -1
    ipdSource: "Unknown"
    tags: []
    history: []
    shippingServiceLevel: "Standard"
    currentLineItems: []
