Write off receivables

Write off the remaining balances of the selected invoices to an expense account, posting a Write-Off journal entry per invoice. Provide ids, or explicitly set include to false to write off every receivable matching the query filters; an empty selection is rejected.

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.

Body Params

The write-off details and the selected invoice ids

date | null
required

The date of the write-off. Cannot be in the future.

reason
object | null
required

The reason for the write-off. Provide the id or code: write_off_reason_uncollectible, write_off_reason_fraud, write_off_reason_error, write_off_reason_returned, write_off_reason_policy, write_off_reason_benevolence, or write_off_reason_other.

account
object | null
required

The expense account the written-off amounts post to. Must be an expense account. Provide the id.

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.

string | null

Optional comments appended to the reason on the write-off's journal entry memo.

Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses
200

OK

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