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

# Regulatory deadlines (30/60/60 min): distribution and items at risk

> Report of the three regulatory deadlines of the day:

| Metric | Measures | Limit |
|---|---|---|
| `debitToSubmit` | Debit hold → send to the STR (outgoing TEDs) | 30 min |
| `settlementToCredit` | Interbank settlement → credit to the customer (incoming TEDs) | 60 min |
| `settlementToReturn` | Interbank settlement → send of the return | 60 min |

For each metric: the 50/95/99 percentiles, the violations, and, for today, the open items at risk (`atRisk`, up to 100). Give `date` for a past day.



## OpenAPI

````yaml /en/openapi/v3-current/ted-lerian.yaml get /v1/operations/sla
openapi: 3.1.0
info:
  description: >-
    API of **TED Lerian**, the interface over Lerian SPB. Your institution uses
    it to send TEDs, make internal transfers, track incoming TEDs, and operate
    returns, queues, and policy on its Midaz ledger. The [API
    overview](/en/reference/interfaces/ted-lerian/ted-lerian-api-overview) gives
    the concepts, the roles, and the conventions.
  title: TED Lerian API
  version: v1.0.0
servers:
  - url: https://api.example.com
    description: >-
      Replace the example host with the URL provided during environment
      onboarding.
security:
  - BearerAuth: []
tags:
  - description: >-
      Outgoing TEDs and internal transfers: fee quote, creation, query,
      timeline, and cancellation. Every integration starts here.
    name: Transfers
  - description: >-
      Incoming TEDs from other institutions: query, timeline, and operator
      actions (full return and manual review resolution).
    name: Incoming Transfers
  - description: >-
      STR participant list, to resolve COMPE code ↔ ISPB and validate the
      destination bank before you create a transfer.
    name: Participants
  - description: >-
      Back office: operations queue, inconsistency findings between the ledger
      and the STR, reviews of rail facts, held returns, and manual unblock with
      evidence.
    name: Reconciliation
  - description: >-
      Operations dashboard: daily aggregates, regulatory deadlines (30/60/60
      min), and the closing balance that the STR reported.
    name: Operations
  - description: >-
      Institution configuration (editor): operating window and cut-off, usage
      limits, holiday calendar, and ISPB → organization bindings.
    name: Policy
paths:
  /v1/operations/sla:
    get:
      tags:
        - Operations
      summary: 'Regulatory deadlines (30/60/60 min): distribution and items at risk'
      description: >-
        Report of the three regulatory deadlines of the day:


        | Metric | Measures | Limit |

        |---|---|---|

        | `debitToSubmit` | Debit hold → send to the STR (outgoing TEDs) | 30
        min |

        | `settlementToCredit` | Interbank settlement → credit to the customer
        (incoming TEDs) | 60 min |

        | `settlementToReturn` | Interbank settlement → send of the return | 60
        min |


        For each metric: the 50/95/99 percentiles, the violations, and, for
        today, the open items at risk (`atRisk`, up to 100). Give `date` for a
        past day.
      operationId: getSlaReport
      parameters:
        - description: >-
            Reference date (YYYY-MM-DD); default = today in the institution time
            zone.
          explode: false
          in: query
          name: date
          schema:
            description: >-
              Reference date (YYYY-MM-DD); default = today in the institution
              time zone.
            type: string
        - $ref: '#/components/parameters/XRequestId'
      responses:
        '200':
          content:
            application/json:
              example:
                date: '2026-10-22'
                debitToSubmit:
                  atRisk:
                    - ageSeconds: 1260
                      amount: '1500.00'
                      attempts: 3
                      createdAt: '2026-10-22T13:05:12Z'
                      kind: AWAITING_RECONCILIATION
                      lastAttemptAt: '2026-10-22T13:24:40Z'
                      nuop: '87654321202610220000123'
                      resourceId: 6f1c2b3a-4d5e-4f60-8a9b-0c1d2e3f4a5b
                      resourceType: TRANSFER
                      slaDeadlineAt: '2026-10-22T13:35:13Z'
                      status: AWAITING_RECONCILIATION
                  breaches: 0
                  limitSeconds: 1800
                  p50Seconds: 1.8
                  p95Seconds: 4.2
                  p99Seconds: 9.5
                  sampleCount: 128
                generatedAt: '2026-10-22T18:00:00Z'
                settlementToCredit:
                  atRisk: []
                  breaches: 0
                  limitSeconds: 3600
                  p50Seconds: 5.1
                  p95Seconds: 12
                  p99Seconds: 40.3
                  sampleCount: 330
                settlementToReturn:
                  atRisk: []
                  breaches: 0
                  limitSeconds: 3600
                  p50Seconds: 95
                  p95Seconds: 95
                  p99Seconds: 95
                  sampleCount: 2
              schema:
                $ref: '#/components/schemas/SlaReport'
          description: Report of the regulatory deadlines for the requested date.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
        '400':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Invalid reference date (`TED-0001`).
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
        '401':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: 'Not authenticated: token missing, invalid, or expired (`TED-0070`).'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
        '403':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: >-
            No permission: the token's role does not authorize this action, or
            the product license is not valid for the organization (`TED-0071`).
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
        '422':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: >-
            Parameter outside the declared format (for example, a `date` that is
            not YYYY-MM-DD): framework validation, with no TED code.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
        '500':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: >-
            Unexpected failure (`TED-9000`). If it continues, contact support
            and give the `X-Request-Id` of the response.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
        '503':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Institution configuration missing (`TED-0080`).
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
components:
  parameters:
    XRequestId:
      description: >-
        Correlation identifier of this request (UUID). Optional: when you omit
        it, or when the value is not a well-formed UUID, the platform creates a
        UUID and returns it in the X-Request-Id header of the response. The
        resolved identifier goes to the logs, spans, and audit events of this
        request. Keep it to open a support ticket.
      in: header
      name: X-Request-Id
      schema:
        format: uuid
        type: string
  schemas:
    SlaReport:
      additionalProperties: false
      description: >-
        Report of the three regulatory deadlines of the day: debit → submission
        to the STR (30 min), settlement → credit to the customer (60 min), and
        settlement → return (60 min), with the time distribution, violations,
        and items at risk.
      properties:
        date:
          description: Reference date (YYYY-MM-DD).
          format: date
          type: string
        debitToSubmit:
          $ref: '#/components/schemas/SlaMetric'
          description: Debit → submission to the STR (30 min).
        generatedAt:
          description: Time (UTC) when the report was generated.
          format: date-time
          type: string
        settlementToCredit:
          $ref: '#/components/schemas/SlaMetric'
          description: Settlement → credit to the customer (60 min).
        settlementToReturn:
          $ref: '#/components/schemas/SlaMetric'
          description: Settlement → return (60 min).
      required:
        - date
        - debitToSubmit
        - settlementToCredit
        - settlementToReturn
        - generatedAt
      type: object
    Detail:
      additionalProperties: true
      description: >-
        Standard error body (RFC 9457, `application/problem+json`) for every
        `/v1` operation. Use `code` (TED-NNNN) to handle the error in code,
        `detail` for the readable message, and `errors` for the invalid fields
        of a 422. The `X-Request-Id` of the response identifies the occurrence
        for support.
      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
    SlaMetric:
      additionalProperties: false
      description: >-
        Distribution of a regulatory deadline in the day (percentiles in
        seconds), the number of violations, and the open items at risk.
      properties:
        atRisk:
          description: Open items close to the deadline or already overdue.
          items:
            $ref: '#/components/schemas/ReconciliationQueueItem'
          type: array
        breaches:
          description: Items past the deadline.
          format: int64
          type: integer
        limitSeconds:
          description: Regulatory deadline, in seconds.
          format: int64
          type: integer
        p50Seconds:
          description: 50th percentile of elapsed time, in seconds.
          format: double
          type: number
        p95Seconds:
          description: 95th percentile of elapsed time, in seconds.
          format: double
          type: number
        p99Seconds:
          description: 99th percentile of elapsed time, in seconds.
          format: double
          type: number
        sampleCount:
          description: Number of completed items measured in the day.
          format: int64
          type: integer
      required:
        - limitSeconds
        - sampleCount
        - p50Seconds
        - p95Seconds
        - p99Seconds
        - breaches
        - atRisk
      type: object
    ErrorDetail:
      additionalProperties: false
      description: >-
        An invalid field inside a validation error: where it is (`location`),
        what is wrong (`message`), and the value received.
      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
      description: >-
        Error reported by an upstream system (ledger or rail), when the service
        chooses to expose it. Absent in most errors.
      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
    ReconciliationQueueItem:
      additionalProperties: false
      description: >-
        Operations queue item: an outgoing transfer or an incoming TED that
        waits for confirmation, reconciliation, or a human decision, with its
        age and regulatory deadline for prioritization.
      properties:
        ageSeconds:
          description: >-
            Age of the item, in seconds. When a regulatory deadline runs, the
            age counts from the start of that deadline: the debit hold (debit →
            send) or the interbank settlement in the STR (settlement → credit /
            return). When no deadline runs, the age counts from the entry into
            the current status (the last transition to it; createdAt if there is
            none). It is never negative. It is also the sort key of the queue
            (oldest first).
          format: int64
          minimum: 0
          type: integer
        amount:
          description: Amount (BRL).
          examples:
            - '1500.00'
          pattern: ^(0|[1-9][0-9]{0,11})\.[0-9]{2}$
          type: string
        attempts:
          description: Automatic reconciliation attempts already made.
          format: int64
          minimum: 0
          type: integer
        createdAt:
          description: Timestamp (UTC) of the resource creation.
          format: date-time
          type: string
        kind:
          description: >-
            Queue of the item; IN_FLIGHT for an at-risk item that is not in any
            queue (RESERVED, RECEIVED, RETURN_REQUESTED).
          enum:
            - PENDING_STR
            - AWAITING_RECONCILIATION
            - EXHAUSTED
            - MANUAL_REVIEW
            - IN_FLIGHT
          type: string
        lastAttemptAt:
          description: Time (UTC) of the last attempt.
          format: date-time
          type: string
        nuop:
          description: Unique operation number on the rail (ISPB[8]+AAAAMMDD[8]+SEQ[7])
          pattern: ^[0-9]{23}$
          type: string
        resourceId:
          description: Identifier of the resource (transferId or incomingTransferId).
          format: uuid
          type: string
        resourceType:
          description: TRANSFER (outgoing TED) or INCOMING_TRANSFER (incoming TED).
          enum:
            - TRANSFER
            - INCOMING_TRANSFER
          type: string
        slaDeadlineAt:
          description: Current regulatory deadline (UTC), when there is one.
          format: date-time
          type: string
        status:
          description: >-
            TransferStatus (resourceType=TRANSFER) or IncomingTransferStatus
            (resourceType=INCOMING_TRANSFER).
          type: string
      required:
        - kind
        - resourceType
        - resourceId
        - status
        - ageSeconds
        - createdAt
      type: object
  headers:
    XRequestId:
      description: >-
        Echo of the request X-Request-Id: the value that the client sent, or the
        UUID that the platform generated when the client sent none. Present in
        every response, success or error.
      schema:
        format: uuid
        type: string
  securitySchemes:
    BearerAuth:
      bearerFormat: JWT
      description: >-
        JWT token that the Lerian Access Manager issues for your institution.
        Send it in `Authorization: Bearer <token>` on every call (except the
        public health probes). The tenant never comes from the body, the query,
        or the path. Each operation requires a role with the matching permission
        (see the API overview). Without it, 403 `TED-0071`. Missing, invalid, or
        expired token: 401 `TED-0070`.
      scheme: bearer
      type: http

````

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