Replace an invoice

Update the number of line items in an invoice. You can also update other invoice details.

You can use the PUT operation to add, remove, or replace the number of line items in an invoice. A set of rules apply with the PUT operation.

  • When you add a new line item, a new line item id is generated in the invoice.
  • When you omit an existing line item id, the line item is removed from the invoice.
Path Params
string
required
length ≥ 1

BILL-generated ID of the invoice. The value begins with 00e.

Body Params
string
length ≤ 100

User-generated invoice number. This value can be your chosen number scheme.

If you do not set this field, invoiceNumber is auto-generated.

date

Invoice creation date. This value is in the yyyy-MM-dd format.

If you do not set this field, invoiceDate is set as the date when the invoice is created.

date

Invoice due date. The value is in the yyyy-MM-dd format.

If you do not set this field, dueDate is set as the date when the invoice is created.

customer
object
required

Customer contact information.

  • Set the customer id for associating an existing customer to the invoice.
  • Set name and email for creating a new customer with the invoice.

In the response, a new BILL-generated customer id is available.

invoiceLineItems
array of objects
required

Invoice line item information

invoiceLineItems*
processingOptions
object

Invoice processing options

string

BILL-generated ID of the chart of accounts for the invoice payment. The value begins with 0ca.

classifications
object

General ledger classifications information for the invoice

number
≥ 0

Credit amount applied to the invoice.

BILL applies the credit amount from the total of all the credit memos available for the customer.

string

BILL-generated ID of the SALES_TAX item. The value begins with 0ii. The tax rate is applied to all the invoice line items set as taxable.

You can set up a SALES_TAX percentage item with POST /v3/classifications/items.

boolean

Set as true if the card payment option is enabled for the invoice

convenienceFee
object

Convenience fee information. The customer is charged the convenience fee when they pay the invoice using a card. To set the convenience fee, enableCardPayment must be set as true.

string

BILL-generated ID of the invoice PDF. The value begins with att.

The invoice PDF is sent as an email attachment when you send an invoice to a customer. The invoice PDF also appears when the customer clicks the invoice payment link to complete the invoice payment.

Note: You can get the list of invoice attachments with GET /v3/attachments/invoices/{invoiceId}. All the attachments in the list (including the invoice PDF) are sent as email attachments when you send the invoice to the customer.

Headers
string | null

API session ID generated with /v3/login

string | null

Developer key generated with your BILL developer account

Responses

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json