Approve credit note

Approves a draft credit note in the credential-bound company: it takes its number (a number supplied at creation is kept and the sequence is not used), posts the credit-note journal and can then be applied to an invoice or refunded. Every line except a free-text or discount row must have an account: a draft with a line that has none is refused with 422 credit_note_line_account_missing (the code also starts the message), naming each such line as error.fields.line_items.N.account_id in the order the credit note lists its lines; set the account with creditNote.update (account_id or account_code) and approve again. Nothing is posted and the credit note stays a draft. Other refusals: 422 credit_note_number_taken (a supplied number another credit note took after the draft was created), 422 document_number_unavailable, 409 document_number_conflict (retryable). Requires If-Match with the credit note ETag and an Idempotency-Key, which stores the terminal response for 24 hours. Requires the credit-notes:action OAuth scope.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required
Headers
string
required
length ≤ 191

Required unique key whose request hash and terminal response are stored durably for 24 hours.

string

Required. ETag from the latest representation; a stale value returns 412 precondition_failed. Send this header, not the standard If-Match: some HTTP intermediaries evaluate a standard If-Match themselves and can answer 412 even though the change was applied. Never send both; both with different ETags returns 400 conflicting_precondition_headers.

string
deprecated

Accepted with the same value and meaning as Cybooks-If-Match, but do not send it: an intermediary can answer 412 to it after the change was applied. Send Cybooks-If-Match instead.

Responses

Language
Credentials
OAuth2
Missing 1 required scope
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json
*/*