Credit notes
Validate a credit note
Closes a draft credit note: checks compliance, assigns it a number against its series, signs it and locks it as immutable.
invoices:writeinvoices:write- 120/min
- Server annotation: Destructive
- Requires human confirmation
- Not reversible
- Fiscal document
Result
generated from the schema
Fiscal document
This tool numbers the document against the fiscal series, signs it and locks it. Voiding keeps the number.
Not reversible
This tool cannot be undone.
Requires human confirmation
Put this tool on your client's “ask before running” list. The annotations are hints that the server declares, not guarantees: do not decide the approval from destructiveHint alone. The server flags this tool with _meta["anthropic, which clients that honor it use to ask a person before every call.
Server annotation
It validates a document that is then locked. Today the validation does not send the document to the tax agency, but it cannot be undone.
Only from draft; from any other status it rejects the request without touching anything. A validated credit note is no longer edited: it is voided. It takes no body. It shares scope with invoices, just like its read. Returns the full credit note, the same projection as its GET.
Arguments
Credit note identifier.
Limits: min length 1
Idempotency key chosen by the client (a UUID is recommended). Repeating the same key with the same arguments within 24 h returns the stored response without executing again; with different arguments it responds 422. It is the safe way to retry after a network failure.
Limits: min length 1, max length 255
Optimistic locking: the meta.etag you got from the detail read of this resource (or "*"). If the resource changed since, the call fails with 412 precondition_failed before writing anything; read it again and retry. Omit it to write unconditionally.
Limits: min length 1
Result
On success the result carries structuredContent with data and meta. These are the attributes of data.
Show the attributes of data
Credit note identifier.
Credit note number; null while it is a draft.
Document lifecycle status: draft, validated or voided (the same values the status filter takes).
Available options: draft, validated, voided
Issue date in ISO 8601 UTC; null if not recorded.
Currency, as an ISO 4217 code.
Contact the credit note is issued to; null if not recorded.
Invoice this credit note rectifies; null if it is not attached to any.
Subtotal before discounts and taxes, as a decimal string.
Limits: pattern ^-?\d+\.\d{2}$
Tax total, as a decimal string.
Limits: pattern ^-?\d+\.\d{2}$
Taxable base, as a decimal string.
Limits: pattern ^-?\d+\.\d{2}$
Total including taxes, as a decimal string.
Limits: pattern ^-?\d+\.\d{2}$
Creation date in ISO 8601 UTC.
Last modification date in ISO 8601 UTC.
An error is a result with isError: true and the problem in content[0].; there is no structuredContent. See Errors.
The same operation by REST
This tool runs POST /api/v1/credit-notes/{creditNoteId}/validate.
Related pages
Link to this section: Related pagesCredit notes
Validate a credit note
Closes a draft credit note: checks compliance, assigns it a number against its series, signs it and locks it as immutable.
Guides
Safe writes
An assistant that can write can also write the wrong thing. Decide which tools need a person, retry without duplicating, and know what a write sets in motion.
Guides
Errors
A tool error is a result with
isError: trueand the problem in the first text block. Branch on itscode.
Was this page helpful?