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

# Lookup Variants

> Varianti vendibili col prezzo del motore per il cliente (o il pubblico) e
la giacenza. Un modo per richiesta: `q` (nome, inizio dello SKU, codice a
barre esatto), `recent=store|customer` (i «Recenti», 8 se `limit` non dice
altro) o `variant_id` ripetuto (al massimo 50, nell'ordine chiesto).



## OpenAPI

````yaml https://api.vellaro.io/openapi/admin.json get /api/v1/admin/orders/lookup/variants
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/lookup/variants:
    get:
      tags:
        - Orders
      summary: Lookup Variants
      description: >-
        Varianti vendibili col prezzo del motore per il cliente (o il pubblico)
        e

        la giacenza. Un modo per richiesta: `q` (nome, inizio dello SKU, codice
        a

        barre esatto), `recent=store|customer` (i «Recenti», 8 se `limit` non
        dice

        altro) o `variant_id` ripetuto (al massimo 50, nell'ordine chiesto).
      operationId: lookup_variants_api_v1_admin_orders_lookup_variants_get
      parameters:
        - name: q
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                minLength: 2
                maxLength: 100
              - type: 'null'
            title: Q
        - name: recent
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                pattern: ^(store|customer)$
              - type: 'null'
            description: '«Recenti»: of the store or the customer'
            title: Recent
          description: '«Recenti»: of the store or the customer'
        - name: variant_id
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
              format: uuid
            maxItems: 50
            description: These variants (repeat, drafts)
            default: []
            title: Variant Id
          description: These variants (repeat, drafts)
        - name: customer_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            description: Price for this customer
            title: Customer Id
          description: Price for this customer
        - name: limit
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
                maximum: 50
                minimum: 1
              - type: 'null'
            description: Default 20, 8 for recent
            title: Limit
          description: Default 20, 8 for recent
        - name: lang
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Force content language (it|en|sq)
            title: Lang
          description: Force content language (it|en|sq)
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse_list_VariantLookupOut__'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    ApiResponse_list_VariantLookupOut__:
      properties:
        data:
          anyOf:
            - items:
                $ref: '#/components/schemas/VariantLookupOut'
              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[VariantLookupOut]]
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    VariantLookupOut:
      properties:
        variant_id:
          type: string
          format: uuid
          title: Variant Id
        product_id:
          type: string
          format: uuid
          title: Product Id
        product_name:
          type: string
          title: Product Name
        variant_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Variant Name
        sku:
          type: string
          title: Sku
        attributes:
          additionalProperties: true
          type: object
          title: Attributes
        product_published:
          type: boolean
          title: Product Published
        regular_price:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Regular Price
        full_price:
          anyOf:
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
            - type: 'null'
          title: Full Price
        list_unit_price:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: List Unit Price
        unit_price:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Unit Price
        price_source:
          type: string
          title: Price Source
        stock:
          $ref: '#/components/schemas/StockOut'
        barcode:
          anyOf:
            - type: string
            - type: 'null'
          title: Barcode
        exact:
          type: boolean
          title: Exact
      type: object
      required:
        - variant_id
        - product_id
        - product_name
        - variant_name
        - sku
        - attributes
        - product_published
        - regular_price
        - list_unit_price
        - unit_price
        - price_source
        - stock
        - barcode
        - exact
      title: VariantLookupOut
    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
    StockOut:
      properties:
        tracked:
          type: boolean
          title: Tracked
        available:
          anyOf:
            - type: integer
            - type: 'null'
          title: Available
        backorder:
          type: boolean
          title: Backorder
      type: object
      required:
        - tracked
        - available
        - backorder
      title: StockOut
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````

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