> ## 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 reconciliation job

> Re-drives one reconciliation job that is stuck or has failed. A `FAILED` or `REQUIRES_MANUAL_REVIEW` job gets a new job of the same type in `PENDING`, linked by `sourceJobId`, and the original job stays unchanged. A `FINALIZING` job returns to `IN_PROGRESS`, and any other non-terminal job returns to `PENDING`, once it has gone without an update for longer than the deadline of its status. A Flow A sync-verification job in `IN_PROGRESS` is refused with `409` (`PIX-0155`) until it fails. A file reconciliation that still waits for its file requests a new one, which uses a CID-file request. A `PENDING` or `COMPLETED` job is refused with `409` (`PIX-0155`), and so is a job whose status differs from `expectedStatus`. The `409` does not name the current status: read it with List reconciliation jobs. Send an `X-Idempotency` key and a `reason`: every call is recorded in an audit log. The `vsync-admin` permission comes only from the DICT Hub permission declaration, which is off until you turn it on in BYOC.



## OpenAPI

````yaml /pt/openapi/v3-current/pix-lerian-dict.yaml post /vsync/jobs/{job_id}/actions/retry
openapi: 3.1.0
info:
  contact:
    name: Lerian Studio
    url: https://lerian.studio
  description: >-
    Public API for Pix keys, claims, fraud markers, infraction reports, and MED
    funds recovery.
  license:
    name: Lerian Studio General License
  title: Pix Lerian — DICT
  version: 1.4.0
servers:
  - url: https://api.example.com/dict-hub/v1
    description: >-
      Replace the example host with the URL provided during environment
      onboarding.
security:
  - BearerAuth: []
tags:
  - description: Manage ownership and portability claims for Pix keys.
    name: Claims
  - description: Register, retrieve, list, update, and remove Pix keys.
    name: Entries
  - description: Create, query, list, and cancel DICT fraud markers.
    name: Fraud Markers
  - description: Manage participant-scoped MED 2.0 funds recoveries.
    name: Funds Recoveries
  - description: Manage MED 2.0 infraction reports for the authenticated organization.
    name: Infraction Reports
  - description: Look up Pix keys and check whether keys exist in the DICT directory.
    name: Keys
  - description: Create, query, cancel, and settle MED 2.0 refunds.
    name: Refunds
  - description: >-
      Read the state of key reconciliation against BACEN, and start a
      verification or a file reconciliation.
    name: VSync
paths:
  /vsync/jobs/{job_id}/actions/retry:
    post:
      tags:
        - VSync
      summary: Retry a reconciliation job
      description: >-
        Re-drives one reconciliation job that is stuck or has failed. A `FAILED`
        or `REQUIRES_MANUAL_REVIEW` job gets a new job of the same type in
        `PENDING`, linked by `sourceJobId`, and the original job stays
        unchanged. A `FINALIZING` job returns to `IN_PROGRESS`, and any other
        non-terminal job returns to `PENDING`, once it has gone without an
        update for longer than the deadline of its status. A Flow A
        sync-verification job in `IN_PROGRESS` is refused with `409`
        (`PIX-0155`) until it fails. A file reconciliation that still waits for
        its file requests a new one, which uses a CID-file request. A `PENDING`
        or `COMPLETED` job is refused with `409` (`PIX-0155`), and so is a job
        whose status differs from `expectedStatus`. The `409` does not name the
        current status: read it with List reconciliation jobs. Send an
        `X-Idempotency` key and a `reason`: every call is recorded in an audit
        log. The `vsync-admin` permission comes only from the DICT Hub
        permission declaration, which is off until you turn it on in BYOC.
      operationId: retryReconciliationJob
      parameters:
        - description: Reconciliation job to retry (UUID)
          in: path
          name: job_id
          required: true
          schema:
            description: Reconciliation job to retry (UUID)
            examples:
              - 019606a1-3b4c-7d8e-9f01-234567890abc
            type: string
        - description: >-
            REQUIRED. Client-supplied replay key, at most 64 bytes. A request
            without it is refused with PIX-0030 @ 400 before the handler runs.
            Replaying the same key with a divergent request is PIX-0031 @ 412 --
            at the edge for one hour, and permanently thereafter from the
            administrative audit record.
          in: header
          name: X-Idempotency
          required: true
          schema:
            description: >-
              REQUIRED. Client-supplied replay key, at most 64 bytes. A request
              without it is refused with PIX-0030 @ 400 before the handler runs.
              Replaying the same key with a divergent request is PIX-0031 @ 412
              -- at the edge for one hour, and permanently thereafter from the
              administrative audit record.
            examples:
              - a1b2c3d4-0000-0000-0000-000000000001
            type: string
      requestBody:
        content:
          application/json:
            example:
              expectedStatus: FAILED
              reason: >-
                BACEN CID file request wedged after a pod restart;
                reconciliation window closes at 18:00
            schema:
              $ref: '#/components/schemas/RetryReconciliationJobBody'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RetryReconciliationJobOutput'
          description: >-
            The retry was applied, or an identical X-Idempotency replay returned
            the outcome of the first request. sourceJobId is present only when
            the retry created a new job from a terminal one.
        '400':
          content:
            application/json:
              example:
                code: PIX-0030
                title: Idempotency Key Required
                message: >-
                  The X-Idempotency header is required for this operation and
                  must be within the accepted length.
              schema:
                $ref: '#/components/schemas/LegacyErrorEnvelope'
            application/problem+json:
              example:
                type: https://errors.lerian.studio/v1/PIX-0002
                title: Bad Request
                status: 400
                detail: Your request is missing one or more required fields.
                code: PIX-0002
              schema:
                $ref: '#/components/schemas/Detail'
          description: >-
            X-Idempotency absent or longer than 64 bytes (PIX-0030). Legacy
            {code,title,message} envelope, NOT problem+json. Bad Request
            (PIX-0002, PIX-0003, PIX-0157). Route-guard refusals (PIX-0010)
            answer in the legacy {code,title,message} envelope too.
        '401':
          description: >-
            Missing, malformed or expired bearer token, refused ahead of this
            operation by the authorization middleware in the legacy
            {code,title,message} envelope over application/json, with the
            generic client-error code PIX-0010. In a multi-tenant deployment the
            tenant middleware refuses a token it cannot read, or one with no
            usable tenantId claim, in the same shape with a code outside the
            PIX-NNNN catalogue: MISSING_TOKEN, INVALID_TOKEN, MISSING_TENANT or
            INVALID_TENANT. Branch on the status, not the body code.
        '403':
          description: >-
            The token lacks the permission this operation's resource and action
            require, refused ahead of it by the authorization middleware in the
            legacy {code,title,message} envelope over application/json, with the
            generic client-error code PIX-0010. The tenant middlewares also
            answer 403 with a code outside the PIX-NNNN catalogue:
            TENANT_SUSPENDED or TENANT_ACCESS_DENIED in a multi-tenant
            deployment, in the same shape, and TENANT_CONFIG_NOT_FOUND, in a
            {code,message} body, when the tenant's configuration cannot be
            resolved. Branch on the status, not the body code.
        '404':
          content:
            application/json:
              example:
                code: TENANT_NOT_FOUND
                title: Tenant Not Found
                message: 'tenant not found: 019606a1-3b4c-7d8e-9f01-234567890abc'
              schema:
                $ref: '#/components/schemas/LegacyErrorEnvelope'
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: >-
            No reconciliation job with this id exists within the tenant resolved
            from your token (PIX-0152). A job owned by another organization
            answers the same way, by design. The middleware ahead of this
            operation answers this status too (see default), in the legacy
            {code,title,message} envelope over application/json, NOT
            problem+json.
        '409':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: >-
            The job is not in a retryable state, is still within its status
            deadline, or expectedStatus disagrees with the stored row
            (PIX-0155); or the retry would have created a successor while
            another job is already active for the same scope (PIX-0156). Neither
            body names the job's CURRENT status -- see the operation
            description.
        '412':
          content:
            application/json:
              example:
                code: PIX-0031
                title: Idempotency Key Conflict
                message: >-
                  The X-Idempotency header is held by a request still running or
                  whose receipt could not be stored, or was already used with a
                  different request.
              schema:
                $ref: '#/components/schemas/LegacyErrorEnvelope'
            application/problem+json:
              example:
                type: https://errors.lerian.studio/v1/PIX-0031
                title: Precondition Failed
                status: 412
                detail: >-
                  The X-Idempotency header is held by a request still running or
                  whose receipt could not be stored, or was already used with a
                  different request.
                code: PIX-0031
              schema:
                $ref: '#/components/schemas/Detail'
          description: >-
            Refused under this X-Idempotency (PIX-0031): the first request under
            it is still running (with Retry-After: 1), its receipt could not be
            stored and the key is held for the hour, or the request differs from
            the first (method, URL, body, or identity header among X-Account-Id
            / X-Reason / X-End-To-End-Id). An earlier request under this key may
            already have executed. Legacy {code,title,message} envelope, NOT
            problem+json. Precondition Failed (PIX-0031).
        '413':
          content:
            application/json:
              example:
                code: PIX-0034
                title: Payload Too Large
                message: >-
                  The request body exceeds the maximum size allowed for this
                  operation.
              schema:
                $ref: '#/components/schemas/LegacyErrorEnvelope'
          description: >-
            A body over this operation's 8 KiB limit (PIX-0034); a body over the
            server's 4 MiB limit answers 413 PIX-0010. Route-guard refusals
            (PIX-0034) answer in the legacy {code,title,message} envelope over
            application/json, NOT problem+json.
        '415':
          content:
            application/json:
              example:
                code: PIX-0016
                title: Unsupported Media Type
                message: >-
                  The request body must be sent with Content-Type:
                  application/json.
              schema:
                $ref: '#/components/schemas/LegacyErrorEnvelope'
          description: >-
            The non-empty request body is missing an accepted JSON Content-Type
            (PIX-0016), answered in the legacy {code,title,message} envelope
            over application/json, NOT problem+json.
        '500':
          content:
            application/json:
              example:
                code: PIX-0000
                title: Internal Server Error
                message: >-
                  The server encountered an unexpected error. Please try again
                  later.
              schema:
                $ref: '#/components/schemas/LegacyErrorEnvelope'
            application/problem+json:
              example:
                type: https://errors.lerian.studio/v1/PIX-0000
                title: Internal Server Error
                status: 500
                detail: internal error
                code: PIX-0000
              schema:
                $ref: '#/components/schemas/Detail'
          description: >-
            Internal Server Error (PIX-0000). The middleware ahead of this
            operation answers this status too (see default), in the legacy
            {code,title,message} envelope over application/json, NOT
            problem+json.
        '503':
          content:
            application/json:
              example:
                code: PIX-0032
                title: Idempotency Unavailable
                message: >-
                  The request was not processed because the idempotency store is
                  unavailable. Please retry.
              schema:
                $ref: '#/components/schemas/LegacyErrorEnvelope'
          description: >-
            Replay store unavailable on this fail-closed route, so the mutation
            was refused rather than executed without replay protection
            (PIX-0032). Legacy {code,title,message} envelope, NOT problem+json.
        default:
          content:
            application/json:
              example:
                code: PIX-0000
                title: Internal Server Error
                message: >-
                  The server encountered an unexpected error. Please try again
                  later.
              schema:
                $ref: '#/components/schemas/LegacyErrorEnvelope'
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: >-
            Error. Middleware ahead of this operation also refuses in the legacy
            {code,title,message} envelope over application/json: a body over the
            server's 4 MiB limit with 413 PIX-0010; a query value holding the
            NUL character (%00) or invalid UTF-8 with 400 PIX-0020; the Access
            Manager unavailable (503) or timing out (504) with PIX-0000; and, in
            a multi-tenant deployment, the tenant middleware with 404
            TENANT_NOT_FOUND, 500 TENANT_DB_ERROR, 503
            TENANT_MANAGER_UNAVAILABLE or SERVICE_UNAVAILABLE, and 504
            TENANT_MANAGER_TIMEOUT. Branch on the status; these middleware 503
            and 504 refusals are retryable. Any operation that uses the database
            also answers 503 PIX-0062 when its Postgres connection is lost; that
            request may or may not have been processed, so repeat it only as
            this operation's own guidance for an unknown outcome allows.
components:
  schemas:
    RetryReconciliationJobBody:
      additionalProperties: false
      properties:
        expectedStatus:
          description: >-
            Status the caller believes the job currently carries. The retry is
            refused with 409 PIX-0155 if the stored row disagrees, so this field
            is what makes the operation safe against a job that moved since it
            was read.
          examples:
            - FAILED
          type: string
        reason:
          description: >-
            Operator justification for the intervention. Recorded permanently in
            the administrative audit log and read by humans during an audit; no
            code branches on it.
          examples:
            - >-
              BACEN CID file request wedged after a pod restart; reconciliation
              window closes at 18:00
          type: string
      required:
        - expectedStatus
        - reason
      type: object
    RetryReconciliationJobOutput:
      additionalProperties: false
      properties:
        jobId:
          description: >-
            The job that will now run: the re-driven job for an in-place retry,
            or the newly created job when the retried one was terminal.
          examples:
            - 019606a1-3b4c-7d8e-9f01-234567890abc
          type: string
        previousStatus:
          description: Status the retried job carried immediately before this action.
          examples:
            - FAILED
          type: string
        sourceJobId:
          description: >-
            The terminal job this retry created a successor from. Absent when
            the retry re-drove the job in place.
          examples:
            - 019606a1-3b4c-7d8e-9f01-2345678909fe
          type: string
        status:
          description: >-
            Status the retry left behind: the status the job was moved to, or
            PENDING for a newly created successor.
          examples:
            - PENDING
          type: string
      required:
        - jobId
        - previousStatus
        - status
      type: object
    LegacyErrorEnvelope:
      additionalProperties: false
      properties:
        code:
          description: PIX-XXXX error code
          type: string
        message:
          description: Human-readable error message
          type: string
        title:
          description: Short error title
          type: string
        fields:
          additionalProperties:
            type: string
          description: Per-field detail, keyed by the field or header the refusal names
          type: object
        headers:
          additionalProperties:
            type: string
          description: Per-header detail, keyed by the request header the refusal names
          type: object
      required:
        - code
        - title
        - message
      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.