> ## 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 List Orders

> Admin: paginated list of the store's orders.

ORD-20: the filters «Canale», «Inserito dallo staff», «Inseriti da me oggi»
and «Ritiro» (``orders/list_filters.py``); an unknown value → 422
``order.invalid_filter``.

ORD-3: the rows are `StaffOrderListOut` (origin, channel, who entered it,
pickup, trash); `OrderListOut` stays the customer's list.

ORD-6 (§11.7, §11.12): ``view=trash`` lists the orders in the trash, most
recent first, with a paid one (it should not exist, §11.9) on top. Open to
who trashes (admin, manager) and, read-only, to who records payments
(sales_manager, accountant: late bank transfers) → 403
``order.delete_forbidden`` for the others.

ORD-53: in both views ``q`` also matches the last 8 digits of the order's
phone (index ``ix_orders_phone8``), from 6 digits typed.



## OpenAPI

````yaml https://api.vellaro.io/openapi/admin.json get /api/v1/admin/orders
openapi: 3.1.0
info:
  title: Vellaro Admin API
  description: >-
    Store management under `/api/v1/admin`, for back ends and integrations.
    Every call takes `Authorization: Bearer <token>`: an admin API token or a
    staff user's token. The permissions of its role decide what it can do,
    always in its own store.
  version: 0.1.0
servers:
  - url: https://api.vellaro.io
    description: Produzione
security: []
tags:
  - name: Orders
    description: >-
      Orders and manual orders, payments, refunds, shipments, invoices, returns,
      customer subscriptions.
  - name: Products
    description: Products, variants, images, prices and discounts, product lookups.
  - name: Categories & catalog setup
    description: >-
      Categories, brands, attributes, options, filters, downloadable files,
      recurring profiles.
  - name: Inventory
    description: Stock of the variants and stock statuses.
  - name: Customers
    description: Customers, customer groups, custom fields.
  - name: Reviews & questions
    description: Moderation of product reviews and questions.
  - name: Promotions & coupons
    description: Coupons and gift vouchers.
  - name: Marketing
    description: Campaigns, newsletter subscribers, affiliates and their commissions.
  - name: Content
    description: >-
      CMS pages, menus, banners, information pages, flipbooks, media library,
      SEO URLs, email templates, translations.
  - name: Settings
    description: >-
      Store settings, email delivery, languages, currencies, physical stores,
      social login providers.
  - name: Shipping
    description: Couriers, shipping rates, weight and length classes.
  - name: Taxes & geo
    description: Tax classes, rates and rules; countries, zones and geo zones.
  - name: Integrations & modules
    description: >-
      Integrations, plugins and modules (Iute, extra warranty, Nextera, Financa
      5, WhatsApp, Firebase), outbound webhooks.
  - name: AI
    description: AI content generation and the settings of the AI shopping assistant.
  - name: Imports
    description: 'CSV imports and the universal import: runs, mappings, previews, undo.'
  - name: Reports & dashboard
    description: Dashboard figures and reports.
  - name: Users & API keys
    description: Staff users and roles, publishable keys, admin API tokens.
  - name: Audit
    description: The store's audit log.
paths:
  /api/v1/admin/orders:
    get:
      tags:
        - Orders
      summary: Admin List Orders
      description: >-
        Admin: paginated list of the store's orders.


        ORD-20: the filters «Canale», «Inserito dallo staff», «Inseriti da me
        oggi»

        and «Ritiro» (``orders/list_filters.py``); an unknown value → 422

        ``order.invalid_filter``.


        ORD-3: the rows are `StaffOrderListOut` (origin, channel, who entered
        it,

        pickup, trash); `OrderListOut` stays the customer's list.


        ORD-6 (§11.7, §11.12): ``view=trash`` lists the orders in the trash,
        most

        recent first, with a paid one (it should not exist, §11.9) on top. Open
        to

        who trashes (admin, manager) and, read-only, to who records payments

        (sales_manager, accountant: late bank transfers) → 403

        ``order.delete_forbidden`` for the others.


        ORD-53: in both views ``q`` also matches the last 8 digits of the
        order's

        phone (index ``ix_orders_phone8``), from 6 digits typed.
      operationId: admin_list_orders_api_v1_admin_orders_get
      parameters:
        - name: page
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            default: 1
            title: Page
        - name: page_size
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            default: 25
            title: Page Size
        - name: status
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Status
        - name: payment_status
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Payment Status
        - name: q
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Search by email, customer name, order number or invoice number
            title: Q
          description: Search by email, customer name, order number or invoice number
        - name: view
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              orders (default) or trash: the orders in the trash, read-only for
              the roles that record payments
            title: View
          description: >-
            orders (default) or trash: the orders in the trash, read-only for
            the roles that record payments
        - name: channel
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                maxLength: 16
              - type: 'null'
            description: >-
              web, mobile, phone, whatsapp, email, in_store, other, subscription
              or unspecified (the report's channel)
            title: Channel
          description: >-
            web, mobile, phone, whatsapp, email, in_store, other, subscription
            or unspecified (the report's channel)
        - name: manual
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            description: 'true: entered by the staff; false: the others'
            title: Manual
          description: 'true: entered by the staff; false: the others'
        - name: mine_today
          in: query
          required: false
          schema:
            type: boolean
            description: Entered by me today (store's calendar)
            default: false
            title: Mine Today
          description: Entered by me today (store's calendar)
        - name: delivery_mode
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                maxLength: 16
              - type: 'null'
            description: pickup or ship
            title: Delivery Mode
          description: pickup or ship
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse_list_StaffOrderListOut__'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    ApiResponse_list_StaffOrderListOut__:
      properties:
        data:
          anyOf:
            - items:
                $ref: '#/components/schemas/StaffOrderListOut'
              type: array
            - type: 'null'
          title: Data
        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[list[StaffOrderListOut]]
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    StaffOrderListOut:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        status:
          type: string
          title: Status
        payment_status:
          type: string
          title: Payment Status
        payment_method:
          type: string
          title: Payment Method
          default: ''
        total:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Total
        currency:
          type: string
          title: Currency
        customer_email:
          anyOf:
            - type: string
            - type: 'null'
          title: Customer Email
        customer_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Customer Name
        invoice_number:
          anyOf:
            - type: integer
            - type: 'null'
          title: Invoice Number
        item_count:
          type: integer
          title: Item Count
        created_at:
          type: string
          format: date-time
          title: Created At
        payment_attempt:
          anyOf:
            - $ref: '#/components/schemas/PaymentAttemptOut'
            - type: 'null'
        source:
          anyOf:
            - type: string
            - type: 'null'
          title: Source
        channel:
          anyOf:
            - type: string
            - type: 'null'
          title: Channel
        created_by_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Created By Name
        delivery_mode:
          anyOf:
            - type: string
            - type: 'null'
          title: Delivery Mode
        deleted_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Deleted At
        deleted_by_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Deleted By Name
        delete_reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Delete Reason
        delete_reason_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Delete Reason Code
        purge_after:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Purge After
      type: object
      required:
        - id
        - status
        - payment_status
        - total
        - currency
        - customer_email
        - item_count
        - created_at
      title: StaffOrderListOut
      description: La riga di GET /admin/orders.
    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
    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.
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````

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