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

# Order Deletion Check

> Si può mettere nel cestino? Blocchi del §11.2 con le alternative, avvisi
ed effetti con i numeri. Non scrive e non chiama il gateway; un ordine di
un altro negozio è un 404.



## OpenAPI

````yaml https://api.vellaro.io/openapi/admin.json get /api/v1/admin/orders/{order_id}/deletion-check
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/{order_id}/deletion-check:
    get:
      tags:
        - Orders
      summary: Order Deletion Check
      description: >-
        Si può mettere nel cestino? Blocchi del §11.2 con le alternative, avvisi

        ed effetti con i numeri. Non scrive e non chiama il gateway; un ordine
        di

        un altro negozio è un 404.
      operationId: order_deletion_check_api_v1_admin_orders__order_id__deletion_check_get
      parameters:
        - name: order_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Order Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse_DeletionCheckOut_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    ApiResponse_DeletionCheckOut_:
      properties:
        data:
          anyOf:
            - $ref: '#/components/schemas/DeletionCheckOut'
            - 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[DeletionCheckOut]
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    DeletionCheckOut:
      properties:
        order_id:
          type: string
          format: uuid
          title: Order Id
        reference:
          type: string
          title: Reference
        deletable:
          type: boolean
          title: Deletable
        mode:
          type: string
          title: Mode
        in_trash:
          type: boolean
          title: In Trash
          default: false
        blockers:
          items:
            $ref: '#/components/schemas/DeletionBlockerOut'
          type: array
          title: Blockers
          default: []
        warnings:
          items:
            $ref: '#/components/schemas/DeletionNoteOut'
          type: array
          title: Warnings
          default: []
        effects:
          items:
            $ref: '#/components/schemas/DeletionEffectOut'
          type: array
          title: Effects
          default: []
        attempt_state:
          anyOf:
            - type: string
            - type: 'null'
          title: Attempt State
        purge_after_days:
          type: integer
          title: Purge After Days
      type: object
      required:
        - order_id
        - reference
        - deletable
        - mode
        - purge_after_days
      title: DeletionCheckOut
      description: |-
        GET /admin/orders/{id}/deletion-check: nessuna scrittura, nessuna
        chiamata al gateway (un tentativo ancora vivo si scopre al cestino, 409
        `order.payment_attempt_live`).
    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
    DeletionBlockerOut:
      properties:
        code:
          type: string
          title: Code
        detail:
          type: string
          title: Detail
        params:
          additionalProperties: true
          type: object
          title: Params
          default: {}
        alternatives:
          items:
            type: string
          type: array
          title: Alternatives
          default: []
      type: object
      required:
        - code
        - detail
      title: DeletionBlockerOut
      description: >-
        Perché l'ordine non va nel cestino, e cosa si può fare invece.

        `alternatives`: refund · cancel · fiscal_cancel · create_return ·

        anonymize_customer · retry_later · manage_subscription ·
        disable_gift_card

        (l'admin mostra solo quelle che il ruolo consente).
    DeletionNoteOut:
      properties:
        code:
          type: string
          title: Code
        label:
          type: string
          title: Label
      type: object
      required:
        - code
        - label
      title: DeletionNoteOut
      description: |-
        Un avviso del dialogo (bonifico, Paysera, merce da verificare,
        tentativo che il gateway non trova).
    DeletionEffectOut:
      properties:
        code:
          type: string
          title: Code
        label:
          type: string
          title: Label
        count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Count
        amount:
          anyOf:
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
            - type: 'null'
          title: Amount
        ref:
          anyOf:
            - type: string
            - type: 'null'
          title: Ref
      type: object
      required:
        - code
        - label
      title: DeletionEffectOut
      description: |-
        Un effetto del cestino, con il suo numero: `count` NULL per la merce
        «da verificare» (righe impegnate prima di ORD-4).
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````

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