changedInput schema / oneOf
Previous value: -[
- {
- "additionalProperties": false,
- "properties": {
- "account_id": {
- "minLength": 1,
- "type": "string"
- },
- "action": {
- "const": "set",
- "type": "string"
- },
- "document_id": {
- "minLength": 1,
- "type": "string"
- },
- "terms": {
- "additionalProperties": false,
- "anyOf": [
- {
- "required": [
- "status"
- ]
- },
- {
- "required": [
- "counterparty_name"
- ]
- },
- {
- "required": [
- "counterparty_taxpayer_id"
- ]
- },
- {
- "required": [
- "value"
- ]
- },
- {
- "required": [
- "currency"
- ]
- },
- {
- "required": [
- "start_date"
- ]
- },
- {
- "required": [
- "end_date"
- ]
- },
- {
- "required": [
- "auto_renew"
- ]
- },
- {
- "required": [
- "renewal_term_months"
- ]
- },
- {
- "required": [
- "notice_period_days"
- ]
- },
- {
- "required": [
- "owner_id"
- ]
- },
- {
- "required": [
- "metadata"
- ]
- },
- {
- "required": [
- "external_references"
- ]
- },
- {
- "required": [
- "parent_document_id"
- ]
- },
- {
- "required": [
- "relation_type"
- ]
- }
- ],
- "description": "Every attribute is optional and only the ones sent change. `null` clears an attribute, except `auto_renew` (back to `false`) and `currency` (back to `BRL` while a `value` is set); `status` does not accept `null`. A changed `end_date` starts a new `term`.",
- "minProperties": 1,
- "properties": {
- "auto_renew": {
- "description": "Whether the hourly run starts the next term the day after `end_date`, by `renewal_term_months`, instead of expiring the contract.",
- "type": "boolean"
- },
- "counterparty_name": {
- "description": "Emoji are kept; other characters outside the 3-byte range are dropped.",
- "maxLength": 255,
- "type": [
- "string",
- "null"
- ]
- },
- "counterparty_taxpayer_id": {
- "description": "A valid CPF or CNPJ, formatted or not.",
- "type": [
- "string",
- "null"
- ]
- },
- "currency": {
- "description": "Three letters, such as `BRL` or `USD`, stored in capitals; `BRL` when a `value` is set without one.",
- "type": [
- "string",
- "null"
- ]
- },
- "end_date": {
- "description": "`YYYY-MM-DD`, on or after `start_date`.",
- "format": "date",
- "type": [
- "string",
- "null"
- ]
- },
- "external_references": {
- "description": "Replaces the whole list; `[]` or `null` clears it. Two items whose `system` and `id` compare equal case aside are one reference (the first sent is kept); a pair the database takes for one beyond that (accents, `ß` and `ss`) answers `400`.",
- "items": {
- "properties": {
- "id": {
- "description": "Kept as sent; must not contain emoji or other 4-byte characters.",
- "example": "98765",
- "maxLength": 255,
- "type": "string"
- },
- "system": {
- "description": "Letters, digits, `_`, `-` and `.`; stored in lower case.",
- "example": "hubspot",
- "maxLength": 64,
- "type": "string"
- }
- },
- "required": [
- "system",
- "id"
- ],
- "type": "object"
- },
- "maxItems": 20,
- "type": [
- "array",
- "null"
- ]
- },
- "metadata": {
- "additionalProperties": {
- "maxLength": 500,
- "type": "string"
- },
- "description": "Your own fields: up to 50 keys of 1 to 40 letters, digits, `_`, `-` or `.`, each holding plain text of at most 500 characters; no number under a key ending in `_at`, or `stuck_since`.",
- "maxProperties": 50,
- "type": [
- "object",
- "null"
- ]
- },
- "notice_period_days": {
- "description": "Days before `end_date` the notice period starts (`document_contract_renewal_notice`); none when unset.",
- "maximum": 3650,
- "minimum": 0,
- "type": [
- "integer",
- "null"
- ]
- },
- "owner_id": {
- "description": "An active member of this workspace.",
- "type": [
- "string",
- "null"
- ]
- },
- "parent_document_id": {
- "description": "Links the document as an amendment of this contract document, or of any document in its family (resolved to the root); `null` unlinks a pending amendment. With it, the other attributes are the terms the instrument changes, not terms of its own; on a pending amendment a `null` value drops that term from the delta rather than clearing it on the parent.",
- "type": [
- "string",
- "null"
- ]
- },
- "relation_type": {
- "description": "Required on the first link. `amendment` may change `value`, `currency`, `start_date` (effective from, display only), `end_date`, `auto_renew`, `renewal_term_months`, `notice_period_days`, `counterparty_name`, `counterparty_taxpayer_id` and `metadata`; `renewal` only `end_date` and `value`; `termination` only `end_date` (the effective date).",
- "enum": [
- "amendment",
- "renewal",
- "termination"
- ],
- "type": "string"
- },
- "renewal_term_months": {
- "description": "How far a renewal by the term moves `end_date`; 12 when unset.",
- "maximum": 600,
- "minimum": 1,
- "type": [
- "integer",
- "null"
- ]
- },
- "start_date": {
- "description": "`YYYY-MM-DD`, from the year 1000.",
- "format": "date",
- "type": [
- "string",
- "null"
- ]
- },
- "status": {
- "description": "On creation any status, so a contract that ended before it was tracked is registered as it ended: `expired` needs an `end_date` in the past, `terminated` its `end_date`; neither is walked by the lifecycle. Afterwards only `draft` or `active` (a contract in force never goes back to `draft`): `expired` and `terminated` are set by the lifecycle and the terminate endpoint; a closed contract is reopened by renewing it.",
- "enum": [
- "draft",
- "active",
- "expired",
- "terminated"
- ],
- "type": "string"
- },
- "updated_at": {
- "description": "Optional precondition: the `updated_at` the client read the contract (or this document's amendment link) with, as the API returned it. If the contract or link changed since, nothing is written and the answer is `409` with `code: ContractChanged`. Not sent, or `null`: the write applies whatever changed meanwhile (last write wins). Compared to the second; a fraction of a second, as a JavaScript date prints it, is read and ignored. New terms and a first link have nothing to have read, so sending one answers `409`; on a pending amendment, send the link's own `updated_at` (the GET on that document).",
- "format": "date-time",
- "type": "string"
- },
- "value": {
- "description": "Two decimal places at most.",
- "maximum": 9999999999999.99,
- "minimum": 0,
- "type": [
- "number",
- "null"
- ]
- }
- },
- "type": "object"
- }
- },
- "required": [
- "action",
- "document_id",
- "terms"
- ],
- "type": "object"
- },
- {
- "additionalProperties": false,
- "properties": {
- "account_id": {
- "minLength": 1,
- "type": "string"
- },
- "action": {
- "const": "renew",
- "type": "string"
- },
- "document_id": {
- "minLength": 1,
- "type": "string"
- },
- "end_date": {
- "description": "The new end date, after the current one. Absent, empty or `null`: the current end date plus the renewal term, stepped until it is in the future; `term` is then required.",
- "format": "date",
- "type": [
- "string",
- "null"
- ]
- },
- "term": {
- "description": "The term this renewal starts from, the contract's current `term`. Required unless `end_date` is sent; for a contract in another term the renewal is refused, so a repeated request never renews twice.",
- "minimum": 1,
- "type": "integer"
- },
- "updated_at": {
- "description": "Optional precondition: the contract's `updated_at` as read. Changed since: `409`, nothing renewed.",
- "format": "date-time",
- "type": "string"
- },
- "value": {
- "description": "The new value; unchanged when not sent, cleared by `null`.",
- "type": [
- "number",
- "null"
- ]
- }
- },
- "required": [
- "action",
- "document_id",
- "updated_at",
- "term"
- ],
- "type": "object"
- },
- {
- "additionalProperties": false,
- "properties": {
- "account_id": {
- "minLength": 1,
- "type": "string"
- },
- "action": {
- "const": "terminate",
- "type": "string"
- },
- "document_id": {
- "minLength": 1,
- "type": "string"
- },
- "reason": {
- "description": "Kept in the `document_contract_terminated` event; HTML is stripped.",
- "maxLength": 500,
- "type": [
- "string",
- "null"
- ]
- },
- "updated_at": {
- "description": "Optional precondition: the contract's `updated_at` as read. Changed since: `409`, nothing terminated.",
- "format": "date-time",
- "type": "string"
- }
- },
- "required": [
- "action",
- "document_id",
- "updated_at"
- ],
- "type": "object"
- }
-]New value: +[
+ {
+ "additionalProperties": false,
+ "properties": {
+ "account_id": {
+ "minLength": 1,
+ "type": "string"
+ },
+ "action": {
+ "const": "set",
+ "type": "string"
+ },
+ "document_id": {
+ "minLength": 1,
+ "type": "string"
+ },
+ "terms": {
+ "additionalProperties": false,
+ "anyOf": [
+ {
+ "required": [
+ "status"
+ ]
+ },
+ {
+ "required": [
+ "counterparty_name"
+ ]
+ },
+ {
+ "required": [
+ "value"
+ ]
+ },
+ {
+ "required": [
+ "currency"
+ ]
+ },
+ {
+ "required": [
+ "start_date"
+ ]
+ },
+ {
+ "required": [
+ "end_date"
+ ]
+ },
+ {
+ "required": [
+ "auto_renew"
+ ]
+ },
+ {
+ "required": [
+ "renewal_term_months"
+ ]
+ },
+ {
+ "required": [
+ "notice_period_days"
+ ]
+ },
+ {
+ "required": [
+ "owner_id"
+ ]
+ },
+ {
+ "required": [
+ "metadata"
+ ]
+ },
+ {
+ "required": [
+ "external_references"
+ ]
+ },
+ {
+ "required": [
+ "parent_document_id"
+ ]
+ },
+ {
+ "required": [
+ "relation_type"
+ ]
+ }
+ ],
+ "description": "Every attribute is optional and only the ones sent change. `null` clears an attribute, except `auto_renew` (back to `false`) and `currency` (back to `BRL` while a `value` is set); `status` does not accept `null`. A changed `end_date` starts a new `term`.",
+ "minProperties": 1,
+ "properties": {
+ "auto_renew": {
+ "description": "Whether the hourly run starts the next term the day after `end_date`, by `renewal_term_months`, instead of expiring the contract.",
+ "type": "boolean"
+ },
+ "counterparty_name": {
+ "description": "Emoji are kept; other characters outside the 3-byte range are dropped.",
+ "maxLength": 255,
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "currency": {
+ "description": "Three letters, such as `BRL` or `USD`, stored in capitals; `BRL` when a `value` is set without one.",
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "end_date": {
+ "description": "`YYYY-MM-DD`, on or after `start_date`.",
+ "format": "date",
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "external_references": {
+ "description": "Replaces the whole list; `[]` or `null` clears it. Two items whose `system` and `id` compare equal case aside are one reference (the first sent is kept); a pair the database takes for one beyond that (accents, `ß` and `ss`) answers `400`.",
+ "items": {
+ "properties": {
+ "id": {
+ "description": "Kept as sent; must not contain emoji or other 4-byte characters.",
+ "example": "98765",
+ "maxLength": 255,
+ "type": "string"
+ },
+ "system": {
+ "description": "Letters, digits, `_`, `-` and `.`; stored in lower case.",
+ "example": "hubspot",
+ "maxLength": 64,
+ "type": "string"
+ }
+ },
+ "required": [
+ "system",
+ "id"
+ ],
+ "type": "object"
+ },
+ "maxItems": 20,
+ "type": [
+ "array",
+ "null"
+ ]
+ },
+ "metadata": {
+ "additionalProperties": {
+ "maxLength": 500,
+ "type": "string"
+ },
+ "description": "Your own fields: up to 50 keys of 1 to 40 letters, digits, `_`, `-` or `.`, each holding plain text of at most 500 characters; no number under a key ending in `_at`, or `stuck_since`.",
+ "maxProperties": 50,
+ "type": [
+ "object",
+ "null"
+ ]
+ },
+ "notice_period_days": {
+ "description": "Days before `end_date` the notice period starts (`document_contract_renewal_notice`); none when unset.",
+ "maximum": 3650,
+ "minimum": 0,
+ "type": [
+ "integer",
+ "null"
+ ]
+ },
+ "owner_id": {
+ "description": "An active member of this workspace.",
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "parent_document_id": {
+ "description": "Links the document as an amendment of this contract document, or of any document in its family (resolved to the root); `null` unlinks a pending amendment. With it, the other attributes are the terms the instrument changes, not terms of its own; on a pending amendment a `null` value drops that term from the delta rather than clearing it on the parent.",
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "relation_type": {
+ "description": "Required on the first link. `amendment` may change `value`, `currency`, `start_date` (effective from, display only), `end_date`, `auto_renew`, `renewal_term_months`, `notice_period_days`, `counterparty_name` and `metadata`; `renewal` only `end_date` and `value`; `termination` only `end_date` (the effective date).",
+ "enum": [
+ "amendment",
+ "renewal",
+ "termination"
+ ],
+ "type": "string"
+ },
+ "renewal_term_months": {
+ "description": "How far a renewal by the term moves `end_date`; 12 when unset.",
+ "maximum": 600,
+ "minimum": 1,
+ "type": [
+ "integer",
+ "null"
+ ]
+ },
+ "start_date": {
+ "description": "`YYYY-MM-DD`, from the year 1000.",
+ "format": "date",
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "status": {
+ "description": "On creation any status, so a contract that ended before it was tracked is registered as it ended: `expired` needs an `end_date` in the past, `terminated` its `end_date`; neither is walked by the lifecycle. Afterwards only `draft` or `active` (a contract in force never goes back to `draft`): `expired` and `terminated` are set by the lifecycle and the terminate endpoint; a closed contract is reopened by renewing it.",
+ "enum": [
+ "draft",
+ "active",
+ "expired",
+ "terminated"
+ ],
+ "type": "string"
+ },
+ "updated_at": {
+ "description": "Optional precondition: the `updated_at` the client read the contract (or this document's amendment link) with, as the API returned it. If the contract or link changed since, nothing is written and the answer is `409` with `code: ContractChanged`. Not sent, or `null`: the write applies whatever changed meanwhile (last write wins). Compared to the second; a fraction of a second, as a JavaScript date prints it, is read and ignored. New terms and a first link have nothing to have read, so sending one answers `409`; on a pending amendment, send the link's own `updated_at` (the GET on that document).",
+ "format": "date-time",
+ "type": "string"
+ },
+ "value": {
+ "description": "Two decimal places at most.",
+ "maximum": 9999999999999.99,
+ "minimum": 0,
+ "type": [
+ "number",
+ "null"
+ ]
+ }
+ },
+ "type": "object"
+ }
+ },
+ "required": [
+ "action",
+ "document_id",
+ "terms"
+ ],
+ "type": "object"
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "account_id": {
+ "minLength": 1,
+ "type": "string"
+ },
+ "action": {
+ "const": "renew",
+ "type": "string"
+ },
+ "document_id": {
+ "minLength": 1,
+ "type": "string"
+ },
+ "end_date": {
+ "description": "The new end date, after the current one. Absent, empty or `null`: the current end date plus the renewal term, stepped until it is in the future; `term` is then required.",
+ "format": "date",
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "term": {
+ "description": "The term this renewal starts from, the contract's current `term`. Required unless `end_date` is sent; for a contract in another term the renewal is refused, so a repeated request never renews twice.",
+ "minimum": 1,
+ "type": "integer"
+ },
+ "updated_at": {
+ "description": "Optional precondition: the contract's `updated_at` as read. Changed since: `409`, nothing renewed.",
+ "format": "date-time",
+ "type": "string"
+ },
+ "value": {
+ "description": "The new value; unchanged when not sent, cleared by `null`.",
+ "type": [
+ "number",
+ "null"
+ ]
+ }
+ },
+ "required": [
+ "action",
+ "document_id",
+ "updated_at",
+ "term"
+ ],
+ "type": "object"
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "account_id": {
+ "minLength": 1,
+ "type": "string"
+ },
+ "action": {
+ "const": "terminate",
+ "type": "string"
+ },
+ "document_id": {
+ "minLength": 1,
+ "type": "string"
+ },
+ "reason": {
+ "description": "Kept in the `document_contract_terminated` event; HTML is stripped.",
+ "maxLength": 500,
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "updated_at": {
+ "description": "Optional precondition: the contract's `updated_at` as read. Changed since: `409`, nothing terminated.",
+ "format": "date-time",
+ "type": "string"
+ }
+ },
+ "required": [
+ "action",
+ "document_id",
+ "updated_at"
+ ],
+ "type": "object"
+ }
+]