Terms
Update term
Replace a payment term.
PUT
Update term
installment_definitions replaces the stored rows. Omitted discount fields keep their stored values. Records that already use the term keep their schedule until they are next updated; a PUT without installments, or a PATCH that changes the total, term, or dates, then rebuilds the schedule from the new rows, or keeps paid rows and spreads the rest over the unpaid ones. To archive a term, send record_status set to archived.
Side effects
- Setting
is_defaultto true makes this term the organization default and clears the previous default. Setting it to false, archiving the term, or deactivating it clears the default when this term holds it.
- A write that changes the organization default term also needs the organization settings edit permission. Without it, the request returns 403.
- Installment terms need at least two
installment_definitionswith unique positions. Percent rows must add up to 100. Amount rows need exactly one remainder row in the highest position. discount_percentanddiscount_daysare accepted only when early-payment discounts are enabled for the organization.sales_discount_account_idandpurchase_discount_account_idmust be accounts of your organization.- The term name must be unique in the organization.
Headers
Optional. A unique value (a UUID works well) identifying this operation. If the request is repeated with the same key, the original response is replayed instead of the operation running again, so a retry cannot create a duplicate record. Results are replayable for 48 hours. Reusing a key with a different request body returns 422.
Maximum string length:
255Body
application/json
Response
OK