> ## Documentation Index
> Fetch the complete documentation index at: https://api.tipee.ch/llms.txt
> Use this file to discover all available pages before exploring further.

# Show balances

> Shows the balances of a resource over a date range: for each balance, what was due, done and adjusted over the range, and the resulting balance.

> [!WARNING]
>
> This endpoint is in preview: it may change without notice until it becomes part of a stable version.


## OpenAPI

````yaml preview post /api/balances/resources.show-balances
openapi: 3.1.0
info:
  title: tipee
  version: preview
servers: []
security:
  - basicAuth: []
tags:
  - name: Activity
    description: Activity
  - name: Balances
    description: Balances
  - name: Directory
    description: Directory
  - name: Schedule
    description: Schedule
  - name: Security
    description: Security
  - name: Timeclock
    description: Timeclock
paths:
  /api/balances/resources.show-balances:
    post:
      tags:
        - Balances
      summary: Show balances
      description: >-
        Shows the balances of a resource over a date range: for each balance,
        what was due, done and adjusted over the range, and the resulting
        balance.
      operationId: post_app_ui_api_balances_resourcesummaryquery_showresourcebalances
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ShowResourceBalancesQuery'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ResourceBalanceView'
components:
  schemas:
    ShowResourceBalancesQuery:
      required:
        - resource_id
        - date_range
      properties:
        resource_id:
          $ref: '#/components/schemas/Snowflake'
        date_range:
          $ref: '#/components/schemas/LocalDateInterval'
          description: Must not exceed 366 days.
        balance_ids:
          description: Only balances scoped to the resource are returned.
          type: array
          items:
            $ref: '#/components/schemas/Snowflake'
        with_carryover:
          description: >-
            When true, `carryover` holds the balance accumulated before the date
            range and `balance` the accumulated balance at its end. When false,
            `carryover` has no value and `balance` only covers the date range
            itself.
          type: boolean
          default: true
      type: object
      additionalProperties: false
    ResourceBalanceView:
      required:
        - balance_id
        - date_range
        - carryover
        - due
        - done
        - adjustments
        - balance
      properties:
        balance_id:
          $ref: '#/components/schemas/Snowflake'
        date_range:
          $ref: '#/components/schemas/LocalDateInterval'
          description: >-
            The smallest date range covering every day of the requested range on
            which the balance applies to the resource. It may include days on
            which it does not apply.
        carryover:
          $ref: '#/components/schemas/BalanceValue'
        due:
          $ref: '#/components/schemas/BalanceValue'
        done:
          $ref: '#/components/schemas/BalanceValue'
        adjustments:
          $ref: '#/components/schemas/BalanceValue'
        balance:
          $ref: '#/components/schemas/BalanceValue'
      type: object
    Snowflake:
      type: string
      format: snowflake
      example: '872815618512410358'
    LocalDateInterval:
      type: string
      format: local-date-interval
      example: 2019-11-11/2019-12-12
    BalanceValue:
      required:
        - value
        - output_format
        - error
      properties:
        value:
          type:
            - number
            - 'null'
          format: float
        output_format:
          $ref: '#/components/schemas/OutputFormat'
        error:
          type:
            - string
            - 'null'
      type: object
    OutputFormat:
      type: string
      example: days
      enum:
        - days
        - hours
        - units

````

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