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

# Retrieves the bills.



## OpenAPI

````yaml api-reference/openapi.json get /api/bills
openapi: 3.0.0
info:
  title: Bigcapital
  description: Financial accounting software
  version: '1.0'
  contact: {}
servers: []
security: []
tags: []
paths:
  /api/bills:
    get:
      tags:
        - Bills
      summary: Retrieves the bills.
      operationId: BillsController_getBills
      parameters:
        - name: Authorization
          in: header
          description: >-
            Value must be 'Bearer <token>' where <token> is an API key prefixed
            with 'bc_' or a JWT token.
          required: true
          schema:
            type: string
            example: Bearer bc_1234567890abcdef
        - name: organization-id
          in: header
          description: >-
            Required if Authorization is a JWT token. The organization ID to
            operate within.
          required: true
          schema:
            type: string
        - name: id
          required: true
          in: path
          description: The bill id
          schema:
            type: number
      responses:
        '200':
          description: The bill details has been retrieved successfully
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/PaginatedResponseDto'
                  - properties:
                      data:
                        type: array
                        items:
                          $ref: '#/components/schemas/BillResponseDto'
components:
  schemas:
    PaginatedResponseDto:
      type: object
      properties:
        pagination:
          description: Pagination metadata
          allOf:
            - $ref: '#/components/schemas/Pagination'
      required:
        - pagination
    BillResponseDto:
      type: object
      properties:
        id:
          type: number
          description: The unique identifier of the bill
          example: 1
        billNumber:
          type: string
          description: The bill number
          example: BILL-2024-001
        billDate:
          format: date-time
          type: string
          description: The date the bill was issued
          example: '2024-03-15T00:00:00Z'
        dueDate:
          format: date-time
          type: string
          description: The due date of the bill
          example: '2024-04-15T00:00:00Z'
        referenceNo:
          type: string
          description: The reference number
          example: PO-2024-001
        vendorId:
          type: number
          description: The ID of the vendor
          example: 1001
        exchangeRate:
          type: number
          description: The exchange rate for currency conversion
          example: 1.25
        currencyCode:
          type: string
          description: The currency code
          example: USD
        note:
          type: string
          description: Additional notes about the bill
          example: Office supplies and equipment for Q2 2024
        isInclusiveTax:
          type: boolean
          description: Whether tax is inclusive in the item rates
          example: false
        entries:
          description: The line items of the bill
          type: array
          items:
            $ref: '#/components/schemas/ItemEntryDto'
        warehouseId:
          type: number
          description: The ID of the warehouse
          example: 101
        branchId:
          type: number
          description: The ID of the branch
          example: 201
        branch:
          description: Branch details
          allOf:
            - $ref: '#/components/schemas/BranchResponseDto'
        projectId:
          type: number
          description: The ID of the project
          example: 301
        attachments:
          description: The attachments of the bill
          type: array
          items:
            $ref: '#/components/schemas/AttachmentLinkDto'
        discount:
          type: number
          description: The discount value
          example: 100
        discountType:
          type: string
          description: The type of discount (percentage or fixed)
          enum:
            - percentage
            - amount
          example: amount
        adjustment:
          type: number
          description: The adjustment amount
          example: 50
        taxAmountWithheld:
          type: number
          description: The total amount of tax withheld
          example: 50
        balance:
          type: number
          description: The balance of the bill
          example: 1000
        paymentAmount:
          type: number
          description: The amount paid
          example: 500
        creditedAmount:
          type: number
          description: The amount credited
          example: 0
        subtotal:
          type: number
          description: The subtotal amount before tax and adjustments
          example: 900
        total:
          type: number
          description: The total amount including tax and adjustments
          example: 1000
        dueAmount:
          type: number
          description: The due amount remaining to be paid
          example: 500
        isOverdue:
          type: boolean
          description: Whether the bill is overdue
          example: false
        isPartiallyPaid:
          type: boolean
          description: Whether the bill is partially paid
          example: true
        isFullyPaid:
          type: boolean
          description: Whether the bill is fully paid
          example: false
        createdAt:
          format: date-time
          type: string
          description: The date when the bill was created
          example: '2024-03-15T00:00:00Z'
        updatedAt:
          format: date-time
          type: string
          description: The date when the bill was last updated
          example: '2024-03-16T00:00:00Z'
      required:
        - id
        - billNumber
        - billDate
        - dueDate
        - vendorId
        - entries
        - balance
        - paymentAmount
        - subtotal
        - total
        - dueAmount
        - isOverdue
        - isPartiallyPaid
        - isFullyPaid
        - createdAt
    Pagination:
      type: object
      properties:
        total:
          type: number
          description: Total number of items across all pages
          example: 100
        page:
          type: number
          description: Current page number (1-based)
          example: 1
          minimum: 1
        pageSize:
          type: number
          description: Number of items per page
          example: 10
          minimum: 1
      required:
        - total
        - page
        - pageSize
    ItemEntryDto:
      type: object
      properties:
        index:
          type: number
          description: The index of the item entry
          example: 1
        itemId:
          type: number
          description: The id of the item
          example: 1
        rate:
          type: number
          description: The rate of the item entry
          example: 1
        quantity:
          type: number
          description: The quantity of the item entry
          example: 1
        discount:
          type: number
          description: The discount of the item entry
          example: 1
        discountType:
          type: string
          description: The type of the discount
          example: percentage
        description:
          type: string
          description: The description of the item entry
          example: This is a description
        taxCode:
          type: string
          description: The tax code of the item entry
          example: '123456'
        taxRateId:
          type: number
          description: The tax rate id of the item entry
          example: 1
        warehouseId:
          type: number
          description: The warehouse id of the item entry
          example: 1
        projectId:
          type: number
          description: The project id of the item entry
          example: 1
        projectRefId:
          type: number
          description: The project ref id of the item entry
          example: 1
        projectRefType:
          type: string
          description: The project ref type of the item entry
          example: TASK
        projectRefInvoicedAmount:
          type: number
          description: The project ref invoiced amount of the item entry
          example: 100
        sellAccountId:
          type: number
          description: The sell account id of the item entry
          example: 1020
        costAccountId:
          type: number
          description: The cost account id of the item entry
          example: 1021
      required:
        - index
        - itemId
        - rate
        - quantity
        - discount
        - discountType
        - description
        - taxCode
        - taxRateId
        - warehouseId
        - projectId
        - projectRefId
        - projectRefType
        - projectRefInvoicedAmount
        - sellAccountId
        - costAccountId
    BranchResponseDto:
      type: object
      properties:
        id:
          type: number
          description: Branch ID
          example: 1
        name:
          type: string
          description: Branch name
          example: Main Branch
        code:
          type: string
          description: Branch code
          example: BR001
        address:
          type: string
          description: Branch address
          example: 123 Main Street
        city:
          type: string
          description: Branch city
          example: New York
        country:
          type: string
          description: Branch country
          example: USA
        phoneNumber:
          type: string
          description: Branch phone number
          example: +1-555-123-4567
        email:
          type: string
          description: Branch email
          example: branch@example.com
        website:
          type: string
          description: Branch website
          example: https://www.example.com/branch
        primary:
          type: boolean
          description: Whether this is the primary branch
          example: true
        createdAt:
          format: date-time
          type: string
          description: Creation timestamp
          example: '2024-03-20T10:00:00Z'
        updatedAt:
          format: date-time
          type: string
          description: Last update timestamp
          example: '2024-03-20T10:00:00Z'
      required:
        - id
        - name
        - code
        - address
        - city
        - country
        - phoneNumber
        - email
        - website
        - primary
        - createdAt
        - updatedAt
    AttachmentLinkDto:
      type: object
      properties: {}

````