> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lerian.studio/llms.txt
> Use this file to discover all available pages before exploring further.

# Correct an open funds recovery

> Corrects the situation type and report details of a funds recovery still awaiting analysis, and re-pushes the participant's registered regulator contact (updateFundsRecovery). Without it a wrong contact can only be fixed by cancelling and reopening the recovery.



## OpenAPI

````yaml /es/openapi/v3-current/spi-dict.yaml put /api/v1/dict/funds-recoveries/{id}
openapi: 3.1.0
info:
  contact:
    email: contact@lerian.studio
    name: Lerian Studio
    url: https://lerian.studio
  description: >-
    OpenAPI 3.1 surface for the DICT (Diretório de Identificadores de Contas
    Transacionais) capability of Lerian SPI, the direct integration between the
    institution and the Brazilian Instant Payment System (SPI/Pix). It covers
    the PIX key lifecycle, portability and ownership claims, the MED 2.0 dispute
    surface (infraction reports, refunds, fraud markers, and funds recoveries),
    antifraud statistics, synchronous DICT reports, and the internal operations
    that keep the key directory consistent.
  license:
    name: Lerian Studio General License
  title: Lerian SPI — DICT API
  version: 1.0.0
servers:
  - url: https://spi.sandbox.lerian.net
security: []
tags:
  - description: 'PIX key lifecycle: register, list, search, lookup, delete, and statistics.'
    name: Keys
  - description: >-
      PIX key portability and ownership claims through their full lifecycle
      (initiate, confirm, reject, cancel, acknowledge, complete).
    name: Claims
  - description: 'DICT infraction reports: list and retrieve.'
    name: Infractions
  - description: 'DICT refund requests: create, list, and retrieve.'
    name: Refunds
  - description: 'PIX fraud markers: create, list, and statistics.'
    name: Fraud Markers
  - description: >-
      Durable MED operation-intent status: the operationId every
      create/lifecycle-transition backlog route returns or references on every
      outcome, queryable independently of the business resource.
    name: Operations
  - description: >-
      Synchronous reports over Lerian SPI's own DICT record: COUNT(*) summaries
      of keys (by type/status) and claims (by type/status + open-past-deadline).
      COUNT-only — DICT holds no money.
    name: Reports
  - description: >-
      Internal DICT operations: reconciliation runs, claim deadline processing,
      and orphaned-key cleanup.
    name: Internal
paths:
  /api/v1/dict/funds-recoveries/{id}:
    put:
      tags:
        - Funds Recoveries
      summary: Correct an open funds recovery
      description: >-
        Corrects the situation type and report details of a funds recovery still
        awaiting analysis, and re-pushes the participant's registered regulator
        contact (updateFundsRecovery). Without it a wrong contact can only be
        fixed by cancelling and reopening the recovery.
      operationId: updateFundsRecovery
      parameters:
        - description: BACEN-assigned funds-recovery resource UUID to correct
          in: path
          name: id
          required: true
          schema:
            description: BACEN-assigned funds-recovery resource UUID to correct
            format: uuid
            type: string
        - description: Required key used to prevent replaying the mutation.
          in: header
          name: X-Idempotency
          required: true
          schema:
            description: Required key used to prevent replaying the mutation.
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateFundsRecoveryRequest'
              description: >-
                updateFundsRecovery body: corrected situation type and report
                details. The regulator contact is re-read from the participant
                registry.
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FundsRecoveryMutationResponse'
                description: >-
                  Persisted local DICT funds-recovery record, or {operationId,
                  operationStatus} while BACEN's outcome is pending (202).
          description: OK
          headers:
            Location:
              schema:
                description: >-
                  GET /api/v1/dict/operations/{operationId}; present only on a
                  202 response.
                type: string
        '202':
          content:
            application/json:
              schema:
                properties:
                  operationId:
                    description: >-
                      Durable MED operation-intent id; present only while the
                      outcome is pending (202).
                    format: uuid
                    type: string
                  operationStatus:
                    description: >-
                      Durable operation-intent status; present only while the
                      outcome is pending (202). Never REJECTED or LOCAL_FAILURE
                      — each maps to its own terminal HTTP status instead of a
                      202.
                    enum:
                      - RESERVED
                      - SUBMITTED
                      - CONFIRMED
                      - SYNC_PENDING
                      - UNKNOWN_OUTCOME
                      - MANUAL_REVIEW
                      - COMPLETED
                    type: string
                required:
                  - operationId
                  - operationStatus
                type: object
          description: >-
            BACEN's outcome for this mutation is not yet resolved into a
            persisted resource: an ambiguous BACEN answer (reconciliation
            pending) or a BACEN-confirmed write whose own local persistence
            failed (MANUAL_REVIEW). Poll GET
            /api/v1/dict/operations/{operationId} — this response's own Location
            header — for the eventual resolution.
          headers:
            Location:
              description: >-
                GET /api/v1/dict/operations/{operationId} for the eventual
                resolution.
              schema:
                format: uri-reference
                type: string
        '403':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Forbidden
        '404':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Not Found
        '409':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Conflict
        '422':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Unprocessable Entity
        '429':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Too Many Requests
        '500':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Internal Server Error
        '503':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Service Unavailable
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Error
      security:
        - BearerAuth: []
components:
  schemas:
    UpdateFundsRecoveryRequest:
      additionalProperties: false
      properties:
        reportDetails:
          description: >-
            Corrected details for the counterparty PSP; mandatory when
            situationType is OTHER (max 2000 characters).
          maxLength: 2000
          type: string
        situationType:
          description: >-
            Corrected MED 2.0 situation classification: SCAM, ACCOUNT_TAKEOVER,
            COERCION, FRAUDULENT_ACCESS, OTHER, or UNKNOWN
          enum:
            - SCAM
            - ACCOUNT_TAKEOVER
            - COERCION
            - FRAUDULENT_ACCESS
            - OTHER
            - UNKNOWN
          examples:
            - SCAM
          type: string
      required:
        - situationType
      type: object
    FundsRecoveryMutationResponse:
      additionalProperties: false
      properties:
        analysisAcceptedAt:
          description: >-
            When the analysis step was observed to complete — the instant the
            72-hour refund window opens (RFC 3339, UTC). Absent until observed.
            When no BACEN snapshot stated the transition, this is the DICT's
            notification-creation instant instead: an upper bound on it, so the
            window shown here never closes earlier than the one the DICT counts.
          examples:
            - '2026-06-14T12:00:00Z'
          type: string
        bacen:
          $ref: '#/components/schemas/BACENEnvelopeResponse'
          description: >-
            BACEN's own operational envelope for its most recent interaction on
            this funds recovery, including its LastModified version; omitted
            when no BACEN interaction has ever landed on it.
        bacenCreationTime:
          description: >-
            When BACEN created this funds recovery (RFC 3339, UTC); distinct
            from createdAt
          examples:
            - '2026-06-14T12:00:00Z'
          type: string
        bacenReporterParticipant:
          description: >-
            BACEN-assigned reporter participant ISPB
            (ExtendedFundsRecovery.ReporterParticipant); empty until BACEN
            answers
          examples:
            - '12345678'
          type: string
        completion:
          description: >-
            Why a COMPLETED recovery completed: REFUNDED (the refund step was
            observed to start), REFUND_DEADLINE_LAPSED (no refund step was
            observed and the DICT concluded it at or after the 72 hours), or
            UNKNOWN (nothing observed here explains it — the analysis step was
            never seen, or the DICT concluded it before the deadline, which a
            refund impossibility, an all-rejected notification set, an
            unobserved refund and a lapse concluded just inside a window
            anchored on the DICT's notification-creation instant all explain
            equally). Absent while the recovery is not COMPLETED.
          enum:
            - REFUNDED
            - REFUND_DEADLINE_LAPSED
            - UNKNOWN
          examples:
            - REFUNDED
          type: string
        contactInformation:
          $ref: '#/components/schemas/ContactInformationResponse'
          description: BACEN-echoed regulator-facing contact
        createdAt:
          description: Record creation timestamp (RFC 3339, UTC)
          examples:
            - '2026-06-14T12:00:00Z'
          type: string
        flowType:
          description: >-
            ExtendedFundsRecovery.FlowType, verbatim (BACEN's spec defines only
            AUTOMATED); not actionable
          examples:
            - AUTOMATED
          type: string
        id:
          description: >-
            BACEN-assigned funds-recovery resource UUID — the public, canonical
            identity of this record
          examples:
            - 550e8400-e29b-41d4-a716-446655440003
          type: string
        operationId:
          description: >-
            Durable MED operation-intent id: the operation that produced this
            resource's current state. Present on both a synchronous 200/201 and
            a pending 202.
          examples:
            - 01930000-0000-7000-8000-000000000000
          type: string
        operationStatus:
          description: >-
            Durable operation-intent status. Always COMPLETED on a synchronous
            200/201; on a pending 202 it is never REJECTED or LOCAL_FAILURE —
            both are BACEN-final/local-final outcomes mapped to their own HTTP
            status instead of a 202.
          enum:
            - RESERVED
            - SUBMITTED
            - CONFIRMED
            - SYNC_PENDING
            - UNKNOWN_OUTCOME
            - MANUAL_REVIEW
            - COMPLETED
          examples:
            - UNKNOWN_OUTCOME
          type: string
        originOperationId:
          description: >-
            Durable operation-intent id that produced this snapshot's current
            state, when known
          examples:
            - 01930000-0000-7000-8000-000000000000
          type: string
        refundDeadlineAt:
          description: >-
            When the 72-hour window to start the refund step closes (RFC 3339,
            UTC); the DICT concludes the recovery itself after it. Absent until
            the analysis step has been observed.
          examples:
            - '2026-06-17T12:00:00Z'
          type: string
        reportDetails:
          description: >-
            Details for the counterparty PSP's analysis; present when the
            situation type carries one
          type: string
        reportStatus:
          description: >-
            BACEN report delivery state. Always SENT at rest (a resource row is
            persisted only once BACEN has confirmed it; a rejected or ambiguous
            attempt creates no row).
          examples:
            - SENT
          type: string
        reporterParticipant:
          description: >-
            ISPB of the participant that reported this funds recovery — our own
            configured value, the same one createFundsRecovery sends as
            Participant. This is a LOCAL value, distinct from
            bacenReporterParticipant below.
          examples:
            - '12345678'
          type: string
        rootTransactionId:
          description: >-
            Identifier of the contested transaction: the originating fraudulent
            payment's EndToEndID (pacs.008, E-prefixed) or the contested return
            operation's RtrId (pacs.004, D-prefixed — a contestação de transação
            de devolução), projected verbatim
          examples:
            - E12345678202607101200B3C4D5E6F7A
          type: string
        situationType:
          description: MED 2.0 situation classification
          examples:
            - SCAM
          type: string
        status:
          description: >-
            Local funds-recovery lifecycle state: CREATED, TRACKED,
            AWAITING_ANALYSIS, ANALYSED, REFUNDING, COMPLETED, or CANCELLED.
            This is a LOCAL view: TRACKED is representable but this rail has no
            producer for it, so it never appears in practice.
          examples:
            - CREATED
          type: string
        updatedAt:
          description: Last update timestamp (RFC 3339, UTC)
          examples:
            - '2026-06-14T12:00:00Z'
          type: string
      required:
        - id
        - rootTransactionId
        - situationType
        - status
        - reportStatus
        - reporterParticipant
        - createdAt
        - updatedAt
      type: object
    Detail:
      additionalProperties: false
      properties:
        code:
          description: >-
            Stable, machine-readable domain error code scoped to the emitting
            service (format: <SERVICE>-NNNN).
          type: string
        correlationId:
          description: Request-scoped correlation identifier echoing X-Request-ID.
          examples:
            - req-7a3f9c2e
          type: string
        detail:
          description: >-
            A human-readable explanation specific to this occurrence of the
            problem.
          examples:
            - Property foo is required but is missing.
          type: string
        errors:
          description: Optional list of individual error details
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type:
            - array
            - 'null'
        instance:
          description: >-
            A URI reference that identifies the specific occurrence of the
            problem.
          examples:
            - https://example.com/error-log/abc123
          format: uri
          type: string
        status:
          description: HTTP status code
          examples:
            - 400
          format: int64
          type: integer
        title:
          description: >-
            A short, human-readable summary of the problem type. This value
            should not change between occurrences of the error.
          examples:
            - Bad Request
          type: string
        type:
          default: about:blank
          description: A URI reference to human-readable documentation for the error.
          examples:
            - https://example.com/errors/example
          format: uri
          type: string
        upstream:
          $ref: '#/components/schemas/Upstream'
          description: >-
            RFC 9457 extension member: the error a proxied third-party provider
            reported. Absent unless the emitting service explicitly surfaced
            one.
      required:
        - correlationId
      type: object
    BACENEnvelopeResponse:
      additionalProperties: false
      properties:
        correlationId:
          description: >-
            BACEN's own correlation identifier for its most recent interaction
            on this record — the wire value, distinct from any request-scoped
            echo.
          examples:
            - a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4
          type: string
        lastModified:
          description: >-
            BACEN's own LastModified for this resource (RFC 3339, UTC) — the
            version this response reflects; present only on the MED resources
            (infraction, refund, fraud marker, funds recovery).
          examples:
            - '2026-06-14T12:00:00Z'
          type: string
        responseTime:
          description: >-
            Instant BACEN answered its most recent interaction on this record,
            RFC 3339 (UTC); omitted when BACEN's response carried no parseable
            instant.
          examples:
            - '2026-06-14T12:00:00Z'
          type: string
      required:
        - correlationId
      type: object
    ContactInformationResponse:
      additionalProperties: false
      properties:
        email:
          description: Regulator-facing contact email
          examples:
            - compliance@participant.example
          type: string
        phone:
          description: Regulator-facing contact phone
          examples:
            - '+5511999999999'
          type: string
      required:
        - email
        - phone
      type: object
    ErrorDetail:
      additionalProperties: false
      properties:
        location:
          description: >-
            Where the error occurred, e.g. 'body.items[3].tags' or
            'path.thing-id'
          type: string
        message:
          description: Error message text
          type: string
        value:
          description: The value at the given location
      type: object
    Upstream:
      additionalProperties: false
      properties:
        code:
          description: The upstream provider's own error code, verbatim.
          examples:
            - E4001
          type: string
        message:
          description: >-
            The upstream provider's own error message, verbatim (bounded, never
            its raw response body).
          examples:
            - account not found at provider
          type: string
      type: object
  securitySchemes:
    BearerAuth:
      bearerFormat: JWT
      description: JWT bearer token issued by the identity provider.
      scheme: bearer
      type: http

````