Add credit memo

Apply a credit memo (invoices) or adjustment (payables) against a bill's line items, posting a reversing journal entry. Retrieve the bill's line items and remaining balances from /api/bills/pay/details, then provide the amount to credit per line. The memo posts inside the bill's organization's books, so it is refused (400) when an account it posts to belongs to another organization (an account with no organization belongs to the default organization).

Required permission: Full Write Accounting

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

The id of the bill

Body Params

The details of the credit

date | null
required

The date of the credit. Cannot be in the future.

reason
object | null
required

The reason for the credit. Provide the id or code: for invoices credit_memo_reason_refund, credit_memo_reason_overpayment, credit_memo_reason_return, credit_memo_reason_discount, credit_memo_reason_billing_error, credit_memo_reason_fee_adjustment, credit_memo_reason_service_not_provided, credit_memo_reason_dispute, or credit_memo_reason_other; for payables payable_adjustment_overbilling, payable_adjustment_duplicate, payable_adjustment_rebate, payable_adjustment_not_rendered, payable_adjustment_return, or payable_adjustment_other.

items
array of objects | null
required

The bill's line items with the amount to credit per line. At least one line must have a payment greater than zero, and no line may be credited beyond its remaining balance.

items*
string | null

Optional comments appended to the reason on the credit's journal entry memo.

string | null

An optional reference recorded on the credit's journal entry.

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