ingestions.amendment_proposal
Prepare a manual amendment from a complete retained agreement extraction. Returns a proposal only; does not change the contract.
What it does
Prepare a transient manual amendment from exact complete retained JSON classified agreement. Structured source: type:amendment, business, contract (existing name), parties:{role:name}, effectiveAt and terms:{right:{term:stringValue}}. Select existing current priced contractId/expectedDocumentId explicitly. Caller must supply acceptanceEvidence; source/model never infers legal acceptance. Ordinary contracts.amend validates resolved terms, service boundaries and immutable prior obligations. Return source pointers and frozen contract evidence, no events/receipt/blob/revision.
Execute the ordinary command separately with current write authority; no activation, fee posting or automatic execution. PDFs/general clauses and durable amendment resolution unsupported; inline text unverified; preview not write guarantee.
Before you send it
An authorized OAuth connection may call it, including a headless client. Effective membership, application grant and token permissions still apply. Describe ingestions.amendment_proposal through GET /v1/catalog/commands/{name} before acting.
This command does not accept source_document_id in its envelope. Any input evidence requirements remain as documented below.
Inputs
Put these fields inside the envelope’s input object. The outer envelope names the command, a stable idempotency_key and effective_at; request and recovery rules explain those separately. Use exact minor-unit integer strings for monetary fields. Take existing IDs from prior reads or command results; choose a new identity only where the command asks for one.
Required means required within its containing object; an optional parent can be omitted.
| Field | Type | Required | Meaning and accepted values |
|---|---|---|---|
ingestionId | string | Yes | |
amendmentText | string | Yes | |
contractId | string | Yes | |
expectedDocumentId | string | Yes | |
acceptanceEvidence | array | No | Items: object. Minimum items: 0. Maximum items: 20. |
acceptanceEvidence[].kind | string | Yes | Choose "tap_message", "x402_receipt", "chain_tx", "signed_doc", "stripe_object", "other". |
acceptanceEvidence[].ref | string | Yes | Minimum length: 1. |
acceptanceEvidence[].signer | string | No | Minimum length: 1. |
After acceptance
When the command emits events, its documented effects and receipt are recorded in the command transaction. The response returns commandId, replayed, the command-specific result below and emitted events with their IDs and CIDs. A command is not automatically a cash movement or revenue recognition: use the behavior above to determine what this command records.
Inspect result and the affected records or reports before continuing. Save returned identifiers for later calls. Fetch GET /v1/commands/{id} with commandId to recover the accepted receipt; retry the same intent with the same idempotency key if the response was lost. Some commands can succeed with events: [] and return a transient result and commandId without persisting a receipt. A lookup of that ID can return null; retain the returned result and verify the affected record. Retrying can re-evaluate the current state rather than replay a stored result. A domain no_change is a separate success outcome with no persisted receipt.
Result fields
Required means required within its containing object; an optional parent can be omitted.
| Field | Type | Required | Meaning and accepted values |
|---|---|---|---|
disposition | string | Yes | Choose "ready", "needs_information". |
source | object | Yes | |
source.documentId | string | Yes | |
source.cid | string | Yes | |
source.format | string | Yes | Choose "markdown", "text", "document". |
source.provenance | string | Yes | Choose "caller_supplied_unverified", "registered_bytes". |
source.textCid | string | Yes | |
source.location | object | Yes | |
source.location.start | integer | Yes | Minimum: 0. |
source.location.end | integer | Yes | Minimum: 0. |
missing | array | Yes | Items: string. |
contract | object | No | |
contract.id | string | Yes | |
contract.documentId | string | Yes | |
contract.cid | string | Yes | |
preview | object | No | |
preview.status | string | Yes | Choose "draft", "offer", "active". |
preview.name | string | Yes | |
preview.activities | array | Yes | Items: object. Maximum items: 100. |
preview.activities[].key | string | Yes | |
preview.activities[].activityDocumentId | string | Yes | |
preview.activities[].terms | object | Yes | |
termsEvidence | array | No | Items: object. |
termsEvidence[].activityKey | string | Yes | |
termsEvidence[].term | string | Yes | |
termsEvidence[].value | string | Yes | |
termsEvidence[].origin | string | Yes | Choose "source", "contract". |
termsEvidence[].pointer | string or null | Yes | |
termsEvidence[].documentId | string | Yes | |
termsEvidence[].cid | string | Yes | |
termsEvidence[].textCid | string or null | Yes | |
command | object | No | |
command.name | string | Yes | Must be "contracts.amend". |
command.input | object | Yes | |
command.input.lifecycle | object | No | |
command.input.lifecycle.term | object | No | |
command.input.lifecycle.term.index | integer | Yes | Minimum: 1. Maximum: 9007199254740991. |
command.input.lifecycle.term.startsOn | string | Yes | Format: date. Minimum length: 1. Pattern: "^\\d{4}-\\d{2}-\\d{2}$". |
command.input.lifecycle.term.endsOn | string | No | Format: date. Minimum length: 1. Pattern: "^\\d{4}-\\d{2}-\\d{2}$". |
command.input.lifecycle.term.rolling | schema-defined | No | Choose a matching alternative in the exact schema below. |
command.input.lifecycle.atTermEnd | string | Yes | Choose "renew", "evergreen", "end", "renew_once". |
command.input.lifecycle.renewal | object | No | |
command.input.lifecycle.renewal.length | schema-defined | No | Choose a matching alternative in the exact schema below. |
command.input.lifecycle.renewal.price | schema-defined | Yes | Choose a matching alternative in the exact schema below. |
command.input.lifecycle.notice | object | Yes | |
command.input.lifecycle.notice.days | integer | Yes | Minimum: 0. Maximum: 366. |
command.input.lifecycle.notice.basis | string | Yes | Choose "calendar", "weekdays". |
command.input.lifecycle.notice.remindDaysBefore | integer | No | Minimum: 0. Maximum: 366. |
command.input.lifecycle.cancellation | object | No | |
command.input.lifecycle.cancellation.windows | array | Yes | Items: object. Minimum items: 0. Maximum items: 20. |
command.input.lifecycle.cancellation.windows[].from | string | Yes | Choose "term_start", "term_end". |
command.input.lifecycle.cancellation.windows[].days | integer | Yes | Minimum: 0. Maximum: 366. |
command.input.lifecycle.cancellation.onlyInWindows | boolean | No | Must be true. |
command.input.lifecycle.cancellation.otherwise | schema-defined | Yes | Choose a matching alternative in the exact schema below. |
command.input.lifecycle.changes | object | No | |
command.input.lifecycle.changes.termsChange | schema-defined | No | Choose a matching alternative in the exact schema below. |
command.input.lifecycle.changes.priceChange | schema-defined | No | Choose a matching alternative in the exact schema below. |
command.input.agreements | object | No | |
command.input.agreements.changes | object | No | |
command.input.agreements.changes.termsChange | schema-defined | No | Choose a matching alternative in the exact schema below. |
command.input.agreements.changes.priceChange | schema-defined | No | Choose a matching alternative in the exact schema below. |
command.input.agreements.refs | array | Yes | Items: object. Minimum items: 1. Maximum items: 20. |
command.input.agreements.refs[].key | string | Yes | Minimum length: 1. |
command.input.agreements.refs[].role | string | Yes | Choose "agreement", "order_form", "schedule", "policy". |
command.input.agreements.refs[].url | string | Yes | Format: uri. Minimum length: 1. Maximum length: 2048. |
command.input.agreements.refs[].label | string | No | Minimum length: 1. |
command.input.agreements.refs[].cid | string | No | Minimum length: 1. |
command.input.agreements.refs[].method | object | Yes | |
command.input.agreements.refs[].method.kind | string | Yes | Choose "pdf", "markdown", "html", "html_blanked", "html_extract", "embedded_json", "api_json", "text_render", "unstable". |
command.input.agreements.refs[].method.command | string | No | Minimum length: 1. Maximum length: 1000. |
command.input.agreements.refs[].seenAt | string | Yes | Format: date. Minimum length: 1. Pattern: "^\\d{4}-\\d{2}-\\d{2}$". |
command.input.agreements.refs[].history | string | No | Choose "vendor_archive", "git", "wayback". |
command.input.agreements.refs[].catalog | object | No | |
command.input.agreements.refs[].catalog.cid | string | Yes | Minimum length: 1. |
command.input.agreements.refs[].documentId | string | No | Minimum length: 1. |
command.input.agreements.precedence | object | Yes | |
command.input.agreements.precedence.stated | boolean | Yes | |
command.input.agreements.precedence.order | array | No | Items: string. Minimum items: 0. Maximum items: 20. |
command.input.agreements.precedence.orderFormWinsOn | array | No | Items: string. Minimum items: 0. Maximum items: 20. |
command.input.paymentTerms | object | No | |
command.input.paymentTerms.statementClosingDay | integer | No | Minimum: 1. Maximum: 31. |
command.input.paymentTerms.paymentDueDay | integer | No | Minimum: 1. Maximum: 31. |
command.input.paymentTerms.autopay | boolean | No | Whether the issuer is instructed to collect automatically from the paying account. |
command.input.paymentTerms.payingAccountId | string | No | Registered payment account; omit to clear the default. Minimum length: 1. |
command.input.contractId | string | Yes | Minimum length: 1. |
command.input.expectedDocumentId | string | Yes | Minimum length: 1. |
command.input.effectiveAt | string | Yes | Format: date-time. Minimum length: 1. |
command.input.terms | object | No | |
command.input.proration | object | No | |
command.input.sourceDocumentIds | array | No | Items: string. Maximum items: 100. |
command.input.acceptanceEvidence | array | Yes | Items: object. Minimum items: 1. Maximum items: 20. |
command.input.acceptanceEvidence[].kind | string | Yes | Choose "tap_message", "x402_receipt", "chain_tx", "signed_doc", "stripe_object", "other". |
command.input.acceptanceEvidence[].ref | string | Yes | Minimum length: 1. |
command.input.acceptanceEvidence[].signer | string | No | Minimum length: 1. |
command.source_document_id | string | Yes | |
command.effective_at | string | Yes | Format: date-time. |
command.idempotency_key | string | Yes |
All commands · Operation and errors · Reusable schemas
Keep credentials out of prompts; rehearse writes only in a disposable sandbox.
Exact request schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"name": {
"const": "ingestions.amendment_proposal"
},
"input": {
"type": "object",
"additionalProperties": false,
"required": [
"ingestionId",
"amendmentText",
"contractId",
"expectedDocumentId"
],
"properties": {
"ingestionId": {
"type": "string"
},
"amendmentText": {
"type": "string"
},
"contractId": {
"type": "string"
},
"expectedDocumentId": {
"type": "string"
},
"acceptanceEvidence": {
"type": "array",
"minItems": 0,
"maxItems": 20,
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"kind",
"ref"
],
"properties": {
"kind": {
"enum": [
"tap_message",
"x402_receipt",
"chain_tx",
"signed_doc",
"stripe_object",
"other"
]
},
"ref": {
"type": "string",
"minLength": 1
},
"signer": {
"type": "string",
"minLength": 1
}
}
}
}
}
},
"idempotency_key": {
"type": "string",
"minLength": 1,
"maxLength": 256
},
"effective_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
}
},
"required": [
"name",
"input",
"idempotency_key",
"effective_at"
],
"additionalProperties": false
}Accepted command receipt
{
"type": "object",
"required": [
"commandId",
"replayed",
"result",
"events"
],
"properties": {
"commandId": {
"type": "string"
},
"replayed": {
"type": "boolean"
},
"imported": {
"const": true,
"description": "The command's events are history from before the business joined Economico, recorded as an import: free of monthly events."
},
"result": {
"type": "object",
"additionalProperties": false,
"required": [
"disposition",
"source",
"missing"
],
"allOf": [
{
"if": {
"properties": {
"disposition": {
"const": "ready"
}
}
},
"then": {
"required": [
"contract",
"preview",
"termsEvidence",
"command"
]
}
}
],
"properties": {
"disposition": {
"enum": [
"ready",
"needs_information"
]
},
"source": {
"type": "object",
"additionalProperties": false,
"required": [
"documentId",
"cid",
"format",
"provenance",
"textCid",
"location"
],
"properties": {
"documentId": {
"type": "string"
},
"cid": {
"type": "string"
},
"format": {
"enum": [
"markdown",
"text",
"document"
]
},
"provenance": {
"enum": [
"caller_supplied_unverified",
"registered_bytes"
]
},
"textCid": {
"type": "string"
},
"location": {
"type": "object",
"additionalProperties": false,
"required": [
"start",
"end"
],
"properties": {
"start": {
"type": "integer",
"minimum": 0
},
"end": {
"type": "integer",
"minimum": 0
}
}
}
}
},
"missing": {
"type": "array",
"items": {
"type": "string"
}
},
"contract": {
"type": "object",
"additionalProperties": false,
"required": [
"id",
"documentId",
"cid"
],
"properties": {
"id": {
"type": "string"
},
"documentId": {
"type": "string"
},
"cid": {
"type": "string"
}
}
},
"preview": {
"type": "object",
"additionalProperties": false,
"required": [
"status",
"name",
"activities"
],
"properties": {
"status": {
"enum": [
"draft",
"offer",
"active"
]
},
"name": {
"type": "string"
},
"activities": {
"type": "array",
"maxItems": 100,
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"key",
"activityDocumentId",
"terms"
],
"properties": {
"key": {
"type": "string"
},
"activityDocumentId": {
"type": "string"
},
"terms": {
"type": "object",
"maxProperties": 100,
"additionalProperties": {
"type": "string"
}
}
}
}
}
}
},
"termsEvidence": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"activityKey",
"term",
"value",
"origin",
"pointer",
"documentId",
"cid",
"textCid"
],
"properties": {
"activityKey": {
"type": "string"
},
"term": {
"type": "string"
},
"value": {
"type": "string"
},
"origin": {
"enum": [
"source",
"contract"
]
},
"pointer": {
"type": [
"string",
"null"
]
},
"documentId": {
"type": "string"
},
"cid": {
"type": "string"
},
"textCid": {
"type": [
"string",
"null"
]
}
}
}
},
"command": {
"type": "object",
"additionalProperties": false,
"required": [
"name",
"input",
"source_document_id",
"effective_at",
"idempotency_key"
],
"properties": {
"name": {
"const": "contracts.amend"
},
"input": {
"type": "object",
"additionalProperties": false,
"required": [
"contractId",
"expectedDocumentId",
"effectiveAt",
"acceptanceEvidence"
],
"properties": {
"lifecycle": {
"type": "object",
"additionalProperties": false,
"properties": {
"term": {
"type": "object",
"additionalProperties": false,
"properties": {
"index": {
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991
},
"startsOn": {
"type": "string",
"minLength": 1,
"format": "date",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"endsOn": {
"type": "string",
"minLength": 1,
"format": "date",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"rolling": {
"anyOf": [
{
"type": "object",
"additionalProperties": false,
"properties": {
"everyMonths": {
"type": "integer",
"minimum": 1,
"maximum": 120
}
},
"required": [
"everyMonths"
]
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"everyDays": {
"type": "integer",
"minimum": 1,
"maximum": 3660
}
},
"required": [
"everyDays"
]
}
]
}
},
"required": [
"index",
"startsOn"
]
},
"atTermEnd": {
"enum": [
"renew",
"evergreen",
"end",
"renew_once"
]
},
"renewal": {
"type": "object",
"additionalProperties": false,
"properties": {
"length": {
"anyOf": [
{
"type": "object",
"additionalProperties": false,
"properties": {
"everyMonths": {
"type": "integer",
"minimum": 1,
"maximum": 120
}
},
"required": [
"everyMonths"
]
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"everyDays": {
"type": "integer",
"minimum": 1,
"maximum": 3660
}
},
"required": [
"everyDays"
]
}
]
},
"price": {
"anyOf": [
{
"type": "object",
"additionalProperties": false,
"properties": {
"rule": {
"enum": [
"same",
"list"
]
},
"reducedLosesPrice": {
"type": "object",
"additionalProperties": false,
"properties": {
"quantityTerms": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"right": {
"type": "string",
"minLength": 1
},
"term": {
"type": "string",
"minLength": 1
}
},
"required": [
"right",
"term"
]
},
"maxItems": 100,
"minItems": 1
}
},
"required": [
"quantityTerms"
]
}
},
"required": [
"rule"
]
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"rule": {
"const": "uplift"
},
"bps": {
"type": "integer",
"minimum": 0,
"maximum": 100000
},
"terms": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"right": {
"type": "string",
"minLength": 1
},
"term": {
"type": "string",
"minLength": 1
}
},
"required": [
"right",
"term"
]
},
"maxItems": 100,
"minItems": 1
},
"reducedLosesPrice": {
"type": "object",
"additionalProperties": false,
"properties": {
"quantityTerms": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"right": {
"type": "string",
"minLength": 1
},
"term": {
"type": "string",
"minLength": 1
}
},
"required": [
"right",
"term"
]
},
"maxItems": 100,
"minItems": 1
}
},
"required": [
"quantityTerms"
]
}
},
"required": [
"rule",
"bps",
"terms"
]
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"rule": {
"const": "capped"
},
"bps": {
"type": "integer",
"minimum": 0,
"maximum": 100000
},
"terms": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"right": {
"type": "string",
"minLength": 1
},
"term": {
"type": "string",
"minLength": 1
}
},
"required": [
"right",
"term"
]
},
"maxItems": 100,
"minItems": 1
},
"index": {
"type": "string",
"minLength": 1
},
"uncappedWhen": {
"type": "array",
"items": {
"enum": [
"quantity_reduced",
"term_shortened"
]
},
"maxItems": 2,
"minItems": 0
},
"reducedLosesPrice": {
"type": "object",
"additionalProperties": false,
"properties": {
"quantityTerms": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"right": {
"type": "string",
"minLength": 1
},
"term": {
"type": "string",
"minLength": 1
}
},
"required": [
"right",
"term"
]
},
"maxItems": 100,
"minItems": 1
}
},
"required": [
"quantityTerms"
]
}
},
"required": [
"rule",
"bps",
"terms"
]
}
]
}
},
"required": [
"price"
]
},
"notice": {
"type": "object",
"additionalProperties": false,
"properties": {
"days": {
"type": "integer",
"minimum": 0,
"maximum": 366
},
"basis": {
"enum": [
"calendar",
"weekdays"
]
},
"remindDaysBefore": {
"type": "integer",
"minimum": 0,
"maximum": 366
}
},
"required": [
"days",
"basis"
]
},
"cancellation": {
"type": "object",
"additionalProperties": false,
"properties": {
"windows": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"from": {
"enum": [
"term_start",
"term_end"
]
},
"days": {
"type": "integer",
"minimum": 0,
"maximum": 366
}
},
"required": [
"from",
"days"
]
},
"maxItems": 20,
"minItems": 0
},
"onlyInWindows": {
"const": true
},
"otherwise": {
"anyOf": [
{
"type": "object",
"additionalProperties": false,
"properties": {
"type": {
"const": "none"
}
},
"required": [
"type"
]
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"type": {
"const": "fee"
},
"right": {
"type": "string",
"minLength": 1
}
},
"required": [
"type",
"right"
]
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"type": {
"const": "accelerate"
},
"rights": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
},
"maxItems": 100,
"minItems": 1
}
},
"required": [
"type",
"rights"
]
}
]
}
},
"required": [
"windows",
"otherwise"
]
},
"changes": {
"type": "object",
"additionalProperties": false,
"properties": {
"termsChange": {
"anyOf": [
{
"type": "object",
"additionalProperties": false,
"properties": {
"rule": {
"const": "on_posting"
},
"from": {
"type": "string",
"minLength": 1
}
},
"required": [
"rule"
]
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"rule": {
"const": "after_notice"
},
"from": {
"type": "string",
"minLength": 1
},
"noticeDays": {
"type": "integer",
"minimum": 0,
"maximum": 366
}
},
"required": [
"rule",
"noticeDays"
]
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"rule": {
"const": "next_term"
},
"from": {
"type": "string",
"minLength": 1
}
},
"required": [
"rule"
]
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"rule": {
"const": "at_renewal"
},
"from": {
"type": "string",
"minLength": 1
}
},
"required": [
"rule"
]
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"rule": {
"const": "locked_to_order"
},
"from": {
"type": "string",
"minLength": 1
}
},
"required": [
"rule"
]
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"rule": {
"const": "objection_until_renewal"
},
"from": {
"type": "string",
"minLength": 1
}
},
"required": [
"rule"
]
}
]
},
"priceChange": {
"anyOf": [
{
"type": "object",
"additionalProperties": false,
"properties": {
"rule": {
"const": "no_notice"
},
"from": {
"type": "string",
"minLength": 1
}
},
"required": [
"rule"
]
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"rule": {
"const": "after_notice"
},
"from": {
"type": "string",
"minLength": 1
},
"noticeDays": {
"type": "integer",
"minimum": 0,
"maximum": 366
}
},
"required": [
"rule",
"noticeDays"
]
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"rule": {
"const": "held_for_paid_term"
},
"from": {
"type": "string",
"minLength": 1
},
"noticeDays": {
"type": "integer",
"minimum": 0,
"maximum": 366
}
},
"required": [
"rule",
"noticeDays"
]
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"rule": {
"const": "at_renewal"
},
"from": {
"type": "string",
"minLength": 1
}
},
"required": [
"rule"
]
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"rule": {
"const": "capped_at_renewal"
},
"from": {
"type": "string",
"minLength": 1
},
"capPpm": {
"type": "integer",
"minimum": 0,
"maximum": 10000000
},
"index": {
"type": "string",
"minLength": 1
}
},
"required": [
"rule",
"capPpm"
]
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"rule": {
"const": "mid_term_credit"
},
"from": {
"type": "string",
"minLength": 1
}
},
"required": [
"rule"
]
}
]
}
},
"required": []
}
},
"required": [
"atTermEnd",
"notice"
]
},
"agreements": {
"type": "object",
"additionalProperties": false,
"properties": {
"changes": {
"type": "object",
"additionalProperties": false,
"properties": {
"termsChange": {
"anyOf": [
{
"type": "object",
"additionalProperties": false,
"properties": {
"rule": {
"const": "on_posting"
},
"from": {
"type": "string",
"minLength": 1
}
},
"required": [
"rule"
]
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"rule": {
"const": "after_notice"
},
"from": {
"type": "string",
"minLength": 1
},
"noticeDays": {
"type": "integer",
"minimum": 0,
"maximum": 366
}
},
"required": [
"rule",
"noticeDays"
]
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"rule": {
"const": "next_term"
},
"from": {
"type": "string",
"minLength": 1
}
},
"required": [
"rule"
]
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"rule": {
"const": "at_renewal"
},
"from": {
"type": "string",
"minLength": 1
}
},
"required": [
"rule"
]
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"rule": {
"const": "locked_to_order"
},
"from": {
"type": "string",
"minLength": 1
}
},
"required": [
"rule"
]
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"rule": {
"const": "objection_until_renewal"
},
"from": {
"type": "string",
"minLength": 1
}
},
"required": [
"rule"
]
}
]
},
"priceChange": {
"anyOf": [
{
"type": "object",
"additionalProperties": false,
"properties": {
"rule": {
"const": "no_notice"
},
"from": {
"type": "string",
"minLength": 1
}
},
"required": [
"rule"
]
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"rule": {
"const": "after_notice"
},
"from": {
"type": "string",
"minLength": 1
},
"noticeDays": {
"type": "integer",
"minimum": 0,
"maximum": 366
}
},
"required": [
"rule",
"noticeDays"
]
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"rule": {
"const": "held_for_paid_term"
},
"from": {
"type": "string",
"minLength": 1
},
"noticeDays": {
"type": "integer",
"minimum": 0,
"maximum": 366
}
},
"required": [
"rule",
"noticeDays"
]
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"rule": {
"const": "at_renewal"
},
"from": {
"type": "string",
"minLength": 1
}
},
"required": [
"rule"
]
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"rule": {
"const": "capped_at_renewal"
},
"from": {
"type": "string",
"minLength": 1
},
"capPpm": {
"type": "integer",
"minimum": 0,
"maximum": 10000000
},
"index": {
"type": "string",
"minLength": 1
}
},
"required": [
"rule",
"capPpm"
]
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"rule": {
"const": "mid_term_credit"
},
"from": {
"type": "string",
"minLength": 1
}
},
"required": [
"rule"
]
}
]
}
},
"required": []
},
"refs": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"key": {
"type": "string",
"minLength": 1
},
"role": {
"enum": [
"agreement",
"order_form",
"schedule",
"policy"
]
},
"url": {
"type": "string",
"minLength": 1,
"format": "uri",
"maxLength": 2048
},
"label": {
"type": "string",
"minLength": 1
},
"cid": {
"type": "string",
"minLength": 1
},
"method": {
"type": "object",
"additionalProperties": false,
"properties": {
"kind": {
"enum": [
"pdf",
"markdown",
"html",
"html_blanked",
"html_extract",
"embedded_json",
"api_json",
"text_render",
"unstable"
]
},
"command": {
"type": "string",
"minLength": 1,
"maxLength": 1000
}
},
"required": [
"kind"
]
},
"seenAt": {
"type": "string",
"minLength": 1,
"format": "date",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"history": {
"enum": [
"vendor_archive",
"git",
"wayback"
]
},
"catalog": {
"type": "object",
"additionalProperties": false,
"properties": {
"cid": {
"type": "string",
"minLength": 1
}
},
"required": [
"cid"
]
},
"documentId": {
"type": "string",
"minLength": 1
}
},
"required": [
"key",
"role",
"url",
"method",
"seenAt"
]
},
"maxItems": 20,
"minItems": 1
},
"precedence": {
"type": "object",
"additionalProperties": false,
"properties": {
"stated": {
"type": "boolean"
},
"order": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
},
"maxItems": 20,
"minItems": 0
},
"orderFormWinsOn": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
},
"maxItems": 20,
"minItems": 0
}
},
"required": [
"stated"
]
}
},
"required": [
"refs",
"precedence"
]
},
"paymentTerms": {
"type": "object",
"additionalProperties": false,
"properties": {
"statementClosingDay": {
"type": "integer",
"minimum": 1,
"maximum": 31
},
"paymentDueDay": {
"type": "integer",
"minimum": 1,
"maximum": 31
},
"autopay": {
"type": "boolean",
"description": "Whether the issuer is instructed to collect automatically from the paying account."
},
"payingAccountId": {
"type": "string",
"minLength": 1,
"description": "Registered payment account; omit to clear the default."
}
}
},
"contractId": {
"type": "string",
"minLength": 1
},
"expectedDocumentId": {
"type": "string",
"minLength": 1
},
"effectiveAt": {
"type": "string",
"minLength": 1,
"format": "date-time"
},
"terms": {
"type": "object",
"additionalProperties": {
"type": "object",
"additionalProperties": {
"type": "string",
"minLength": 1
}
}
},
"proration": {
"type": "object",
"additionalProperties": {
"type": "object",
"additionalProperties": false,
"required": [
"basis",
"sourceFactId"
],
"properties": {
"basis": {
"enum": [
"actual_days",
"elapsed",
"days_365",
"days_30",
"stated"
]
},
"sourceFactId": {
"type": "string",
"minLength": 1
},
"resetBillingAnchor": {
"const": true
},
"creditDisposition": {
"const": "refund"
},
"creditAmount": {
"type": "string",
"pattern": "^[0-9]+$"
},
"chargeAmount": {
"type": "string",
"pattern": "^[0-9]+$"
}
}
}
},
"sourceDocumentIds": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
},
"maxItems": 100
},
"acceptanceEvidence": {
"type": "array",
"minItems": 1,
"maxItems": 20,
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"kind",
"ref"
],
"properties": {
"kind": {
"enum": [
"tap_message",
"x402_receipt",
"chain_tx",
"signed_doc",
"stripe_object",
"other"
]
},
"ref": {
"type": "string",
"minLength": 1
},
"signer": {
"type": "string",
"minLength": 1
}
}
}
}
}
},
"source_document_id": {
"type": "string"
},
"effective_at": {
"type": "string",
"format": "date-time"
},
"idempotency_key": {
"type": "string"
}
}
}
}
},
"events": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"cid": {
"type": "string"
}
}
}
}
}
}