> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lapyme.com.ar/llms.txt
> Use this file to discover all available pages before exploring further.

# Obtener pronóstico de vencimientos

> Proyecta cobros, pagos y cheques pendientes por semana o mes. Los importes están en centavos de ARS. Los ajustes de cuenta corriente se muestran por separado. Los cheques históricos usan las fechas registradas de entrada y salida. Un endoso revertido puede perder su intervalo anterior.



## OpenAPI

````yaml /api-reference/openapi.json get /api/v1/accounting/due-date-forecast
openapi: 3.1.0
info:
  title: La Pyme API
  description: >-
    Resources and workflows for purchases, sales, inventory, contacts, products,
    reports, and settings.
  version: 1.0.0
  contact:
    name: La Pyme Support
    email: hola@lapyme.com.ar
  license:
    name: Proprietary
    url: https://lapyme.com.ar/terminos
servers:
  - url: https://api.lapyme.com.ar
    description: Servidor de producción
security:
  - bearerAuth: []
tags:
  - name: API
    description: Public API operations for La Pyme integrations.
paths:
  /api/v1/accounting/due-date-forecast:
    get:
      tags:
        - API
      summary: Obtener pronóstico de vencimientos
      description: >-
        Proyecta cobros, pagos y cheques pendientes por semana o mes. Los
        importes están en centavos de ARS. Los ajustes de cuenta corriente se
        muestran por separado. Los cheques históricos usan las fechas
        registradas de entrada y salida. Un endoso revertido puede perder su
        intervalo anterior.
      operationId: getApiDueDateForecast
      parameters:
        - name: circuit_id
          in: query
          required: false
          description: >-
            Circuito contable del reporte: `general`, el id de un circuito de la
            organización (ver `accounting_circuits` en GET
            /api/v1/organization), o `all`. Omitido es `all`, todos los
            circuitos. Un id que no es de la organización devuelve 400
            `circuit_not_found`.
          schema:
            type: string
            default: all
        - name: contact_id
          in: query
          schema:
            type: string
            format: uuid
        - name: point_of_sale_id
          in: query
          schema:
            oneOf:
              - type: string
                format: uuid
              - $ref: '#/components/schemas/ApiSharedEnum3de0170c4c'
        - name: reference_date
          in: query
          description: Primer día del pronóstico. Por defecto, hoy en Argentina.
          schema:
            type: string
            format: date
        - name: period_size
          in: query
          schema:
            $ref: '#/components/schemas/ApiSharedEnum368f648ff7'
        - name: period_count
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 52
            default: 12
      responses:
        '200':
          description: Pronóstico obtenido
          content:
            application/json:
              schema:
                type: object
                required:
                  - request_id
                  - effective_scope
                  - data
                properties:
                  request_id:
                    type: string
                  effective_scope:
                    description: >-
                      Circuito sobre el que corrió el reporte: `all`, o el
                      circuito pedido (`circuit_id` null es General).
                    oneOf:
                      - $ref: '#/components/schemas/ApiSharedEnum901b3341d8'
                      - $ref: '#/components/schemas/ApiSharedObject8d2ab49c4a'
                  data:
                    type: object
                    required:
                      - object
                      - reference_date
                      - balance_as_of_date
                      - functional_currency
                      - periods
                      - groups
                      - upcoming_cash
                      - aging
                    properties:
                      object:
                        type: string
                        enum:
                          - due_date_forecast
                      reference_date:
                        type: string
                        format: date
                      balance_as_of_date:
                        type: string
                        format: date
                      functional_currency:
                        type: string
                        enum:
                          - ARS
                      periods:
                        type: array
                        items:
                          type: object
                          required:
                            - key
                            - rows
                            - totals
                            - start_date
                            - end_date_exclusive
                          properties:
                            key:
                              type: string
                            rows:
                              $ref: '#/components/schemas/ApiSharedObjectbe95c9a3e4'
                            totals:
                              $ref: '#/components/schemas/ApiSharedObject2ebcc69a3d'
                            start_date:
                              type: string
                              format: date
                            end_date_exclusive:
                              type: string
                              format: date
                      groups:
                        type: object
                        required:
                          - overdue
                          - undated
                          - after_period
                          - credits_and_advances
                        properties:
                          overdue:
                            $ref: '#/components/schemas/ApiSharedObject4a9b5e1e3d'
                          undated:
                            $ref: '#/components/schemas/ApiSharedObject4a9b5e1e3d'
                          after_period:
                            $ref: '#/components/schemas/ApiSharedObject4a9b5e1e3d'
                          credits_and_advances:
                            $ref: '#/components/schemas/ApiSharedObject4a9b5e1e3d'
                      upcoming_cash:
                        $ref: '#/components/schemas/ApiSharedObject2ebcc69a3d'
                      aging:
                        type: object
                        required:
                          - payables
                          - receivables
                        properties:
                          payables:
                            type: integer
                          receivables:
                            type: integer
                    x-money-unit: centavos
        '400':
          description: Solicitud inválida
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
              examples:
                default:
                  summary: INVALID_REQUEST
                  value:
                    request_id: req_error_1
                    error:
                      type: invalid_request_error
                      code: INVALID_REQUEST
                      message: Solicitud inválida
                      retryable: false
                      details: []
        '401':
          description: API key faltante o inválida
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
              examples:
                default:
                  summary: INVALID_REQUEST
                  value:
                    request_id: req_error_1
                    error:
                      type: invalid_request_error
                      code: INVALID_REQUEST
                      message: API key faltante o inválida
                      retryable: false
                      details: []
        '403':
          description: Scope insuficiente o contabilidad no habilitada
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
              examples:
                default:
                  summary: INVALID_REQUEST
                  value:
                    request_id: req_error_1
                    error:
                      type: invalid_request_error
                      code: INVALID_REQUEST
                      message: Scope insuficiente o contabilidad no habilitada
                      retryable: false
                      details: []
        '429':
          description: Límite de solicitudes excedido para la organización
          headers:
            Retry-After:
              description: Segundos a esperar antes de volver a intentar la solicitud.
              schema:
                type: string
                example: '30'
            X-RateLimit-Limit:
              description: Límite de la ventana activa.
              schema:
                type: string
                example: '5000'
            X-RateLimit-Remaining:
              description: Solicitudes restantes en la ventana activa.
              schema:
                type: string
                example: '0'
            X-RateLimit-Reset:
              description: Segundos restantes hasta el reset de la ventana activa.
              schema:
                type: string
                example: '30'
            RateLimit-Limit:
              description: Límite de la ventana activa en formato estándar.
              schema:
                type: string
                example: '5000'
            RateLimit-Remaining:
              description: Solicitudes restantes en la ventana activa en formato estándar.
              schema:
                type: string
                example: '0'
            RateLimit-Reset:
              description: >-
                Segundos hasta el reset de la ventana activa en formato
                estándar.
              schema:
                type: string
                example: '30'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
              examples:
                default:
                  summary: RATE_LIMITED
                  value:
                    request_id: req_rate_limit_1
                    error:
                      type: rate_limit_error
                      code: RATE_LIMITED
                      message: >-
                        The organization request limit was reached. Try again
                        later.
                      retryable: true
                      details: []
        '500':
          description: Error interno del servidor
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
              examples:
                default:
                  summary: INVALID_REQUEST
                  value:
                    request_id: req_error_1
                    error:
                      type: invalid_request_error
                      code: INVALID_REQUEST
                      message: Error interno del servidor
                      retryable: false
                      details: []
        '503':
          description: >-
            Verificación de credenciales temporalmente ocupada; reintentá sin
            cambiar la operación ni su Idempotency-Key.
          headers:
            Retry-After:
              description: >-
                Segundos de espera. La verificación de credenciales indica 1;
                otras dependencias pueden indicar otro valor.
              schema:
                type: string
                example: '1'
            Cache-Control:
              description: La verificación de credenciales indica no-store.
              schema:
                type: string
                example: no-store
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
              examples:
                authentication_capacity:
                  summary: Verificación temporalmente ocupada
                  value:
                    request_id: req_auth_capacity_1
                    error:
                      type: api_error
                      code: INTERNAL_ERROR
                      message: >-
                        La verificación de credenciales está ocupada. Reintentá
                        más tarde.
                      retryable: true
                      details: []
components:
  schemas:
    ApiSharedEnum3de0170c4c:
      type: string
      enum:
        - __unassigned__
    ApiSharedEnum368f648ff7:
      type: string
      enum:
        - week
        - month
      default: week
    ApiSharedEnum901b3341d8:
      type: string
      enum:
        - all
    ApiSharedObject8d2ab49c4a:
      type: object
      required:
        - circuit_id
        - circuit_name
      properties:
        circuit_id:
          type:
            - string
            - 'null'
          format: uuid
        circuit_name:
          type: string
    ApiSharedObjectbe95c9a3e4:
      type: object
      required:
        - payables
        - receivables
        - issued_checks
        - received_checks
      properties:
        payables:
          $ref: '#/components/schemas/ApiSharedObject2ebcc69a3d'
        receivables:
          $ref: '#/components/schemas/ApiSharedObject2ebcc69a3d'
        issued_checks:
          $ref: '#/components/schemas/ApiSharedObject2ebcc69a3d'
        received_checks:
          $ref: '#/components/schemas/ApiSharedObject2ebcc69a3d'
    ApiSharedObject2ebcc69a3d:
      type: object
      required:
        - inflows
        - outflows
        - net
        - item_count
        - unvalued_check_count
      properties:
        inflows:
          type: integer
        outflows:
          type: integer
        net:
          type: integer
        item_count:
          type: integer
        unvalued_check_count:
          type: integer
    ApiSharedObject4a9b5e1e3d:
      type: object
      required:
        - key
        - rows
        - totals
      properties:
        key:
          type: string
        rows:
          $ref: '#/components/schemas/ApiSharedObjectbe95c9a3e4'
        totals:
          $ref: '#/components/schemas/ApiSharedObject2ebcc69a3d'
    ApiErrorEnvelope:
      type: object
      properties:
        request_id:
          type: string
        error:
          type: object
          properties:
            type:
              type: string
              enum:
                - api_error
                - authentication_error
                - authorization_error
                - business_error
                - external_dependency_error
                - idempotency_error
                - invalid_request_error
                - rate_limit_error
            code:
              type: string
            message:
              type: string
            retryable:
              type: boolean
            details:
              type: array
              items:
                type: object
                properties:
                  field:
                    type: string
                  code:
                    type: string
                  message:
                    type: string
                  metadata:
                    type: object
                    propertyNames:
                      type: string
                    additionalProperties:
                      type:
                        - string
                        - number
                        - boolean
                        - 'null'
                required:
                  - code
                  - message
                additionalProperties: false
          required:
            - type
            - code
            - message
            - retryable
            - details
          additionalProperties: false
      required:
        - request_id
        - error
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: Incluí tu API key en el header Authorization con el prefijo Bearer.

````

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