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

# Stop a Mensageria permanent block by hand

> A platform administrator stops a permanent block that came through the Mensageria and keeps capturing credits after the court stopped it. It closes the permanent INTERRUPTED and reports the close to the Mensageria once; what was captured stays blocked and still goes to the court, and no money is released. The stop cannot be undone and the permanent cannot be reopened: orderId is the original BLOQUEIO's, never the INTERRUPT's. 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 close and its audit row commit in one transaction. 200 outcome STOPPED: closed now. 200 outcome NOOP: already closed (closeReason and closedAt are the existing close's, even when an expiry or the court's interrupt came an instant before). 400: orderId is not a valid UUID. 404: unknown order, not a permanent, not opened yet, or of an institution this executor does not own. 409 SBJ-0067: DIRECT_PERMANENT (a direct permanent stops through the institution's INTERRUPT on the direct channel) or ORDER_BUSY (retry). 422 SBJ-0052: the reason is missing, longer than 200 characters or carries personal data. 503: not available in this deployment.



## OpenAPI

````yaml /en/openapi/v3-current/sisbajud-executor.yaml post /v1/admin/executor/orders/{orderId}/permanent-block/stop
openapi: 3.1.0
info:
  description: >-
    API for Plugin SISBAJUD, which runs judicial orders on Midaz. It covers
    institution and Midaz connector configuration, orders that need attention,
    ledger-routing checks and audit verification.
  title: Plugin SISBAJUD 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: 'Admin API: audit-trail integrity verification.'
    name: Admin
paths:
  /v1/admin/executor/orders/{orderId}/permanent-block/stop:
    post:
      tags:
        - Executor
      summary: Stop a Mensageria permanent block by hand
      description: >-
        A platform administrator stops a permanent block that came through the
        Mensageria and keeps capturing credits after the court stopped it. It
        closes the permanent INTERRUPTED and reports the close to the Mensageria
        once; what was captured stays blocked and still goes to the court, and
        no money is released. The stop cannot be undone and the permanent cannot
        be reopened: orderId is the original BLOQUEIO's, never the INTERRUPT's.
        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 close and its audit row commit in one transaction.
        200 outcome STOPPED: closed now. 200 outcome NOOP: already closed
        (closeReason and closedAt are the existing close's, even when an expiry
        or the court's interrupt came an instant before). 400: orderId is not a
        valid UUID. 404: unknown order, not a permanent, not opened yet, or of
        an institution this executor does not own. 409 SBJ-0067:
        DIRECT_PERMANENT (a direct permanent stops through the institution's
        INTERRUPT on the direct channel) or ORDER_BUSY (retry). 422 SBJ-0052:
        the reason is missing, longer than 200 characters or carries personal
        data. 503: not available in this deployment.
      operationId: stop-executor-mensageria-permanent-block
      parameters:
        - description: >-
            The identifier of the original BLOQUEIO order of the Mensageria
            permanent (UUID), never the INTERRUPT's.
          in: path
          name: orderId
          required: true
          schema:
            description: >-
              The identifier of the original BLOQUEIO order of the Mensageria
              permanent (UUID), never the INTERRUPT's.
            examples:
              - 0b9b7c2e-4f8a-4d3e-9a51-7c2d1e0f3a44
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PermanentBlockStopRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PermanentBlockStopResponse'
          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:
    PermanentBlockStopRequest:
      additionalProperties: false
      properties:
        reason:
          description: >-
            Required. Short justification or ticket (at most 200 characters, no
            personal data). Never echoed.
          examples:
            - 'OPS-4512: court stop received by the client''s operator.'
          type: string
      type: object
    PermanentBlockStopResponse:
      additionalProperties: false
      properties:
        closeReason:
          description: INTERRUPTED on STOPPED; on NOOP the reason of the existing close.
          enum:
            - TARGET_REACHED
            - EXPIRED
            - RELEASED
            - CANCELLED
            - INTERRUPTED
          type: string
        closedAt:
          description: >-
            Instant of the close (UTC): this stop's on STOPPED, the earlier
            close's on NOOP.
          format: date-time
          type: string
        orderId:
          description: The BLOQUEIO order's identifier.
          type: string
        outcome:
          description: >-
            STOPPED: closed now. NOOP: it was already closed, nothing changed
            and nothing was reported again.
          enum:
            - STOPPED
            - NOOP
          type: string
        status:
          description: Always CLOSED.
          enum:
            - CLOSED
          type: string
        stoppedAt:
          description: Instant of the request (UTC).
          format: date-time
          type: string
        stoppedBy:
          description: Subject of the platform administrator who made the request.
          type: string
      required:
        - orderId
        - outcome
        - status
        - closeReason
        - closedAt
        - stoppedBy
        - stoppedAt
      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
    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.