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

# Project budget-vs-actual report

> Budget-vs-actual for the project, computed through the report engine (derived, cumulative, and in-kind lines handled correctly). Requires the `reports:read` scope. Each cell carries `budgeted`, `actual`, and `variance`.



## OpenAPI

````yaml /openapi.json get /projects/{id}/report
openapi: 3.1.0
info:
  title: Ledgitify REST API
  version: 1.0.0
  description: >-
    Programmatic access to a single organisation's Ledgitify projects, reports,
    allocations, and transactions. The API key alone determines which
    organisation is accessed; there is no tenant parameter on any endpoint.
    Every endpoint is read-only (GET) except `POST /transactions`, which pushes
    transactions in and requires the `transactions:write` scope.
  contact:
    name: Ledgitify
    url: https://ledgitify.com
servers:
  - url: https://ledgitify.com/api/v1
    description: Production
security:
  - ApiKeyAuth: []
tags:
  - name: Projects
    description: Projects and their budget-vs-actual reports
  - name: Allocations
    description: Allocations recorded against a project's budget lines
  - name: Transactions
    description: Organisation-level accounting transactions
paths:
  /projects/{id}/report:
    get:
      tags:
        - Projects
      summary: Project budget-vs-actual report
      description: >-
        Budget-vs-actual for the project, computed through the report engine
        (derived, cumulative, and in-kind lines handled correctly). Requires the
        `reports:read` scope. Each cell carries `budgeted`, `actual`, and
        `variance`.
      operationId: getProjectReport
      parameters:
        - $ref: '#/components/parameters/ProjectId'
        - name: granularity
          in: query
          required: false
          description: Reporting period granularity. Defaults to `monthly`.
          schema:
            type: string
            enum:
              - monthly
              - quarterly
            default: monthly
      responses:
        '200':
          description: The budget-vs-actual report.
          content:
            application/json:
              schema:
                type: object
                required:
                  - granularity
                  - data
                properties:
                  granularity:
                    type: string
                    enum:
                      - monthly
                      - quarterly
                  data:
                    $ref: '#/components/schemas/Report'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  parameters:
    ProjectId:
      name: id
      in: path
      required: true
      description: The project id.
      schema:
        type: string
  schemas:
    Report:
      type: object
      required:
        - totalLabel
        - columns
        - rows
        - columnTotals
        - grandTotal
      properties:
        totalLabel:
          type: string
          description: >-
            Total / Total Revenue / Total Expenses / Net P&L, depending on the
            project's line signs.
        columns:
          type: array
          items:
            $ref: '#/components/schemas/ReportColumn'
        rows:
          type: array
          items:
            $ref: '#/components/schemas/ReportRow'
        columnTotals:
          type: array
          items:
            $ref: '#/components/schemas/ReportCell'
          description: One total per column.
        grandTotal:
          $ref: '#/components/schemas/ReportCell'
    ReportColumn:
      type: object
      required:
        - label
        - periodStart
        - periodEnd
      properties:
        label:
          type: string
        periodStart:
          type: string
          format: date-time
        periodEnd:
          type: string
          format: date-time
    ReportRow:
      type: object
      required:
        - budgetLineId
        - budgetLineName
        - depth
        - isLeaf
        - cells
        - total
      properties:
        budgetLineId:
          type: string
        budgetLineName:
          type: string
        depth:
          type: integer
          description: Nesting depth in the budget-line tree (0 = top level).
        isLeaf:
          type: boolean
        cells:
          type: array
          items:
            $ref: '#/components/schemas/ReportCell'
          description: One cell per report column, in column order.
        total:
          $ref: '#/components/schemas/ReportCell'
    ReportCell:
      type: object
      required:
        - budgeted
        - actual
        - variance
      properties:
        budgeted:
          type: number
        actual:
          type: number
        variance:
          type: number
          description: actual − budgeted.
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              enum:
                - unauthorized
                - forbidden
                - insufficient_scope
                - not_found
                - rate_limited
            message:
              type: string
  responses:
    Unauthorized:
      description: Missing, malformed, unknown, or revoked API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: unauthorized
              message: Invalid or revoked API key.
    Forbidden:
      description: >-
        The plan does not include API access, or the key lacks the required
        scope.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            planGate:
              value:
                error:
                  code: forbidden
                  message: API access is not available on this plan.
            scope:
              value:
                error:
                  code: insufficient_scope
                  message: This key lacks the reports:read scope.
    NotFound:
      description: The project was not found in your organisation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: not_found
              message: Project not found.
    RateLimited:
      description: Per-key rate limit exceeded (120 requests/minute).
      headers:
        Retry-After:
          description: Seconds until the limit resets.
          schema:
            type: integer
        X-RateLimit-Limit:
          description: The per-minute request limit.
          schema:
            type: integer
        X-RateLimit-Remaining:
          description: Requests remaining in the current window.
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: rate_limited
              message: Rate limit exceeded.
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: lk_live_...
      description: >-
        API key as a Bearer token: `Authorization: Bearer lk_live_<48 hex>`.
        Create keys in Settings → API keys (Owner or Admin); the full key is
        shown once. API access is a Professional+ feature. Each key is granted
        one or more scopes — read (`projects:read`, `reports:read`,
        `allocations:read`, `transactions:read`) and the single write scope
        (`transactions:write`) — and is limited to 120 requests per minute.

````