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

# Admin Update Order Status

> Admin: update order status, optionally add tracking info and a history comment.



## OpenAPI

````yaml https://api.vellaro.io/openapi.json patch /api/v1/admin/orders/{order_id}
openapi: 3.1.0
info:
  title: Vellaro API
  description: Vellaro 2026 — E-commerce API
  version: 0.1.0
servers:
  - url: https://api.vellaro.io
    description: Produzione
security: []
tags: []
paths:
  /api/v1/admin/orders/{order_id}:
    patch:
      tags:
        - admin
      summary: Admin Update Order Status
      description: >-
        Admin: update order status, optionally add tracking info and a history
        comment.
      operationId: admin_update_order_status_api_v1_admin_orders__order_id__patch
      parameters:
        - name: order_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Order Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrderStatusUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse_OrderOut_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    OrderStatusUpdate:
      properties:
        status:
          type: string
          title: Status
        comment:
          anyOf:
            - type: string
            - type: 'null'
          title: Comment
        notify_customer:
          type: boolean
          title: Notify Customer
          default: false
        tracking_number:
          anyOf:
            - type: string
            - type: 'null'
          title: Tracking Number
        shipping_carrier:
          anyOf:
            - type: string
            - type: 'null'
          title: Shipping Carrier
      type: object
      required:
        - status
      title: OrderStatusUpdate
      description: 'Admin endpoint: manually set order status.'
    ApiResponse_OrderOut_:
      properties:
        data:
          anyOf:
            - $ref: '#/components/schemas/OrderOut'
            - type: 'null'
        meta:
          anyOf:
            - $ref: '#/components/schemas/PaginationMeta'
            - type: 'null'
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
        error_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Code
      type: object
      title: ApiResponse[OrderOut]
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    OrderOut:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        user_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: User Id
        status:
          type: string
          title: Status
        payment_status:
          type: string
          title: Payment Status
        payment_method:
          type: string
          title: Payment Method
        stripe_payment_intent_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Stripe Payment Intent Id
        subtotal:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Subtotal
        shipping_cost:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Shipping Cost
        tax:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Tax
        tax_rate:
          anyOf:
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
            - type: 'null'
          title: Tax Rate
        prices_include_tax:
          type: boolean
          title: Prices Include Tax
          default: false
        discount_amount:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Discount Amount
        total:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Total
        amount_refunded:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Amount Refunded
          default: '0'
        currency:
          type: string
          title: Currency
        coupon_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Coupon Code
        customer_email:
          anyOf:
            - type: string
            - type: 'null'
          title: Customer Email
        customer_phone:
          anyOf:
            - type: string
            - type: 'null'
          title: Customer Phone
        shipping_address:
          additionalProperties: true
          type: object
          title: Shipping Address
        billing_address:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Billing Address
        tracking_number:
          anyOf:
            - type: string
            - type: 'null'
          title: Tracking Number
        shipping_carrier:
          anyOf:
            - type: string
            - type: 'null'
          title: Shipping Carrier
        invoice_number:
          anyOf:
            - type: integer
            - type: 'null'
          title: Invoice Number
        invoice_issued_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Invoice Issued At
        customer_vat_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Customer Vat Id
        customer_tax_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Customer Tax Code
        notes:
          anyOf:
            - type: string
            - type: 'null'
          title: Notes
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        items:
          items:
            $ref: '#/components/schemas/OrderItemOut'
          type: array
          title: Items
          default: []
        history:
          items:
            $ref: '#/components/schemas/OrderHistoryOut'
          type: array
          title: History
          default: []
      type: object
      required:
        - id
        - user_id
        - status
        - payment_status
        - payment_method
        - stripe_payment_intent_id
        - subtotal
        - shipping_cost
        - tax
        - discount_amount
        - total
        - currency
        - coupon_code
        - customer_email
        - customer_phone
        - shipping_address
        - billing_address
        - tracking_number
        - shipping_carrier
        - invoice_number
        - notes
        - created_at
        - updated_at
      title: OrderOut
    PaginationMeta:
      properties:
        page:
          type: integer
          title: Page
        page_size:
          type: integer
          title: Page Size
        total:
          type: integer
          title: Total
        total_pages:
          type: integer
          title: Total Pages
      type: object
      required:
        - page
        - page_size
        - total
        - total_pages
      title: PaginationMeta
    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
    OrderItemOut:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        variant_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Variant Id
        product_name:
          type: string
          title: Product Name
        variant_sku:
          type: string
          title: Variant Sku
        variant_attributes:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Variant Attributes
        quantity:
          type: integer
          title: Quantity
        unit_price:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Unit Price
        total_price:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Total Price
      type: object
      required:
        - id
        - variant_id
        - product_name
        - variant_sku
        - variant_attributes
        - quantity
        - unit_price
        - total_price
      title: OrderItemOut
    OrderHistoryOut:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        event_type:
          type: string
          title: Event Type
          default: status_change
        status:
          anyOf:
            - type: string
            - type: 'null'
          title: Status
        comment:
          anyOf:
            - type: string
            - type: 'null'
          title: Comment
        notify_customer:
          type: boolean
          title: Notify Customer
        actor_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Actor Name
        is_internal:
          type: boolean
          title: Is Internal
          default: false
        meta:
          additionalProperties: true
          type: object
          title: Meta
          default: {}
        created_at:
          type: string
          format: date-time
          title: Created At
      type: object
      required:
        - id
        - comment
        - notify_customer
        - created_at
      title: OrderHistoryOut
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````