> ## 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.

# Get Order

> Get full order detail.
Accessible by the owning user or any admin. A guest order: in full with the
`X-Order-Token` of its checkout for 72 hours, otherwise without the buyer's
personal data (SECRETS-1).



## OpenAPI

````yaml https://api.vellaro.io/openapi/storefront.json get /api/v1/orders/{order_id}
openapi: 3.1.0
info:
  title: Vellaro Storefront API
  description: >-
    The API of storefronts and mobile apps. The store comes from the publishable
    key in the `X-Vellaro-Key` header (or from the store's domain); the
    customer's endpoints also take the customer's token as `Authorization:
    Bearer <access_token>`.
  version: 0.1.0
servers:
  - url: https://api.vellaro.io
    description: Produzione
security: []
tags:
  - name: Authentication
    description: >-
      Customer sign-up and login, tokens, password reset, email verification,
      Google and Apple login, two-factor authentication.
  - name: Catalog
    description: Products, categories and brands, with filters, sorting and pagination.
  - name: Search
    description: Full-text product search and suggestions as you type.
  - name: Cart
    description: >-
      The cart of a guest (`X-Cart-Token`) or of the logged-in customer, and the
      extra warranty offered on a product page.
  - name: Checkout & orders
    description: >-
      Checkout, the customer's orders and reorder, «Order on WhatsApp» (cart
      codes, clicks).
  - name: Payments
    description: >-
      The store's payment methods, paying an order again, and the confirmation
      steps of PayPal, PokPay and Iute.
  - name: Account
    description: >-
      The logged-in customer: profile, addresses, wishlist, digital downloads,
      subscriptions, affiliate account.
  - name: Reviews & questions
    description: Product reviews and product questions.
  - name: AI chat
    description: 'The store''s AI shopping assistant: conversations, messages, feedback.'
  - name: Content
    description: CMS pages, menus, banners, flipbooks and information pages.
  - name: Marketing & contact
    description: >-
      Newsletter sign-up and email links, the contact form, campaign click
      tracking.
  - name: Store
    description: >-
      The store for the storefront: brand, public settings, languages,
      translations, currencies, physical stores, theme.
  - name: Devices
    description: Push-notification devices of the mobile app.
paths:
  /api/v1/orders/{order_id}:
    get:
      tags:
        - Checkout & orders
      summary: Get Order
      description: >-
        Get full order detail.

        Accessible by the owning user or any admin. A guest order: in full with
        the

        `X-Order-Token` of its checkout for 72 hours, otherwise without the
        buyer's

        personal data (SECRETS-1).
      operationId: get_order_api_v1_orders__order_id__get
      parameters:
        - name: order_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Order Id
        - name: X-Order-Token
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Order-Token
      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:
    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: []
        payment_attempt:
          anyOf:
            - $ref: '#/components/schemas/PaymentAttemptOut'
            - type: 'null'
      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
        kind:
          anyOf:
            - type: string
            - type: 'null'
          title: Kind
        parent_item_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Parent Item Id
        service_meta:
          anyOf:
            - $ref: '#/components/schemas/OrderItemServiceOut'
            - type: 'null'
      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
    PaymentAttemptOut:
      properties:
        method:
          type: string
          const: iute
          title: Method
          default: iute
        state:
          anyOf:
            - type: string
              enum:
                - awaiting
                - approved
                - declined
            - type: 'null'
          title: State
      type: object
      title: PaymentAttemptOut
      description: >-
        Il sottoinsieme pubblico del tentativo corrente di un ordine Iute
        (§7.1).


        `state`: `awaiting` (domanda inviata, anche con un importo da
        verificare),

        `approved` (approvata, firmata o pagata: il pagato si legge da

        `payment_status`), `declined`, null (nessuna domanda vista: sessione
        aperta,

        chiusa senza domanda, scaduta o superata). Lo scrive

        `iute.storefront.public_attempts`; al posto dell'oggetto c'è null per un

        altro metodo e per un ordine Iute importato senza tentativi.
    OrderItemServiceOut:
      properties:
        years:
          anyOf:
            - type: integer
            - type: 'null'
          title: Years
        base_unit_price:
          anyOf:
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
            - type: 'null'
          title: Base Unit Price
      type: object
      title: OrderItemServiceOut
      description: >-
        The snapshot of an extra warranty (GAR-15, PIANO_GARANZIA_EXTRA §4.5) as

        the customer reads it: the years it adds and the paid price of ONE piece
        of

        the product it was computed on (D2, D10). The rule's other parameters
        stay

        with the staff (`StaffOrderItemServiceOut`).
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.