PUT
/
api
/
sale-invoices
/
{id}

Headers

Authorization
string
required

Value must be 'Bearer <token>' where <token> 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 sale invoice id

Body

application/json
customerId
number
required

Customer ID

Example:

1

invoiceDate
string<date-time>
required

Invoice date

Example:

"2023-01-01T00:00:00Z"

dueDate
string<date-time>
required

Due date

Example:

"2023-01-15T00:00:00Z"

entries
object[]
required

Invoice line items

Minimum length: 1
attachments
string[]
required

The attachments of the sale receipt

Example:
[{ "key": "123456" }]
invoiceNo
string

Invoice number

Example:

"INV-001"

referenceNo
string

Reference number

Example:

"REF-001"

delivered
boolean
default:false

Whether the invoice is delivered

invoiceMessage
string

Invoice message

Example:

"Thank you for your business"

termsConditions
string

Terms and conditions

Example:

"Payment due within 14 days"

exchangeRate
number

Exchange rate

Required range: x >= 0
Example:

1

warehouseId
number

Warehouse ID

Example:

1

branchId
number

Branch ID

Example:

1

projectId
number

Project ID

Example:

1

isInclusiveTax
boolean

Whether tax is inclusive

Example:

false

pdfTemplateId
number

PDF template ID

Example:

1

paymentMethods
object[]

Payment methods

discount
number

Discount value

Example:

10

discountType
enum<string>

Discount type

Available options:
percentage,
amount
Example:

"percentage"

adjustment
number

Adjustment amount

Example:

5

fromEstimateId
number

ID of the estimate this invoice is created from

Example:

1

Response

Sale invoice edited successfully