Terms of Use
Save Terms
Write and publish the terms of use for a market
PUT
Writes the market’s terms of use and, by default, publishes them. The saved document is what Get Terms serves to every instance that holds the market, so an integrator presents the terms exactly as the author wrote them. This is a database write, not a transaction: nothing is signed and nothing goes on chain.
Authority is read from the chain at the moment of the save. One of this instance’s verified wallets must be the lender of record recorded on the factory, or hold the market’s admin role or issuer role. Before a lender of record takes the market nobody holds any of these, so every save is refused with
NOT_CURATOR.
Every save that changes something writes a new version and keeps the old ones, so the history stays readable through List Terms Versions. A save identical to the current record in text, title, publication state and template binding writes nothing and answers changed: false.
Path Parameters
string
required
Market ID.
Body Parameters
Sendcontent, or templateId, or both. A request with neither is refused with VALIDATION_ERROR.
string
The document as markdown, at most 262,144 characters. Stored verbatim apart from Windows line endings, which become
\n. The stored text must also fit in 262,144 bytes of UTF-8, must not be blank, and must not contain control characters other than tab, newline and carriage return.string
Document title, at most 200 characters after trimming, with no control characters. A blank title is stored as
null. With a template and no title, the template’s title is used.boolean
default:"true"
Set to
false to save a draft. A draft is invisible to Get Terms until a later save publishes it.string
A template from this instance’s terms library, 1 to 100 characters. When present, the template’s text is saved and
content is ignored. Templates are managed in the issuer app, and only the instance that authored a template can bind it.Response Fields
object
curatorAddress records the wallet that passed the check, which is not always the lender of record’s own. After a template bind, a later save with different text keeps the binding and sets customised: true.
