Contracts
Record the signature of a contract
Marks the contract as signed and records where the signature came from: signedVia is manual if it is recorded by hand and portal if the customer signed it on the portal.
contracts:writecontracts:write- 120/min
- May need an add-on
- Server annotation: Destructive
- Requires human confirmation
Result
generated from the schema
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.
The contract has to be VALIDATED, not voided and unsigned; in any other situation it rejects the request. It moves the SIGNATURE status (operativeStatus), not the document status, and signed is what decides whether the material can go out. The only way out of signed is voiding the document with /void. It requires sales documents in the plan of the account (402 without it). Returns the full contract, the same projection as its GET.
Arguments
Contract identifier.
Limits: min length 1
How the signature was recorded: manual (internal record) or portal (the customer signed in the portal).
Available options: manual, portal
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
Unique contract identifier.
Contract number, for example "C260001"; null while it is a draft.
Document status.
Available options: draft, validated, voided
Signature status.
Available options: pending, signed, cancelled
true if the contract is recorded as signed. This is what decides whether the equipment can go out.
Signature date in ISO 8601 UTC; null if not signed.
Customer identifier; null in drafts without a customer.
Associated order; null if it has none.
Number of the associated order; null if it has none.
Associated project; null if it has none.
Contract date in ISO 8601 UTC; null if not set.
Start of validity in ISO 8601 UTC; null if not applicable.
End of validity in ISO 8601 UTC; null if not applicable.
Total amount including taxes as a decimal string "1234.50"; null if not applicable.
Limits: pattern ^-?\d+\.\d{2}$
Creation date in ISO 8601 UTC; null if not recorded.
Last modification date in ISO 8601 UTC; null if not recorded.
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/contracts/{contractId}/sign.
Related pages
Link to this section: Related pagesContracts
Record the signature of a contract
Marks the contract as signed and records where the signature came from:
signedViaismanualif it is recorded by hand andportalif the customer signed it on the portal.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?