Skip to main content
PUT
/
api
/
bills
/
{id}
Edit the given bill.
curl --request PUT \
  --url https://api.example.com/api/bills/{id} \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --header 'organization-id: <organization-id>' \
  --data '
{
  "billDate": "2024-03-15",
  "vendorId": 1001,
  "entries": [
    {
      "index": 1,
      "itemId": 1,
      "rate": 1,
      "quantity": 1,
      "discount": 1,
      "discountType": "percentage",
      "description": "This is a description",
      "taxCode": "123456",
      "taxRateId": 1,
      "warehouseId": 1,
      "projectId": 1,
      "projectRefId": 1,
      "projectRefType": "TASK",
      "projectRefInvoicedAmount": 100,
      "sellAccountId": 1020,
      "costAccountId": 1021,
      "landedCost": true
    }
  ],
  "billNumber": "BILL-2024-001",
  "referenceNo": "PO-2024-001",
  "dueDate": "2024-04-15",
  "exchangeRate": 1.25,
  "warehouseId": 101,
  "branchId": 201,
  "projectId": 301,
  "note": "Office supplies and equipment for Q2 2024",
  "open": true,
  "isInclusiveTax": false,
  "attachments": [
    {
      "key": "attachments/bills/receipt.pdf"
    }
  ],
  "discountType": "amount",
  "discount": 100,
  "adjustment": 50
}
'

Headers

Authorization
string
required

Value must be 'Bearer ' where is an API key prefixed with 'bc_' or a JWT token.

Example:

"Bearer bc_1234567890abcdef"

organization-id
string
required

Required if Authorization is a JWT token. The organization ID to operate within.

Path Parameters

id
number
required

The bill id

Body

application/json
billDate
string<date-time>
required

Date the bill was issued

Example:

"2024-03-15"

vendorId
number
required

Vendor identifier

Example:

1001

entries
object[]
required

Bill line items

billNumber
string

Unique bill number

Example:

"BILL-2024-001"

referenceNo
string

Reference number

Example:

"PO-2024-001"

dueDate
string<date-time>

Date the bill is due

Example:

"2024-04-15"

exchangeRate
number

Exchange rate applied to bill amounts

Example:

1.25

warehouseId
number

Warehouse identifier

Example:

101

branchId
number

Branch identifier

Example:

201

projectId
number

Project identifier

Example:

301

note
string

Additional notes about the bill

Example:

"Office supplies and equipment for Q2 2024"

open
boolean

Indicates if the bill is open

Example:

true

isInclusiveTax
boolean

Indicates if tax is inclusive in prices

Example:

false

attachments
object[]

File attachments associated with the bill

discountType
enum<string>

Type of discount applied

Available options:
percentage,
amount
Example:

"amount"

discount
number

Discount value

Example:

100

adjustment
number

Adjustment value

Example:

50

Response

200 - undefined