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

# Total scheduled for an account on a date

> THIS ROUTE AND ITS SIBLING ARE THE WHOLE OF WHAT THE SWITCH DOES ABOUT DAILY PIX LIMITS. The policy belongs to the client institution, which holds the ISPB and answers to BACEN for it; the Switch does not accumulate, project or decide. It returns the figure the decision needs. The total sums every NON-TERMINAL schedule for that account on that date -- cancelled and failed ones are excluded, because neither will move money. Supplying night_period_start adds the IN 512 art. 7 §7 slice, which is a DIFFERENT rule from the general night period of art. 3: created inside the window, settling the next day, to a natural person distinct from the payer. Omit the parameter and the slice is omitted rather than defaulted.



## OpenAPI

````yaml /en/openapi/v3-current/pix-lerian-spi.yaml get /scheduled-payment-totals
openapi: 3.1.0
info:
  contact:
    name: Lerian Studio
    url: https://lerian.studio
  description: >-
    Public API for outbound Pix transfers, refunds, and scheduled payments. This
    release provides a mock-provider integration for testing; live BACEN
    connectivity is not included.
  license:
    name: Lerian Studio General License
  title: Pix Lerian — Payments
  version: 1.0.0
servers:
  - url: https://api.example.com/spi/v1
    description: >-
      Replace the example host with the URL provided during environment
      onboarding.
security:
  - BearerAuth: []
tags:
  - description: Create, list, and retrieve Pix refunds.
    name: Refunds
  - name: Scheduled Payments
    description: Register, list, retrieve, and cancel scheduled Pix payments.
  - description: Initiate, process, list, and retrieve outbound Pix transfers.
    name: Transfers
paths:
  /scheduled-payment-totals:
    get:
      tags:
        - Scheduled Payments
      summary: Total scheduled for an account on a date
      description: >-
        THIS ROUTE AND ITS SIBLING ARE THE WHOLE OF WHAT THE SWITCH DOES ABOUT
        DAILY PIX LIMITS. The policy belongs to the client institution, which
        holds the ISPB and answers to BACEN for it; the Switch does not
        accumulate, project or decide. It returns the figure the decision needs.
        The total sums every NON-TERMINAL schedule for that account on that date
        -- cancelled and failed ones are excluded, because neither will move
        money. Supplying night_period_start adds the IN 512 art. 7 §7 slice,
        which is a DIFFERENT rule from the general night period of art. 3:
        created inside the window, settling the next day, to a natural person
        distinct from the payer. Omit the parameter and the slice is omitted
        rather than defaulted.
      operationId: getScheduledPaymentTotals
      parameters:
        - description: >-
            Payer account. Required: the total is per account, and an unscoped
            one would be meaningless.
          explode: false
          in: query
          name: account_id
          schema:
            description: >-
              Payer account. Required: the total is per account, and an unscoped
              one would be meaningless.
            examples:
              - 019606a1-3b4c-7d8e-9f01-234567890abc
            type: string
        - description: Civil date the total is computed for, in America/Sao_Paulo.
          explode: false
          in: query
          name: scheduled_date
          schema:
            description: Civil date the total is computed for, in America/Sao_Paulo.
            examples:
              - '2026-09-10'
            format: date
            type: string
        - description: >-
            Local time the night period opens, HH:MM in America/Sao_Paulo.
            Absent means the night slice is OMITTED rather than defaulted: where
            that window opens is the institution's setting (IN 512 art. 3), and
            inventing one would publish our number under their name.
          explode: false
          in: query
          name: night_period_start
          schema:
            description: >-
              Local time the night period opens, HH:MM in America/Sao_Paulo.
              Absent means the night slice is OMITTED rather than defaulted:
              where that window opens is the institution's setting (IN 512 art.
              3), and inventing one would publish our number under their name.
            examples:
              - '20:00'
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScheduledTotalsView'
          description: OK
        '422':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: >-
            A parameter cannot be used: a date that is not a civil date, or a
            night_period_start that is not HH:MM on a 24-hour clock (PIX-0787).
            The night start is validated here rather than passed to storage,
            where an unparseable value would surface as an internal error for
            what is a typo.
components:
  schemas:
    ScheduledTotalsView:
      additionalProperties: false
      properties:
        accountId:
          type: string
        currency:
          examples:
            - BRL
          type: string
        nightPeriodScheduleCount:
          format: int64
          type: integer
        nightPeriodTotal:
          description: >-
            The IN 512 art. 7 §7 slice: created inside the night period,
            settling the NEXT day, to a natural person distinct from the payer.
            This is NOT the general night period of art. 3 -- it is a separate
            rule with its own fixed shape. Present only when night_period_start
            was supplied.
          type: string
        scheduleCount:
          description: >-
            How many schedules the total sums, so a zero total can be told apart
            from an absent one.
          format: int64
          type: integer
        scheduledDate:
          format: date
          type: string
        total:
          description: >-
            Sum of every NON-TERMINAL schedule for that account on that date.
            Cancelled and failed schedules are excluded, because neither will
            move money.
          type: string
      required:
        - accountId
        - scheduledDate
        - total
        - currency
        - scheduleCount
      type: object
    Detail:
      additionalProperties: false
      properties:
        code:
          description: >-
            Stable, machine-readable domain error code scoped to the emitting
            service (format: <SERVICE>-NNNN).
          examples:
            - ERR-0001
          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
    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

````