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

# Create a new bill.



## OpenAPI

````yaml api-reference/openapi.json post /api/bills
openapi: 3.0.0
info:
  title: Bigcapital
  description: Financial accounting software
  version: '1.0'
  contact: {}
servers: []
security: []
tags: []
paths:
  /api/bills:
    post:
      tags:
        - Bills
      summary: Create a new bill.
      operationId: BillsController_createBill
      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
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateBillDto'
      responses:
        '201':
          description: ''
components:
  schemas:
    CreateBillDto:
      type: object
      properties:
        billNumber:
          type: string
          description: Unique bill number
          example: BILL-2024-001
        referenceNo:
          type: string
          description: Reference number
          example: PO-2024-001
        billDate:
          format: date-time
          type: string
          description: Date the bill was issued
          example: '2024-03-15'
        dueDate:
          format: date-time
          type: string
          description: Date the bill is due
          example: '2024-04-15'
        vendorId:
          type: number
          description: Vendor identifier
          example: 1001
        exchangeRate:
          type: number
          description: Exchange rate applied to bill amounts
          example: 1.25
        warehouseId:
          type: number
          description: Warehouse identifier
          example: 101
        branchId:
          type: number
          description: Branch identifier
          example: 201
        projectId:
          type: number
          description: Project identifier
          example: 301
        note:
          type: string
          description: Additional notes about the bill
          example: Office supplies and equipment for Q2 2024
        open:
          type: boolean
          description: Indicates if the bill is open
          example: true
        isInclusiveTax:
          type: boolean
          description: Indicates if tax is inclusive in prices
          example: false
        entries:
          description: Bill line items
          type: array
          items:
            $ref: '#/components/schemas/BillEntryDto'
        attachments:
          description: File attachments associated with the bill
          type: array
          items:
            $ref: '#/components/schemas/AttachmentDto'
        discountType:
          type: string
          description: Type of discount applied
          example: amount
          enum:
            - percentage
            - amount
        discount:
          type: number
          description: Discount value
          example: 100
        adjustment:
          type: number
          description: Adjustment value
          example: 50
      required:
        - billDate
        - vendorId
        - entries
    BillEntryDto:
      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
        landedCost:
          type: boolean
          description: Flag indicating whether the entry contributes to landed cost
          example: true
      required:
        - index
        - itemId
        - rate
        - quantity
        - discount
        - discountType
        - description
        - taxCode
        - taxRateId
        - warehouseId
        - projectId
        - projectRefId
        - projectRefType
        - projectRefInvoicedAmount
        - sellAccountId
        - costAccountId
    AttachmentDto:
      type: object
      properties:
        key:
          type: string
          description: Storage key of the attachment file
          example: attachments/bills/receipt.pdf
      required:
        - key

````