Delete bills

Delete bills or invoices in bulk along with their journal entries. Provide ids, or explicitly set include to false to delete every bill matching the query filters (and every bill outright when no filters are given); an empty body is rejected. Bills with payments, credits, or write-offs recorded against them cannot be deleted. While multi-campus is on, a bill that also belongs to campuses outside the caller's access needs the permission at every campus of its set: explicit ids that include one answer 403 and nothing is deleted; a select-all leaves it in place. A bill available to every campus, which includes one with no campus while multi-org is off, needs a caller with no campus limit and no restriction on that permission: explicit ids that include one answer 403 with every_campus_record_delete_desc (every_campus_organization_record_delete_desc while multi-org is on), and a select-all skips it. The response reports how many were deleted and how many a select-all skipped.

Required permission: Full Write Accounting

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

The record type to search: 1 = bills (payables), 2 = invoices (receivables).

int32
≥ 1

Return the single bill with this id.

string

Return bills whose memo contains the given text.

string

Return bills whose reference (or invoice number) contains the given text.

boolean

If true, returns repeating bill templates; if false, only one-time bills.

boolean

If true, returns only fully paid bills; if false, only bills with a remaining amount.

int32
≥ 1

The id of a payee (vendor or customer). Returns bills for that payee.

date-time

Return bills due on or after this date.

date-time

Return bills due on or before this date.

string

Comma-delimited list of status values: 1 = Not Yet Due (due more than 14 days out), 2 = Upcoming (due within the next 14 days, including past-due bills), 3 = Past Due, 4 = Paid, 5 = Written Off.

string

Comma-delimited list of account ids. Returns bills with a line item posted to one of those accounts.

string

Comma-delimited list of fund ids. Returns bills with a line item in one of those funds.

string

Comma-delimited list of accounting tag ids. Returns bills with a line item carrying one of those tags.

string

Comma-delimited list of campus ids. Returns records whose campus set includes one of them (records that belong to every campus are not matched). Ignored while multi-campus is off.

string

Organization ids, comma-separated; honoured only while multi-org is on. A record matches when it is scoped to one of them or has a campus in one of them.

Body Params

The ids to delete

ids
array of doubles | null

The ids the operation applies to: an include list by default, or an exclude list when include is false. For deletes, required unless include is false.

ids
boolean | null

Whether ids is an include list (true, default) or an exclude list (false). Setting include to false with no ids applies the operation to every record matching the query filters.

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