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

# Quote Manual Order

> Il preventivo del motore per il cliente scelto: soldi, avvisi, blocchi
(anche quelli del ruolo di chi chiede) e «Cosa succede». Non scrive nulla:
la transazione è READ ONLY, ammessa dopo i `set_config` del negozio.



## OpenAPI

````yaml https://api.vellaro.io/openapi/admin.json post /api/v1/admin/orders/quote
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/quote:
    post:
      tags:
        - Orders
      summary: Quote Manual Order
      description: >-
        Il preventivo del motore per il cliente scelto: soldi, avvisi, blocchi

        (anche quelli del ruolo di chi chiede) e «Cosa succede». Non scrive
        nulla:

        la transazione è READ ONLY, ammessa dopo i `set_config` del negozio.
      operationId: quote_manual_order_api_v1_admin_orders_quote_post
      parameters:
        - 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)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ManualOrderQuoteRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse_QuoteOut_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    ManualOrderQuoteRequest:
      properties:
        channel:
          anyOf:
            - type: string
              enum:
                - phone
                - whatsapp
                - email
                - in_store
                - other
            - type: 'null'
          title: Channel
        customer:
          oneOf:
            - $ref: '#/components/schemas/ExistingCustomerIn'
            - $ref: '#/components/schemas/GuestCustomerIn'
          title: Customer
          discriminator:
            propertyName: mode
            mapping:
              existing: '#/components/schemas/ExistingCustomerIn'
              guest: '#/components/schemas/GuestCustomerIn'
        delivery:
          oneOf:
            - $ref: '#/components/schemas/ShipDeliveryIn'
            - $ref: '#/components/schemas/PickupDeliveryIn'
          title: Delivery
          discriminator:
            propertyName: mode
            mapping:
              pickup: '#/components/schemas/PickupDeliveryIn'
              ship: '#/components/schemas/ShipDeliveryIn'
        business_invoice:
          anyOf:
            - $ref: '#/components/schemas/BusinessInvoiceInput'
            - type: 'null'
        lines:
          items:
            $ref: '#/components/schemas/LineIn'
          type: array
          maxItems: 100
          title: Lines
        payment:
          $ref: '#/components/schemas/PaymentIn'
        notes:
          anyOf:
            - type: string
              maxLength: 1000
            - type: 'null'
          title: Notes
        internal_note:
          anyOf:
            - type: string
              maxLength: 2000
            - type: 'null'
          title: Internal Note
        email_customer:
          type: boolean
          title: Email Customer
          default: false
        locale:
          anyOf:
            - type: string
              maxLength: 5
            - type: 'null'
          title: Locale
      type: object
      required:
        - customer
        - delivery
        - payment
      title: ManualOrderQuoteRequest
      description: 'POST /admin/orders/quote: lo stesso corpo della creazione.'
    ApiResponse_QuoteOut_:
      properties:
        data:
          anyOf:
            - $ref: '#/components/schemas/QuoteOut'
            - 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[QuoteOut]
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ExistingCustomerIn:
      properties:
        mode:
          type: string
          const: existing
          title: Mode
        user_id:
          type: string
          format: uuid
          title: User Id
      type: object
      required:
        - mode
        - user_id
      title: ExistingCustomerIn
      description: Un cliente con account del negozio, attivo e non anonimizzato.
    GuestCustomerIn:
      properties:
        mode:
          type: string
          const: guest
          title: Mode
        full_name:
          type: string
          maxLength: 255
          minLength: 1
          title: Full Name
        phone:
          anyOf:
            - type: string
              maxLength: 50
            - type: 'null'
          title: Phone
        email:
          anyOf:
            - type: string
              format: email
            - type: 'null'
          title: Email
      type: object
      required:
        - mode
        - full_name
      title: GuestCustomerIn
      description: 'Un ospite: telefono O email (spesso al telefono c''è solo il numero).'
    ShipDeliveryIn:
      properties:
        mode:
          type: string
          const: ship
          title: Mode
        shipping_address:
          $ref: '#/components/schemas/AddressSchema'
        billing_address:
          anyOf:
            - $ref: '#/components/schemas/AddressSchema'
            - type: 'null'
      type: object
      required:
        - mode
        - shipping_address
      title: ShipDeliveryIn
      description: >-
        Spedizione: fatturazione uguale alla spedizione quando manca (come il
        checkout).
    PickupDeliveryIn:
      properties:
        mode:
          type: string
          const: pickup
          title: Mode
        store_id:
          type: string
          format: uuid
          title: Store Id
        billing_address:
          anyOf:
            - $ref: '#/components/schemas/AddressSchema'
            - type: 'null'
      type: object
      required:
        - mode
        - store_id
      title: PickupDeliveryIn
      description: Ritiro in un punto vendita attivo del negozio, spedizione 0.
    BusinessInvoiceInput:
      properties:
        company_name:
          type: string
          title: Company Name
        tax_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Tax Id
        vat_number:
          anyOf:
            - type: string
            - type: 'null'
          title: Vat Number
      type: object
      required:
        - company_name
      title: BusinessInvoiceInput
      description: >-
        B2B invoice details captured at checkout for THIS order (order-level

        snapshot). Independent from the account default, so guests and one-off

        company purchases work too. When present the order becomes a B2B
        receipt;

        an Albanian company sends `tax_id` (NIPT), a foreign one `vat_number`
        (VAT).
    LineIn:
      properties:
        variant_id:
          type: string
          format: uuid
          title: Variant Id
        quantity:
          type: integer
          maximum: 9999
          minimum: 1
          title: Quantity
      type: object
      required:
        - variant_id
        - quantity
      title: LineIn
    PaymentIn:
      properties:
        mode:
          type: string
          maxLength: 32
          minLength: 1
          title: Mode
        method:
          anyOf:
            - type: string
              maxLength: 32
            - type: 'null'
          title: Method
        reason:
          anyOf:
            - type: string
              maxLength: 500
            - type: 'null'
          title: Reason
        reference:
          anyOf:
            - type: string
              maxLength: 255
            - type: 'null'
          title: Reference
        fiscal:
          anyOf:
            - type: string
              enum:
                - now
                - at_register
                - later
            - type: 'null'
          title: Fiscal
        delivered_now:
          type: boolean
          title: Delivered Now
          default: false
      type: object
      required:
        - mode
      title: PaymentIn
      description: >-
        `mode` in R2a: `cod` o `bank_transfer` (ORD-16), `paid` («già pagato»,

        ORD-32); il link con R5. Un altro valore: 422

        `order.payment_method_not_allowed`.


        Solo con `paid` (per gli altri modi non contano):

        - `method`: come sono arrivati i soldi, `cash` · `card_pos` ·
          `bank_transfer` (bonifico ricevuto); un altro valore, o nessuno, è 422
          `order.payment_method_not_allowed`;
        - `reason`: obbligatorio (blocco `order.payment_reason_required`),
        perché
          da *Pagato* lo stato non torna indietro e uno sbaglio si corregge solo con
          un rimborso;
        - `reference`: il riferimento del bonifico o della ricevuta del POS,
        nella
          riga del registro dei pagamenti;
        - `fiscal`: lo scontrino (`orders/receipt.py`), obbligatorio e mai
          preselezionato con Nextera attivo (blocco `order.fiscal_choice_required`);
          `now` senza Nextera attivo è il blocco 409 `order.fiscal_now_unavailable`;
        - `delivered_now`: «Consegnato subito» al banco, l'ordine nasce
        *Consegnato*.
    QuoteOut:
      properties:
        lines:
          items:
            $ref: '#/components/schemas/QuoteLineOut'
          type: array
          title: Lines
        subtotal:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Subtotal
        shipping:
          $ref: '#/components/schemas/ShippingOut'
        cod_surcharge:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Cod Surcharge
        coupon:
          type: 'null'
          title: Coupon
        voucher:
          type: 'null'
          title: Voucher
        manual_discount:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Manual Discount
        discount_amount:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Discount Amount
        tax_rate:
          anyOf:
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
            - type: 'null'
          title: Tax Rate
        tax:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Tax
        prices_include_tax:
          type: boolean
          title: Prices Include Tax
        total:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Total
        currency:
          type: string
          title: Currency
        currency_decimals:
          type: integer
          title: Currency Decimals
        effective_payment_method:
          type: string
          title: Effective Payment Method
        locale:
          type: string
          title: Locale
        effects:
          $ref: '#/components/schemas/EffectsOut'
        warnings:
          items:
            $ref: >-
              #/components/schemas/app__modules__orders__manual__outputs__IssueOut
          type: array
          title: Warnings
        blocking:
          items:
            $ref: >-
              #/components/schemas/app__modules__orders__manual__outputs__IssueOut
          type: array
          title: Blocking
      type: object
      required:
        - lines
        - subtotal
        - shipping
        - cod_surcharge
        - manual_discount
        - discount_amount
        - tax_rate
        - tax
        - prices_include_tax
        - total
        - currency
        - currency_decimals
        - effective_payment_method
        - locale
        - effects
        - warnings
        - blocking
      title: QuoteOut
    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
    AddressSchema:
      properties:
        first_name:
          type: string
          title: First Name
        last_name:
          type: string
          title: Last Name
        company:
          anyOf:
            - type: string
            - type: 'null'
          title: Company
        address_line1:
          type: string
          title: Address Line1
        address_line2:
          anyOf:
            - type: string
            - type: 'null'
          title: Address Line2
        city:
          type: string
          title: City
        state:
          anyOf:
            - type: string
            - type: 'null'
          title: State
        postal_code:
          type: string
          title: Postal Code
        country:
          type: string
          title: Country
        phone:
          anyOf:
            - type: string
            - type: 'null'
          title: Phone
      type: object
      required:
        - first_name
        - last_name
        - address_line1
        - city
        - postal_code
        - country
      title: AddressSchema
    QuoteLineOut:
      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'
        quantity:
          type: integer
          title: Quantity
        total_price:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Total Price
        warnings:
          items:
            $ref: >-
              #/components/schemas/app__modules__orders__manual__outputs__IssueOut
          type: array
          title: Warnings
      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
        - quantity
        - total_price
        - warnings
      title: QuoteLineOut
    ShippingOut:
      properties:
        amount:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Amount
        source:
          type: string
          title: Source
        label:
          anyOf:
            - type: string
            - type: 'null'
          title: Label
      type: object
      required:
        - amount
        - source
      title: ShippingOut
    EffectsOut:
      properties:
        stock_units_now:
          type: integer
          title: Stock Units Now
        email_to:
          anyOf:
            - type: string
            - type: 'null'
          title: Email To
        status:
          type: string
          title: Status
        payment_status:
          type: string
          title: Payment Status
        fiscal:
          type: string
          title: Fiscal
        webhooks:
          items:
            type: string
          type: array
          title: Webhooks
      type: object
      required:
        - stock_units_now
        - email_to
        - status
        - payment_status
        - fiscal
        - webhooks
      title: EffectsOut
      description: '«Cosa succede» (§3.3): il patto con l''operatore.'
    app__modules__orders__manual__outputs__IssueOut:
      properties:
        code:
          type: string
          title: Code
        message:
          type: string
          title: Message
      additionalProperties: true
      type: object
      required:
        - code
        - message
      title: IssueOut
      description: |-
        Un blocco o un avviso: il codice di sempre, il messaggio inglese e i
        dettagli piatti (`{"code": "cart.insufficient_stock", "variant_id": …,
        "available": 1, "requested": 2}`), che l'admin traduce dal codice.
    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.