> ## 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 sale invoices.



## OpenAPI

````yaml api-reference/openapi.json get /api/sale-invoices
openapi: 3.0.0
info:
  title: Bigcapital
  description: Financial accounting software
  version: '1.0'
  contact: {}
servers: []
security: []
tags: []
paths:
  /api/sale-invoices:
    get:
      tags:
        - Sale Invoices
      summary: Retrieves the sale invoices.
      operationId: SaleInvoicesController_getSaleInvoices
      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
      responses:
        '200':
          description: The sale invoices have been successfully retrieved.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/PaginatedResponseDto'
                  - properties:
                      data:
                        type: array
                        items:
                          $ref: '#/components/schemas/SaleInvoiceResponseDto'
components:
  schemas:
    PaginatedResponseDto:
      type: object
      properties:
        pagination:
          description: Pagination metadata
          allOf:
            - $ref: '#/components/schemas/Pagination'
      required:
        - pagination
    SaleInvoiceResponseDto:
      type: object
      properties:
        id:
          type: number
          description: The unique identifier of the sale invoice
          example: 1
        invoiceDate:
          format: date-time
          type: string
          description: The date of the invoice
          example: '2023-01-01T00:00:00Z'
        dueDate:
          format: date-time
          type: string
          description: The due date of the invoice
          example: '2023-01-15T00:00:00Z'
        invoiceNo:
          type: string
          description: The invoice number
          example: INV-001
        referenceNo:
          type: string
          description: The reference number
          example: REF-001
        customerId:
          type: number
          description: The ID of the customer
          example: 1
        exchangeRate:
          type: number
          description: The exchange rate for currency conversion
          example: 1
        currencyCode:
          type: string
          description: The currency code
          example: USD
        invoiceMessage:
          type: string
          description: Custom message on the invoice
          example: Thank you for your business
        termsConditions:
          type: string
          description: Terms and conditions of the invoice
          example: Payment due within 14 days
        isInclusiveTax:
          type: boolean
          description: Whether tax is inclusive in the item rates
          example: false
        entries:
          description: The line items of the invoice
          type: array
          items:
            $ref: '#/components/schemas/ItemEntryDto'
        delivered:
          type: boolean
          description: Whether the invoice has been delivered
          example: false
        deliveredAt:
          format: date-time
          type: string
          description: The date when the invoice was delivered
          example: '2023-01-02T00:00:00Z'
        warehouseId:
          type: number
          description: The ID of the warehouse
          example: 1
        branchId:
          type: number
          description: The ID of the branch
          example: 1
        projectId:
          type: number
          description: The ID of the project
          example: 1
        attachments:
          description: The attachments of the invoice
          type: array
          items:
            $ref: '#/components/schemas/AttachmentLinkDto'
        paymentMethods:
          description: The payment methods associated with the invoice
          type: array
          items:
            $ref: '#/components/schemas/PaymentMethodDto'
        discount:
          type: number
          description: The discount value
          example: 10
        discountType:
          type: string
          description: The type of discount (percentage or fixed)
          enum:
            - percentage
            - amount
          example: percentage
        adjustment:
          type: number
          description: The adjustment amount
          example: 5
        pdfTemplateId:
          type: number
          description: The ID of the PDF template
          example: 1
        taxAmountWithheld:
          type: number
          description: The total amount of tax withheld
          example: 50
        balance:
          type: number
          description: The balance of the invoice
          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 invoice is overdue
          example: false
        isPartiallyPaid:
          type: boolean
          description: Whether the invoice is partially paid
          example: true
        isFullyPaid:
          type: boolean
          description: Whether the invoice is fully paid
          example: false
        createdAt:
          format: date-time
          type: string
          description: The date when the invoice was created
          example: '2023-01-01T00:00:00Z'
        updatedAt:
          format: date-time
          type: string
          description: The date when the invoice was last updated
          example: '2023-01-02T00:00:00Z'
      required:
        - id
        - invoiceDate
        - dueDate
        - invoiceNo
        - customerId
        - entries
        - delivered
        - 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
    AttachmentLinkDto:
      type: object
      properties: {}
    PaymentMethodDto:
      type: object
      properties:
        paymentIntegrationId:
          type: number
          description: The ID of the payment integration
          example: 1
        enable:
          type: boolean
          description: Whether the payment method is enabled
          example: true
      required:
        - paymentIntegrationId
        - enable

````