Create bill

Create a bill (payable) or invoice (receivable) and post its journal entry. Returns the new bill's id and memo. Provide at least one entry in schedules to create a repeating bill template instead of a one-time bill; one-time bills require date. For invoices, set send to true with email to email the invoice to the customer.

Required permission: Full Write Accounting

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params

The details of the bill

account
object | null
required

The accounts-payable or accounts-receivable control account the bill posts to. Must be a liability account for payables and an asset account for receivables. Provide the id.

payee
object | null
required

A reference to an existing record by its id.

int32
required

The record type: 1 = bill (payable), 2 = invoice (receivable).

items
array of objects | null
required

The bill's expense or income line items. At least one line with an account and amount is required.

items*
boolean | null

Set to true when an edit changes the repeating schedules; otherwise the existing recurrence is kept.

int32 | null

The id of the bill.

schedules
array of objects | null

For repeating bills, the recurrence schedules that drive when each bill is created. Providing at least one schedule makes the bill a repeating template.

schedules
string | null

The bill's reference (or invoice number).

string | null

The bill's memo.

date | null

The bill (or invoice) date. Required for one-time bills; repeating bills derive it from the schedule.

terms
object | null

The payment terms. Provide the id: 0 = None, 1 = Due on receipt, 2 = Net 15, 3 = Net 30, 4 = Net 45, 5 = Net 60.

date | null

The date the bill is due.

repeatType
object | null

For repeating bills, what happens on each occurrence. Provide the id: 1 = create the bill automatically, 2 = only remind someone to create it.

int32 | null

For repeating bills, how many days before the due date the bill is created.

string | null

Internal notes on the bill.

files
array of objects | null

Files attached to the bill. On write, provide the ids of journal-entry documents that were previously uploaded; repeating bill templates do not support files.

files
boolean

For invoices, whether the invoice is emailed to the customer: immediately when saving a one-time invoice, or each time a repeating invoice is created. Requires email.

email
object | null

The email sent to the customer with a link to view and pay the invoice online.

reminder
object | null

A reference to an existing record by its id.

options
object | null

Online payment options for the invoice.

accounts
object | null

The accounts used to record processing fees for online invoice payments. The expense account is required for every receivable; the income account is also required when options.fees is true. Provide the ids.

Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

401

Authentication is required, or the Ocs-Api-Key header is missing or invalid.

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