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

# Resolve a parked DIRECT permanent attempt

> The audited resolution of a PARKED DIRECT permanent block attempt (its reactive write failed every retry, or its window passed, so its block account holds every new credit) of a single-tenant deployment (multi-tenant: 422 SBJ-0053). Declaring no effect releases the account: credits resume and the open-order probe lets the order go; the attempt stays FAILED. Acknowledging the effect journals movedAmount as the write's landed effect: it is added to the permanent's accumulated amount (the next credit blocks only the remainder; reaching the target closes the block) and the attempt becomes BLOCKED with its result. On a permanent already CLOSED the attempt is SKIPPED_CLOSED, nothing reopens, and closed_with_effect is alarmed. A human platform-administrator action (executor_human_decision:resolve): an application token (SBJ-0044) or a tenant-carrying token (SBJ-0045) is refused with 403. The journal rows, the attempt and the audit row commit in one transaction. 200 outcome NOOP: the same resolution was already journaled. 404: unknown attempt, or one of an institution this executor does not own. 409 SBJ-0061: not parked, or the order is busy. 409 SBJ-0054: the journal shows money moved. 409 SBJ-0055: already resolved as no effect. 422 SBJ-0052: invalid request (the reason is named in the answer, e.g. LEG_ALLOCATION_REQUIRED). 422 SBJ-0062: movedAmount above the cap.



## OpenAPI

````yaml /en/openapi/v3-current/sisbajud-executor.yaml post /v1/admin/executor/orders/{orderId}/permanent-attempts/{attemptId}/resolution
openapi: 3.1.0
info:
  description: >-
    API for the Lerian SISBAJUD executor, which runs judicial orders on Midaz.
    It covers institution and Midaz connector configuration, orders that need
    attention, ledger-routing checks, credential key rotation and audit
    verification.
  title: Lerian SISBAJUD Executor API
  version: 1.0.0
servers:
  - url: https://api.example.com
    description: >-
      Replace the example host with the URL provided during environment
      onboarding.
security:
  - BearerAuth: []
tags:
  - description: >-
      Institution configuration lifecycle: create (with key provisioning), read,
      and partial update of a connector configuration addressed by institution
      id.
    name: Institution
  - description: >-
      Rotation of the key that wraps an institution's stored connector
      credentials, addressed by institution id.
    name: Security
  - description: 'Admin API: audit-trail integrity verification.'
    name: Admin
paths:
  /v1/admin/executor/orders/{orderId}/permanent-attempts/{attemptId}/resolution:
    post:
      tags:
        - Executor
      summary: Resolve a parked DIRECT permanent attempt
      description: >-
        The audited resolution of a PARKED DIRECT permanent block attempt (its
        reactive write failed every retry, or its window passed, so its block
        account holds every new credit) of a single-tenant deployment
        (multi-tenant: 422 SBJ-0053). Declaring no effect releases the account:
        credits resume and the open-order probe lets the order go; the attempt
        stays FAILED. Acknowledging the effect journals movedAmount as the
        write's landed effect: it is added to the permanent's accumulated amount
        (the next credit blocks only the remainder; reaching the target closes
        the block) and the attempt becomes BLOCKED with its result. On a
        permanent already CLOSED the attempt is SKIPPED_CLOSED, nothing reopens,
        and closed_with_effect is alarmed. A human platform-administrator action
        (executor_human_decision:resolve): an application token (SBJ-0044) or a
        tenant-carrying token (SBJ-0045) is refused with 403. The journal rows,
        the attempt and the audit row commit in one transaction. 200 outcome
        NOOP: the same resolution was already journaled. 404: unknown attempt,
        or one of an institution this executor does not own. 409 SBJ-0061: not
        parked, or the order is busy. 409 SBJ-0054: the journal shows money
        moved. 409 SBJ-0055: already resolved as no effect. 422 SBJ-0052:
        invalid request (the reason is named in the answer, e.g.
        LEG_ALLOCATION_REQUIRED). 422 SBJ-0062: movedAmount above the cap.
      operationId: resolve-executor-parked-permanent-attempt
      parameters:
        - description: The executor order's identifier (UUID).
          in: path
          name: orderId
          required: true
          schema:
            description: The executor order's identifier (UUID).
            examples:
              - 0b9b7c2e-4f8a-4d3e-9a51-7c2d1e0f3a44
            type: string
        - description: The parked permanent attempt's identifier (UUID).
          in: path
          name: attemptId
          required: true
          schema:
            description: The parked permanent attempt's identifier (UUID).
            examples:
              - 1d2e3f40-5a6b-4c7d-8e9f-0a1b2c3d4e5f
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PermanentAttemptResolutionRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PermanentAttemptResolutionResponse'
          description: OK
        '400':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          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
        '413':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Request Entity Too Large
        '422':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Unprocessable Entity
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          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
components:
  schemas:
    PermanentAttemptResolutionRequest:
      additionalProperties: false
      properties:
        allocation:
          description: >-
            Optional per-leg allocation of movedAmount: required when a partial
            amount of a write of several origin legs is acknowledged (422
            SBJ-0052, LEG_ALLOCATION_REQUIRED); it must name the write's own
            legs once each, each at most its amount, summing to movedAmount
            (LEG_ALLOCATION_INVALID).
          items:
            $ref: '#/components/schemas/PermanentAttemptLeg'
          type:
            - array
            - 'null'
        ledgerEvidence:
          $ref: '#/components/schemas/HumanDecisionLedgerEvidence'
          description: >-
            Required: a parked write is uncertain by definition. Its kind is
            transaction on effect-acknowledged (the reference is journaled as
            the ledger transaction). observedAt must not be before the attempt's
            write. Stored only in the sealed audit row.
        movedAmount:
          description: >-
            Required with effect-acknowledged, refused otherwise: the decimal
            amount above zero the write moved. At most the permanent's remaining
            while it is open, at most the write's journaled amount always (422
            SBJ-0062). Never echoed, logged nor audited.
          examples:
            - '30.00'
          type: string
        reason:
          description: >-
            Required. Short justification or ticket (at most 200 characters, no
            personal data). Never echoed.
          examples:
            - 'OPS-4512: ledger statement reviewed.'
          type: string
        resolution:
          description: >-
            Required. proven-no-effect: the ledger shows the parked write never
            landed; the account is released and new credits resume (the attempt
            stays FAILED). effect-acknowledged: the write landed movedAmount; it
            counts toward the permanent block and the attempt becomes BLOCKED.
          examples:
            - effect-acknowledged
          type: string
      type: object
    PermanentAttemptResolutionResponse:
      additionalProperties: false
      properties:
        attemptId:
          description: The permanent attempt's identifier.
          type: string
        orderId:
          description: The executor order's identifier.
          type: string
        outcome:
          description: >-
            RESOLVED: journaled now. NOOP: the same resolution was already
            journaled; nothing changed.
          enum:
            - RESOLVED
            - NOOP
          type: string
        resolution:
          description: The resolution journaled, as requested.
          type: string
        resolvedAt:
          description: Instant of the request (UTC).
          format: date-time
          type: string
        resolvedBy:
          description: Subject of the platform administrator who made the request.
          type: string
      required:
        - orderId
        - attemptId
        - resolution
        - outcome
        - resolvedBy
        - resolvedAt
      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
    ErrorResponse:
      additionalProperties: false
      properties:
        code:
          type: string
        details:
          additionalProperties: {}
          type: object
        message:
          type: string
        title:
          type: string
      required:
        - code
        - title
        - message
      type: object
    PermanentAttemptLeg:
      additionalProperties: false
      properties:
        accountId:
          description: >-
            Required. Ledger account id of one of the write's origin legs, as
            journaled.
          examples:
            - 0193b2c4-acc1
          type: string
        amount:
          description: >-
            Required. Decimal above zero moved from that leg, at most its
            journaled amount.
          examples:
            - '10.00'
          type: string
      type: object
    HumanDecisionLedgerEvidence:
      additionalProperties: false
      properties:
        kind:
          description: >-
            Required. What the reference points to: transaction (a ledger
            transaction) or balance (a balance query).
          examples:
            - transaction
          type: string
        observedAt:
          description: >-
            Required. RFC 3339 date-time at which the ledger was read: at most 2
            minutes ahead of the server clock, and not before the revision's
            latest moved-needs-human request (otherwise 422 SBJ-0052).
          examples:
            - '2026-10-29T11:30:00Z'
          type: string
        reference:
          description: >-
            Required. Opaque reference to the ledger query: 1 to 128 characters
            of letters, digits and . _ : / -, starting with a letter or digit,
            with at least one letter. No spaces, no amounts, no personal data
            (CPF, CNPJ, judicial process numbers).
          examples:
            - midaz-tx-3f9a1c7e
          type: string
      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.