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

# Get the cost analysis totals of a project

> Returns the budget totals of a project, grouped by categories, areas or sources. The totals are read-only. They are the last calculated totals, not live values.



## OpenAPI

````yaml /swagger.yaml get /projects/{id}/budgets
openapi: 3.1.0
info:
  title: Fohlio REST API
  description: This is the documentation for the Fohlio REST API.
  version: 1.0.0
servers:
  - url: /openapi
  - url: https://app.fohlio.com/be/openapi
security: []
tags:
  - name: Webhooks
    description: Webhook event notifications
paths:
  /projects/{id}/budgets:
    parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
    get:
      tags:
        - Project Budget
      summary: Get the cost analysis totals of a project
      description: >-
        Returns the budget totals of a project, grouped by categories, areas or
        sources. The totals are read-only. They are the last calculated totals,
        not live values.
      operationId: project_budgets#get
      parameters:
        - name: type
          in: query
          required: true
          schema:
            type: string
            enum:
              - areas
              - categories
              - sources
          description: 'The grouping of the rows: `categories`, `areas` or `sources`.'
      responses:
        '200':
          description: OK
          content:
            application/json:
              examples:
                ok:
                  $ref: '#/components/examples/projectBudgetCategories'
              schema:
                $ref: '#/components/schemas/projectBudget'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '401':
          description: Unauthorized
          content:
            application/json:
              examples:
                unauthorized:
                  $ref: '#/components/examples/responseBodyErrorUnauthorized'
              schema:
                $ref: '#/components/schemas/error'
        '403':
          description: Forbidden
          content:
            application/json:
              examples:
                forbidden:
                  $ref: '#/components/examples/responseBodyErrorForbidden'
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: Not found
          content:
            application/json:
              examples:
                not_found:
                  $ref: '#/components/examples/responseBodyErrorNotFound'
              schema:
                $ref: '#/components/schemas/error'
      security:
        - apiKey: []
components:
  examples:
    projectBudgetCategories:
      summary: OK
      value:
        type: categories
        currency: USD
        updated_at: '2026-11-13T10:00:00.000Z'
        rows:
          - id: 10
            name: Furniture
            code: FUR
            position: 1
            parent_id: null
            planned_budget:
              item_count: 1
              amount: 600
              percentage: 60
              total_item_count: 2
              total_amount: 1000
            specifications:
              item_count: 2
              amount: 200
              consumed_percentage: 33.3
              remaining_amount: 400
              total_amount: 600
            purchasing:
              purchase_order:
                item_count: 1
                amount: 100
                total_item_count: 1
                total_amount: 100
              supplier_invoice:
                item_count: 1
                amount: 90
                remaining_amount: 510
          - id: 11
            name: Chairs
            position: 1
            parent_id: 10
            planned_budget:
              item_count: 1
              amount: 400
              total_item_count: 1
              total_amount: 400
        subtotal:
          planned_budget:
            total_item_count: 3
            total_amount: 1000
          specifications:
            total_item_count: 5
            total_amount: 800
        soft_costs:
          subtotal:
            planned_budget:
              total_amount: 50
          items:
            - kind: shipping_cost
              planned_budget:
                amount: 50
                percentage: 5
        grand_total:
          planned_budget:
            total_amount: 1050
    responseBodyErrorUnauthorized:
      value:
        error: Unauthorized
    responseBodyErrorForbidden:
      value:
        error: Forbidden
    responseBodyErrorNotFound:
      value:
        error: Not Found
  schemas:
    projectBudget:
      type: object
      required:
        - type
        - currency
        - updated_at
        - rows
        - subtotal
        - soft_costs
        - grand_total
      properties:
        type:
          type: string
          enum:
            - areas
            - categories
            - sources
          description: The grouping of the rows. Same as the `type` query parameter.
        currency:
          type:
            - string
            - 'null'
          description: ISO code of the project currency. All amounts use this currency.
          example: USD
        updated_at:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            When the totals were last calculated. `null` when they were never
            calculated. The totals are not live. They change only after a
            recalculation.
        rows:
          type: array
          description: >-
            One row for each area, category or source. Areas and categories form
            a tree. Rows are in depth-first order. Sources are flat.
          items:
            $ref: '#/components/schemas/projectBudgetRow'
        subtotal:
          $ref: '#/components/schemas/projectBudgetMetrics'
        soft_costs:
          type: object
          properties:
            subtotal:
              $ref: '#/components/schemas/projectBudgetMetrics'
            items:
              type: array
              items:
                $ref: '#/components/schemas/projectBudgetSoftCost'
        grand_total:
          $ref: '#/components/schemas/projectBudgetMetrics'
    error:
      type: object
      properties:
        error:
          type: string
    projectBudgetRow:
      allOf:
        - type: object
          required:
            - id
            - name
            - position
            - parent_id
          properties:
            id:
              type: integer
            name:
              type: string
            code:
              type:
                - string
                - 'null'
              description: >-
                Code of the category. Only present for categories that were
                calculated after the code was added.
            position:
              type:
                - integer
                - 'null'
            parent_id:
              type:
                - integer
                - 'null'
              description: >-
                ID of the parent row. `null` for a root row. Always `null` for
                sources.
        - $ref: '#/components/schemas/projectBudgetMetrics'
    projectBudgetMetrics:
      type: object
      description: >-
        A group is absent when it has no data. A key is absent when it does not
        apply. `amount` and `item_count` count the row itself. `total_amount`
        and `total_item_count` also count all descendant rows. For a flat row
        the two are equal.
      properties:
        planned_budget:
          type: object
          properties:
            item_count:
              type: integer
            amount:
              type: number
            percentage:
              type:
                - number
                - 'null'
              description: Share of the project budget.
            itemized_amount:
              type: number
            total_item_count:
              type: integer
            total_amount:
              type: number
            total_itemized_amount:
              type: number
        specifications:
          $ref: '#/components/schemas/projectBudgetConsumption'
        purchasing:
          type: object
          properties:
            purchase_order:
              $ref: '#/components/schemas/projectBudgetConsumption'
            supplier_invoice:
              $ref: '#/components/schemas/projectBudgetConsumption'
            client_proposal:
              $ref: '#/components/schemas/projectBudgetConsumption'
            client_invoice:
              $ref: '#/components/schemas/projectBudgetConsumption'
    projectBudgetSoftCost:
      allOf:
        - type: object
          required:
            - kind
          properties:
            kind:
              type: string
              enum:
                - shipping_cost
                - packing_cost
                - duties_cost
                - install_cost
                - other_cost
                - sales_tax
                - contingency_cost
        - $ref: '#/components/schemas/projectBudgetMetrics'
    projectBudgetConsumption:
      type: object
      properties:
        item_count:
          type: integer
        amount:
          type: number
        consumed_percentage:
          type:
            - number
            - 'null'
          description: Share of the planned budget that is used.
        remaining_amount:
          type: number
          description: Planned budget minus amount.
        remaining_percentage:
          type:
            - number
            - 'null'
        total_item_count:
          type: integer
        total_amount:
          type: number
        total_consumed_percentage:
          type:
            - number
            - 'null'
        total_remaining_amount:
          type: number
        total_remaining_percentage:
          type:
            - number
            - 'null'
  securitySchemes:
    apiKey:
      type: apiKey
      name: authorization
      in: header

````

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