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

# Retry a stalled outbound transfer

> Re-enqueues a non-terminal outbound transfer subject to the attempt-budget and protocol-TTL guards.



## OpenAPI

````yaml /pt/openapi/v3-current/sta.yaml post /v1/transfers/{id}/retry
openapi: 3.1.0
info:
  description: >-
    API for Lerian STA — the participant-side rail that connects the institution
    to Banco Central do Brasil's STA (Sistema de Transferencia de Arquivos)
    file-exchange system. It covers outbound and inbound file transfers, BACEN
    credential management, and inbound source polling configuration.
  title: Lerian STA API
  version: v1.2.0
servers:
  - url: https://api.example.com
    description: >-
      Replace the example host with the URL provided during environment
      onboarding.
security:
  - BearerAuth: []
paths:
  /v1/transfers/{id}/retry:
    post:
      tags:
        - transfers
      summary: Retry a stalled outbound transfer
      description: >-
        Re-enqueues a non-terminal outbound transfer subject to the
        attempt-budget and protocol-TTL guards.
      operationId: retryTransfer
      parameters:
        - description: Transfer UUID
          in: path
          name: id
          required: true
          schema:
            description: Transfer UUID
            examples:
              - 018f3b2a-0c1d-7a2b-9e4f-1a2b3c4d5e6f
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransferView'
          description: OK
        '422':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Unprocessable Entity
        '500':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Internal Server Error
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Error
      security:
        - BearerAuth: []
components:
  schemas:
    TransferView:
      additionalProperties: false
      properties:
        bytesDownloaded:
          format: int64
          type: integer
        bytesUploaded:
          format: int64
          type: integer
        createdAt:
          format: date-time
          type: string
        credentialId:
          type: string
        currentState:
          type: string
        currentStateCode:
          format: int64
          type: integer
        direction:
          type: string
        documentCode:
          description: >-
            BACEN identifier for the same document (6002). Its provenance
            differs by direction: on an inbound transfer it is OBSERVED — the
            <CodigoDocumento> BACEN delivered — while on an outbound transfer it
            is DERIVED from the CURRENT de-para table at read time — it is what
            that table resolves the mnemonic to today, NOT a persisted record of
            the identifier that went on the wire. The two coincide while the
            table is unchanged; if an entry is ever corrected, this field
            answers the new value for an old transfer. The identifier actually
            sent is recorded in the log line and, on a BACEN rejection, in the
            terminal reason. Treat it as an opaque token, not a number: some
            documents resolve to a non-numeric identifier (ARQTEST resolves to
            TEST). Omitted entirely when neither source resolves it, which is a
            valid state for an outbound document type absent from the table — an
            empty string is never published, because it would be
            indistinguishable from a genuinely empty code.
          type: string
        documentType:
          description: >-
            Document type in the MNEMONIC vocabulary (ACCS002) whenever it is
            known. Outbound: always the mnemonic the caller supplied, unchanged.
            Inbound: the mnemonic BACEN sent in <Arquivo><TipoArquivo>,
            published only when the de-para table agrees it names the code that
            arrived with it. ⚠️ Inbound transfers created before this field was
            recorded — and BACEN's legacy query envelopes, which omit the
            element — have no mnemonic stored and are NOT backfilled: those rows
            answer with the numeric code here, the same value they have always
            returned. Compare against documentCode to tell the two vocabularies
            apart.
          type: string
        errorCode:
          type: string
        expired:
          type: boolean
        expiresAt:
          format: date-time
          type: string
        fileName:
          type: string
        fileRef:
          type: string
        fileSizeBytes:
          format: int64
          type: integer
        hashMismatchAttempts:
          description: >-
            Inbound only: count of downloads whose SHA-256 did not match
            BACEN's, driving the Inconsistent terminal. null for outbound
            transfers.
          format: int64
          type:
            - integer
            - 'null'
        id:
          type: string
        lastTransitError:
          type: string
        originProtocolNumber:
          type: string
        protocolGeneratedAt:
          format: date-time
          type: string
        protocolNumber:
          type: string
        secondsRemaining:
          format: int64
          type: integer
        sourceProduct:
          type: string
        transmissionAttempts:
          description: >-
            Inbound only: count of non-hash download failures, driving the
            Canceled / DOWNLOAD_FAILED terminal. null for outbound transfers.
          format: int64
          type:
            - integer
            - 'null'
        updatedAt:
          format: date-time
          type: string
        uploadAttempts:
          description: >-
            Count of FAILED outbound transmission attempts, and the value the
            retry budget consumes: the worker stops retrying once it reaches 5.
            It counts failures, not attempts, so a transfer that succeeded on
            the first try reports 0. null for inbound transfers, which have no
            upload leg.
          format: int64
          type:
            - integer
            - 'null'
        urgentRequestedAt:
          format: date-time
          type: string
      required:
        - id
        - direction
        - credentialId
        - documentType
        - fileName
        - fileSizeBytes
        - bytesUploaded
        - bytesDownloaded
        - currentState
        - currentStateCode
        - uploadAttempts
        - hashMismatchAttempts
        - transmissionAttempts
        - createdAt
        - updatedAt
        - secondsRemaining
        - expired
      type: object
    Detail:
      additionalProperties: true
      properties:
        code:
          description: >-
            Stable, machine-readable domain error code scoped to the emitting
            service (format: <SERVICE>-NNNN).
          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.
      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

````

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