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

# Export the per-transaction instants the Courier observed

> Input to a report, never a report: each core composes and submits its own BACEN report; the Courier composes none and submits nothing. What it supplies is the slice of the clock only it saw, per message: when it arrived, when the ownership decision was taken, when the answer was confirmed to the vendor. Correlate a Pix transaction by endToEndId. On Pix, an asynchronous validation reports a row per credit with its call's instants. An absent instant is reported null, never inferred or back-filled. Read-only, served by the admin role off the delivery path, and it never returns original content.



## OpenAPI

````yaml /en/openapi/v3-current/jd-courier.yaml get /v1/reporting/transaction-timing
openapi: 3.1.0
info:
  contact:
    email: support@lerian.studio
    name: Lerian Studio Support
  description: >-
    The JD Courier API. Operators use it to manage the engines, the ownership
    map, the rails and their delivery modes, the retained messages, the SPB send
    journal and reconciliation. Engines use it to resolve and claim ownership,
    declare their Pix Automático payment legs, and relay a payment between two
    cores of the same institution to the core that owns the payee account.
  license:
    name: Lerian Studio General License
  title: JD Courier API
  version: v1.0.0
servers: []
security:
  - BearerAuth: []
tags:
  - description: >-
      The engine registry: the cores that consume the JD channel through the
      Courier, each with its participant set
    name: Engines
  - description: 'The ownership map: which engine owns each key. Every change is audited.'
    name: ownership
  - description: >-
      The rails: what each declares about itself, its activation and state per
      tenant, and its delivery modes
    name: channels
  - description: >-
      The engines' side of the ownership map: resolution for the on-us gate,
      authoritative and never advisory, the claim of the accounts, charger
      documents and Pix Automático recurrences the engine holds, and the
      declaration of a payment leg it holds.
    name: ownership-query
  - description: >-
      A same-bank Pix or TED between two cores: the Courier asks the map who
      owns the payee account, forwards the body byte for byte to that engine's
      address for the rail, and relays its answer. It stores, retries and posts
      nothing; bodies are not modelled.
    name: cross-core
  - description: >-
      The durable message store: redelivery on demand, without asking the vendor
      again
    name: ledger
  - description: >-
      Count reconciliation per rail: E(m) = C(m) + T(m) + R(m), the sequence
      gaps it saw, and the sends whose return leg never arrived
    name: assurance
  - description: >-
      The SPB send journal: every send, written before it leaves, and the sends
      whose outcome is unknown. A by-hand close records an operator's finding
      and never resends.
    name: send-journal
  - description: >-
      Per-(tenant, channel) state an operator acts on: lifting a durable channel
      halt
    name: channel-leases
  - description: >-
      Messages the Courier holds because no engine could receive them. A routing
      or delivery retention leaves by itself once its cause lifts, or when an
      operator asks for its routing decision to be run again.
    name: retained
paths:
  /v1/reporting/transaction-timing:
    get:
      tags:
        - assurance
      summary: Export the per-transaction instants the Courier observed
      description: >-
        Input to a report, never a report: each core composes and submits its
        own BACEN report; the Courier composes none and submits nothing. What it
        supplies is the slice of the clock only it saw, per message: when it
        arrived, when the ownership decision was taken, when the answer was
        confirmed to the vendor. Correlate a Pix transaction by endToEndId. On
        Pix, an asynchronous validation reports a row per credit with its call's
        instants. An absent instant is reported null, never inferred or
        back-filled. Read-only, served by the admin role off the delivery path,
        and it never returns original content.
      operationId: exportTransactionTiming
      parameters:
        - description: 'The rail. Required: each page then reads one index range per store.'
          explode: false
          in: query
          name: channelId
          required: true
          schema:
            description: >-
              The rail. Required: each page then reads one index range per
              store.
            enum:
              - spb
              - pix
            type: string
        - description: RFC 3339. Arrival at or after this instant.
          explode: false
          in: query
          name: from
          required: true
          schema:
            description: RFC 3339. Arrival at or after this instant.
            maxLength: 64
            type: string
        - description: RFC 3339. Arrival before this instant.
          explode: false
          in: query
          name: to
          required: true
          schema:
            description: RFC 3339. Arrival before this instant.
            maxLength: 64
            type: string
        - description: One Pix transaction, by its own endToEndId.
          explode: false
          in: query
          name: endToEndId
          schema:
            description: One Pix transaction, by its own endToEndId.
            maxLength: 128
            type: string
        - description: >-
            One message, by its identity on the rail: on SPB, the vendor
            sequence.
          explode: false
          in: query
          name: naturalKey
          schema:
            description: >-
              One message, by its identity on the rail: on SPB, the vendor
              sequence.
            maxLength: 256
            type: string
        - description: >-
            The nextCursor of the previous page, as returned. Its format is not
            contract.
          explode: false
          in: query
          name: cursor
          schema:
            description: >-
              The nextCursor of the previous page, as returned. Its format is
              not contract.
            maxLength: 512
            type: string
        - description: Items per page.
          explode: false
          in: query
          name: limit
          schema:
            default: 50
            description: Items per page.
            format: int64
            maximum: 200
            minimum: 1
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransactionTimingPage'
          description: OK
        '400':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Bad Request
        '401':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Unauthorized
        '403':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Forbidden
        '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:
    TransactionTimingPage:
      additionalProperties: false
      properties:
        items:
          items:
            $ref: '#/components/schemas/TransactionTiming'
          type: array
        limit:
          format: int64
          minimum: 1
          type: integer
        nextCursor:
          description: Pass as cursor for the next page; null on the last one.
          type:
            - string
            - 'null'
      required:
        - items
        - limit
        - nextCursor
      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
    TransactionTiming:
      additionalProperties: false
      properties:
        ackedAt:
          description: >-
            The latest instant a delivered answer was handed back to the vendor;
            a vendor resend replaces it. Null until one is handed back, and
            always on SPB, a drain the Courier answers nothing on. On an
            asynchronous validation, the instant the Courier made the call
            durable; its 202 leaves only after that write commits, and a resend
            does not replace it.
          format: date-time
          type:
            - string
            - 'null'
        channelId:
          enum:
            - spb
            - pix
          type: string
        classification:
          description: >-
            The message's family; null when it could not be classified.
            PIX_ASYNC_VALIDATION is one credit of an asynchronous validation
            (JDPI §9.3.4), a row per credit, keyed by naturalKey and endToEndId.
          type:
            - string
            - 'null'
        decidedAt:
          description: >-
            When the ownership decision named the engine. Null when none did: a
            retained message, a refusal by declared rule, one still in flight.
            Never inferred.
          format: date-time
          type:
            - string
            - 'null'
        endToEndId:
          description: >-
            Pix: the transaction's own endToEndId, the id each core keys its
            report on (endToEndIdDevolucao on a return). Null on SPB and on a
            route that names none.
          type:
            - string
            - 'null'
        messageId:
          description: >-
            The message's id. On an asynchronous validation, the idValidacaoSgct
            the Courier answered, shared by each of its credits.
          format: uuid
          type: string
        naturalKey:
          description: >-
            The message's identity on its rail: the vendor sequence on SPB, the
            route-prefixed key on Pix. Null when the content was too damaged to
            yield one.
          type:
            - string
            - 'null'
        outcome:
          description: Where the message stands, so a missing instant can be explained.
          enum:
            - CAPTURED
            - ASSIGNED
            - RETAINED
            - REFUSED
            - CLOSED
          type: string
        receivedAt:
          description: When the vendor's bytes became durable here.
          format: date-time
          type: string
      required:
        - messageId
        - channelId
        - naturalKey
        - endToEndId
        - classification
        - receivedAt
        - decidedAt
        - ackedAt
        - outcome
      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.