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

# Fulfill Order

> Mark order as fulfilled.

Optionally provide tracking information.



## OpenAPI

````yaml /api-reference/openapi.json post /api/dashboard/orders/{order_id}/fulfill
openapi: 3.1.0
info:
  title: Agentic Commerce API
  description: |2-

        Agentic Commerce API - E-commerce Backend

        ## APIs

        ### Dashboard API (`/api/dashboard`)
        Authenticated endpoints for merchant management:
        - Products, Variants, Options
        - Inventory management
        - Orders and fulfillment
        - Customers
        - Collections

        ### Storefront API (`/api/storefront`)
        Public endpoints for client websites:
        - Product catalog
        - Collections
        - Cart management
        - Checkout

        ### Sync API (`/api/sync`)
        Integration endpoints for zunkiree-search:
        - Product sync
        - Availability checks
        - Order creation from AI widget
        
  version: 1.0.0
servers: []
security: []
paths:
  /api/dashboard/orders/{order_id}/fulfill:
    post:
      tags:
        - Dashboard
        - Orders
      summary: Fulfill Order
      description: |-
        Mark order as fulfilled.

        Optionally provide tracking information.
      operationId: fulfill_order_api_dashboard_orders__order_id__fulfill_post
      parameters:
        - name: order_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Order Id
        - name: authorization
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
        - name: X-API-Key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Api-Key
        - name: X-Stella-Merchant-Id
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Stella-Merchant-Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FulfillmentCreate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    FulfillmentCreate:
      properties:
        tracking_number:
          anyOf:
            - type: string
            - type: 'null'
          title: Tracking Number
        tracking_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Tracking Url
      type: object
      title: FulfillmentCreate
      description: Schema for fulfilling an order.
    OrderResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        merchant_id:
          type: string
          format: uuid
          title: Merchant Id
        order_number:
          type: string
          title: Order Number
        customer_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Customer Id
        email:
          anyOf:
            - type: string
            - type: 'null'
          title: Email
        phone:
          anyOf:
            - type: string
            - type: 'null'
          title: Phone
        line_items:
          items:
            $ref: '#/components/schemas/LineItemResponse'
          type: array
          title: Line Items
        subtotal:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Subtotal
        tax:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Tax
        shipping_cost:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Shipping Cost
        discount:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Discount
        total:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Total
        currency:
          type: string
          title: Currency
        status:
          type: string
          title: Status
        payment_status:
          type: string
          title: Payment Status
        fulfillment_status:
          type: string
          title: Fulfillment Status
        payment_method:
          anyOf:
            - type: string
            - type: 'null'
          title: Payment Method
        billing_address:
          anyOf:
            - $ref: '#/components/schemas/AddressSchema'
            - type: 'null'
        shipping_address:
          anyOf:
            - $ref: '#/components/schemas/AddressSchema'
            - type: 'null'
        shipping_method:
          anyOf:
            - type: string
            - type: 'null'
          title: Shipping Method
        tracking_number:
          anyOf:
            - type: string
            - type: 'null'
          title: Tracking Number
        tracking_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Tracking Url
        source:
          type: string
          title: Source
        note:
          anyOf:
            - type: string
            - type: 'null'
          title: Note
        staff_note:
          anyOf:
            - type: string
            - type: 'null'
          title: Staff Note
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        shipped_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Shipped At
        delivered_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Delivered At
        cancelled_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Cancelled At
      type: object
      required:
        - id
        - merchant_id
        - order_number
        - line_items
        - subtotal
        - tax
        - shipping_cost
        - discount
        - total
        - currency
        - status
        - payment_status
        - fulfillment_status
        - source
        - created_at
        - updated_at
      title: OrderResponse
      description: |-
        Schema for an order in responses.

        Most Optional fields are sourced from the ORM where SQLAlchemy
        auto-resolves null columns to None, so the missing-default footgun
        wouldn't actually fire today. Defaults are still set explicitly
        here for symmetry with `LineItemResponse` and to guard against
        future callers that might validate from dicts.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    LineItemResponse:
      properties:
        variant_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Variant Id
        product_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Product Id
        name:
          type: string
          title: Name
        sku:
          anyOf:
            - type: string
            - type: 'null'
          title: Sku
        option1:
          anyOf:
            - type: string
            - type: 'null'
          title: Option1
        option2:
          anyOf:
            - type: string
            - type: 'null'
          title: Option2
        option3:
          anyOf:
            - type: string
            - type: 'null'
          title: Option3
        variant_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Variant Name
        quantity:
          type: integer
          title: Quantity
        price:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Price
        total:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Total
        image_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Image Url
      type: object
      required:
        - name
        - quantity
        - price
        - total
      title: LineItemResponse
      description: |-
        Schema for an order line item.

        Sourced from `Order.line_items` JSONB. Two producers write into that
        column with overlapping-but-not-identical shapes:

          * Sync API (Zunkiree AI widget) — writes option1/option2/option3
            from `ProductVariant.option1/2/3`.
          * CheckoutFinalizer (Stella-hosted checkout, Phase 4+) — also
            writes those plus `variant_name` for the human-readable label.

        Every Optional field defaults to None so a producer that omits a key
        still validates. Pydantic v2 treats `Optional[X]` *without* a default
        as required-can-be-None, which 500'd `/me/orders` and the dashboard
        customer detail for any Phase-4-source order until this was fixed.
    AddressSchema:
      properties:
        first_name:
          anyOf:
            - type: string
            - type: 'null'
          title: First Name
        last_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Last Name
        company:
          anyOf:
            - type: string
            - type: 'null'
          title: Company
        address1:
          anyOf:
            - type: string
            - type: 'null'
          title: Address1
        address2:
          anyOf:
            - type: string
            - type: 'null'
          title: Address2
        city:
          anyOf:
            - type: string
            - type: 'null'
          title: City
        state:
          anyOf:
            - type: string
            - type: 'null'
          title: State
        postal_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Postal Code
        country:
          anyOf:
            - type: string
            - type: 'null'
          title: Country
        phone:
          anyOf:
            - type: string
            - type: 'null'
          title: Phone
      type: object
      title: AddressSchema
      description: >-
        Schema for address. Fields are optional to support simpler address
        formats from AI widget.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````