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

# Ask the câmara for its LDL schedule grid

> Issues an LDL0023 "IF consulta Horários Câmara LDL" to the SILOC câmara on product OT (Catálogo de Serviços do SFN v5.13, Vol II). The request is minted, built, signed, encrypted and durably recorded before anything reaches the queue: this returns 202 with the control number the câmara will echo, and the answer (LDL0023R1) arrives asynchronously — read it back with getScheduleQuery. A deployment with no send leg configured answers 503.



## OpenAPI

````yaml /pt/openapi/v3-current/siloc.yaml post /api/v1/siloc/outbound/schedule-queries
openapi: 3.1.0
info:
  description: >-
    OpenAPI 3.1 surface for Lerian SILOC, the participant-side rail connecting
    the institution to Núclea's SILOC deferred-net interbank settlement.
  title: Lerian SILOC API
  version: 1.0.0
servers:
  - url: https://siloc.sandbox.lerian.net
security: []
paths:
  /api/v1/siloc/outbound/schedule-queries:
    post:
      tags:
        - Schedule
      summary: Ask the câmara for its LDL schedule grid
      description: >-
        Issues an LDL0023 "IF consulta Horários Câmara LDL" to the SILOC câmara
        on product OT (Catálogo de Serviços do SFN v5.13, Vol II). The request
        is minted, built, signed, encrypted and durably recorded before anything
        reaches the queue: this returns 202 with the control number the câmara
        will echo, and the answer (LDL0023R1) arrives asynchronously — read it
        back with getScheduleQuery. A deployment with no send leg configured
        answers 503.
      operationId: submitScheduleQuery
      parameters:
        - description: >-
            Idempotency key for this state-changing request (required, max 255
            characters).
          in: header
          name: X-Idempotency
          required: true
          schema:
            description: >-
              Idempotency key for this state-changing request (required, max 255
              characters).
            maxLength: 255
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubmitScheduleQueryInputBody'
        required: true
      responses:
        '202':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScheduleQueryResponse'
          description: Accepted
        '422':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Unprocessable Entity
        '500':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Internal Server Error
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Error
      security:
        - BearerAuth: []
components:
  schemas:
    SubmitScheduleQueryInputBody:
      additionalProperties: false
      properties:
        referenceDate:
          description: The date to ask about (DtRef), YYYY-MM-DD.
          format: date
          type: string
        scheduleType:
          description: >-
            P (padrão) or E (eventual). Omit to ask without constraining the
            type. Asking for E on a date with no eventual change is answered
            with the standard grid.
          enum:
            - P
            - E
          type: string
      required:
        - referenceDate
      type: object
    ScheduleQueryResponse:
      additionalProperties: false
      properties:
        answeredAt:
          description: When the câmara's answer was applied; omitted until it is.
          format: date-time
          type: string
        attempts:
          description: Queue-put attempts made so far.
          format: int64
          type: integer
        dispatchedAt:
          description: When the frame reached the send queue; omitted until it has.
          format: date-time
          type: string
        grids:
          description: >-
            The grades de horário the answer returned (never null; empty until
            the câmara answers).
          items:
            $ref: '#/components/schemas/ScheduleQueryGridResponse'
          type: array
        id:
          description: Schedule query id.
          format: uuid
          type: string
        lastError:
          description: Why the last queue put failed; omitted when none has.
          type: string
        numCtrlIF:
          description: >-
            The control number this institution issued (NumCtrlIF). The câmara
            echoes it on the answer, which is what correlates the two.
          type: string
        nuop:
          description: The BCMSG operation number of the frame.
          type: string
        referenceDate:
          description: The date asked about (DtRef).
          format: date
          type: string
        scheduleType:
          description: >-
            P (padrão) or E (eventual); omitted when the query did not constrain
            the type.
          type: string
        status:
          description: >-
            Lifecycle state. REFUSED means the câmara received the query and
            returned its E twin (LDL0023E); FAILED means this rail could not
            deliver it. Both are terminal and they are different facts.
          enum:
            - SUBMITTED
            - DISPATCHED
            - ANSWERED
            - REFUSED
            - FAILED
          type: string
        submittedAt:
          description: When the query was recorded.
          format: date-time
          type: string
      required:
        - id
        - numCtrlIF
        - nuop
        - referenceDate
        - status
        - attempts
        - submittedAt
        - grids
      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
    ScheduleQueryGridResponse:
      additionalProperties: false
      properties:
        closesAt:
          description: Data Hora Fechamento, the câmara's clock, verbatim.
          format: date-time
          type: string
        codGrdLDL:
          description: Código Grade LDL, the câmara's own 5-character grid code.
          type: string
        opensAt:
          description: Data Hora Abertura, the câmara's clock, verbatim.
          format: date-time
          type: string
        scheduleType:
          description: >-
            Tipo Horário, verbatim. Documented values are P and E; the official
            type enumerates nothing, so a third value is shown rather than
            refused.
          type: string
      required:
        - codGrdLDL
        - opensAt
        - closesAt
        - scheduleType
      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

````