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

> La scheda di un tentativo: i campi della riga più gli ultimi 20 eventi (`events_total` li conta tutti), con lo
stato letto da Iute. 404 `iute.attempt_not_found`.



## OpenAPI

````yaml https://api.vellaro.io/openapi/admin.json get /api/v1/admin/iute/attempts/{attempt_id}
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/iute/attempts/{attempt_id}:
    get:
      tags:
        - Integrations & modules
      summary: Get Attempt
      description: >-
        La scheda di un tentativo: i campi della riga più gli ultimi 20 eventi
        (`events_total` li conta tutti), con lo

        stato letto da Iute. 404 `iute.attempt_not_found`.
      operationId: get_attempt_api_v1_admin_iute_attempts__attempt_id__get
      parameters:
        - name: attempt_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Attempt Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse_IuteAttemptDetailOut_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    ApiResponse_IuteAttemptDetailOut_:
      properties:
        data:
          anyOf:
            - $ref: '#/components/schemas/IuteAttemptDetailOut'
            - 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[IuteAttemptDetailOut]
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    IuteAttemptDetailOut:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        order_id:
          type: string
          format: uuid
          title: Order Id
        order_number:
          type: string
          title: Order Number
        order_status:
          type: string
          title: Order Status
        order_payment_status:
          type: string
          title: Order Payment Status
        order_trashed:
          type: boolean
          title: Order Trashed
        customer:
          anyOf:
            - $ref: '#/components/schemas/IuteAttemptCustomerOut'
            - type: 'null'
        status:
          $ref: '#/components/schemas/AttemptStatus'
        environment:
          $ref: '#/components/schemas/AttemptEnvironment'
        pilot:
          type: boolean
          title: Pilot
        mode:
          $ref: '#/components/schemas/AttemptMode'
        current:
          type: boolean
          title: Current
        session:
          anyOf:
            - type: string
            - type: 'null'
          title: Session
        session_bound:
          type: boolean
          title: Session Bound
        amount:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Amount
        currency:
          type: string
          title: Currency
        approved_amount:
          anyOf:
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
            - type: 'null'
          title: Approved Amount
        loan_amount:
          anyOf:
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
            - type: 'null'
          title: Loan Amount
        remote_status:
          anyOf:
            - $ref: '#/components/schemas/IuteRemoteStatus'
            - type: 'null'
        remote_checked_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Remote Checked At
        next_check_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Next Check At
        check_failures:
          type: integer
          title: Check Failures
        check_failing_since:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Check Failing Since
        client_status:
          anyOf:
            - type: string
            - type: 'null'
          title: Client Status
        paid_by:
          anyOf:
            - $ref: '#/components/schemas/PaidBy'
            - type: 'null'
        close_reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Close Reason
        decline_reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Decline Reason
        opened_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Opened At
        submitted_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Submitted At
        decided_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Decided At
        signed_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Signed At
        paid_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Paid At
        expires_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Expires At
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        attention:
          items:
            type: string
            enum:
              - amount_mismatch
              - amount_unreadable
              - financing_cancelled
              - late_financing
              - status_mismatch
              - mark_paid
              - amount_unverified
              - reading_failed
              - no_outcome
          type: array
          title: Attention
        last_event:
          anyOf:
            - $ref: '#/components/schemas/IuteLastEventOut'
            - type: 'null'
        events:
          items:
            $ref: '#/components/schemas/IuteAttemptEventOut'
          type: array
          title: Events
        events_total:
          type: integer
          title: Events Total
      type: object
      required:
        - id
        - order_id
        - order_number
        - order_status
        - order_payment_status
        - order_trashed
        - customer
        - status
        - environment
        - pilot
        - mode
        - current
        - session
        - session_bound
        - amount
        - currency
        - approved_amount
        - loan_amount
        - remote_status
        - remote_checked_at
        - next_check_at
        - check_failures
        - check_failing_since
        - client_status
        - paid_by
        - close_reason
        - decline_reason
        - opened_at
        - submitted_at
        - decided_at
        - signed_at
        - paid_at
        - expires_at
        - created_at
        - updated_at
        - attention
        - last_event
        - events
        - events_total
      title: IuteAttemptDetailOut
      description: >-
        Un tentativo con i suoi eventi, dal più recente (al massimo
        `practices.EVENTS_LIMIT`; `events_total` li conta

        tutti).
    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
    IuteAttemptCustomerOut:
      properties:
        id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Id
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        email:
          anyOf:
            - type: string
            - type: 'null'
          title: Email
      type: object
      required:
        - id
        - name
        - email
      title: IuteAttemptCustomerOut
      description: >-
        Il cliente dell'ordine: l'account se c'è, altrimenti il nome della
        fatturazione e l'email dell'ordine.
    AttemptStatus:
      type: string
      enum:
        - issued
        - opened
        - submitted
        - in_progress
        - signed
        - paid
        - cancelled
        - declined
        - expired
        - superseded
        - closed
        - amount_mismatch
      title: AttemptStatus
      description: >-
        Lo stato del tentativo (§8.4 col contratto del 30/10). Le transizioni
        ammesse sono

        `attempts.ALLOWED_TRANSITIONS`.
    AttemptEnvironment:
      type: string
      enum:
        - test
        - live
      title: AttemptEnvironment
    AttemptMode:
      type: string
      enum:
        - redirect
        - session
        - payload
      title: AttemptMode
      description: >-
        Come il cliente arriva a Iute (§7.1 `CheckoutResponse.iute.mode`,
        DI-16). Dice se il sito

        aspetta `/iute/submitted` dal browser: col Redirect no, e «domanda non
        registrata dal sito» non

        si applica (`attempts.BROWSER_MODES`).
    IuteRemoteStatus:
      type: string
      enum:
        - PENDING
        - IN_PROGRESS
        - SIGNED
        - PAID
        - CANCELLED
        - NOT_FOUND
        - UNKNOWN
      title: IuteRemoteStatus
      description: >-
        Una lettura dello stato dell'ordine di Iute (`eshop-order-status`, guida
        del 30/10, §9).


        I primi cinque sono quelli che Iute scrive nel campo `status`.
        `NOT_FOUND` e `UNKNOWN` li decide

        chi legge (IUTE-11c): la rotta risponde «ordine non trovato», o con uno
        stato che non conosciamo

        (`attempts.parse_remote_status`). Una lettura NON riuscita (rete,
        timeout, 5xx, rotta assente)

        non è uno stato: è `attempts.record_failure`.
    PaidBy:
      type: string
      enum:
        - webhook
        - poll
        - staff
      title: PaidBy
    IuteLastEventOut:
      properties:
        source:
          $ref: '#/components/schemas/EventSource'
        kind:
          $ref: '#/components/schemas/EventKind'
        outcome:
          $ref: '#/components/schemas/EventOutcome'
        remote_status:
          anyOf:
            - $ref: '#/components/schemas/IuteRemoteStatus'
            - type: 'null'
        received_at:
          type: string
          format: date-time
          title: Received At
      type: object
      required:
        - source
        - kind
        - outcome
        - remote_status
        - received_at
      title: IuteLastEventOut
      description: >-
        L'ultimo evento del tentativo (webhook con firma valida o lettura
        registrata).
    IuteAttemptEventOut:
      properties:
        source:
          $ref: '#/components/schemas/EventSource'
        kind:
          $ref: '#/components/schemas/EventKind'
        outcome:
          $ref: '#/components/schemas/EventOutcome'
        remote_status:
          anyOf:
            - $ref: '#/components/schemas/IuteRemoteStatus'
            - type: 'null'
        received_at:
          type: string
          format: date-time
          title: Received At
        id:
          type: string
          format: uuid
          title: Id
        status_before:
          $ref: '#/components/schemas/AttemptStatus'
        status_after:
          $ref: '#/components/schemas/AttemptStatus'
        key_environment:
          anyOf:
            - $ref: '#/components/schemas/AttemptEnvironment'
            - type: 'null'
        amount:
          anyOf:
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
            - type: 'null'
          title: Amount
      type: object
      required:
        - source
        - kind
        - outcome
        - remote_status
        - received_at
        - id
        - status_before
        - status_after
        - key_environment
        - amount
      title: IuteAttemptEventOut
      description: >-
        Un evento nella scheda: niente corpo, niente `description`, niente
        timestamp firmato.
    EventSource:
      type: string
      enum:
        - webhook
        - poll
      title: EventSource
    EventKind:
      type: string
      enum:
        - paid
        - cancelled
        - status
      title: EventKind
    EventOutcome:
      type: string
      enum:
        - pending_check
        - applied
        - unregistered
        - test_environment
        - needs_staff
        - amount_mismatch
        - duplicate
        - stale
        - status_mismatch
        - unverified
        - superseded
        - order_cancelled
        - after_cancel
        - already_paid
        - after_manual
        - after_paid
        - ignored
      title: EventOutcome
      description: Cosa ha fatto l'evento (`attempts.Decision.outcome`).
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````

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