{
"message": "The requested resource was not found",
"error": "not_found"
}
{
"message": "The requested resource was not found",
"error": "not_found"
}
{
"message": "The requested resource was not found",
"error": "not_found"
}
{
"message": "The requested resource was not found",
"error": "not_found"
}
{
"message": "The requested resource was not found",
"error": "not_found"
}
{
"message": "The requested resource was not found",
"error": "not_found"
}
Contracts
Update
Edits the draft while the contract was never approved. Once it is approved, the first PATCH opens a pending change as a copy of the version in force with the fields sent applied, and later PATCHes edit that change. The version in force does not change until the pending change is approved.
Send basedOnUpdatedAt with the updatedAt you read, to edit a draft or a pending change. Without it, a contract that has one answers 409 CONTRACT_PENDING_CHANGE_EXISTS. A draft that changed since you read it answers 409 CONTRACT_CHANGED. A rejected contract answers 409 CONTRACT_NOT_PENDING.
When you send lines, they are the complete set. A line you leave out is removed. Without lines, the lines stay as they are. The customer and the currency cannot change: send the same value or leave them out, else the response is 400 CONTRACT_FIELD_FIXED.
When the draft or the pending change, with this PATCH applied, has autoApprove.contract: true, the PATCH needs the contracts:approve permission and answers 403 without it. This is so even when the body does not send autoApprove, for example a rename of a contract that already auto-approves. Such a PATCH approves a draft in the same request when its content is valid. When it is not valid, the draft stays waiting and validation lists the errors. A pending change to an approved contract stays waiting, and validation lists CONTRACT_RETILE_NOT_AVAILABLE.
{
"message": "The requested resource was not found",
"error": "not_found"
}
{
"message": "The requested resource was not found",
"error": "not_found"
}
{
"message": "The requested resource was not found",
"error": "not_found"
}
{
"message": "The requested resource was not found",
"error": "not_found"
}
{
"message": "The requested resource was not found",
"error": "not_found"
}
{
"message": "The requested resource was not found",
"error": "not_found"
}
Authorizations
Authorization
string
header
required
API key authentication
Path Parameters
id
string
required
The contract ID.
Body
application/json
customerId
string
Unique identifier for a customer
Pattern: ^cus_[a-zA-Z0-9]+$
currency
string
Pattern: ^[A-Z]{3}$
name
string
Minimum string length: 1
contractStart
string<date-time>
contractEnd
string<date-time>
billingAnchor
string<date-time> | null
The date the contract's billing cycles are counted from. Null: the contract start.
billingStartsAt
string<date-time> | null
The date billing starts. Null: the contract start.
upliftPercent
string | null
The yearly price uplift, in percent.
Pattern: ^\d+(\.\d+)?$
note
string | null
autoCharge
boolean
Charge the invoices with the customer's stored payment method.
bankTransferOnly
boolean
Pay the invoices by bank transfer only.
terminatedAt
string<date-time> | null
End the contract early on this date.
terminationReason
string | null
autoApprove
object
Show child attributes
lines
object[]
The complete set of lines. An entry with an id keeps that line and changes the fields sent. An entry without one is a new line. A line left out is removed.
A line the contract already has. It keeps its identity, and each field sent changes. A field left out keeps the line's value.
Option 1
Option 2
Option 3
Show child attributes
basedOnUpdatedAt
string<date-time>
The updatedAt of the draft or pending change you read. It is required to edit a draft or a pending change. A different value answers 409 CONTRACT_CHANGED.
Response
The contract, with its pending change when the PATCH opened or edited one
A set of priced lines with a fixed term, owned by one customer and billed in one currency. The fields show the version in force: the last approved one, or the draft while nothing is approved yet. A change that waits for approval is in pendingChange.
id
string
required
Unique identifier for a contract.
Pattern: ^ctr_[a-zA-Z0-9]+$
object
enum<string>
required
Available options:
contract
merchantId
string
required
Unique identifier for an organization
Pattern: ^org_[a-zA-Z0-9]+$
customerId
string
required
Unique identifier for a customer
Pattern: ^cus_[a-zA-Z0-9]+$
currency
string
required
status
enum<string>
required
draft and rejected hold while the contract was never approved. After approval the status follows the dates, on the customer's clock: scheduled before contractStart, active from it, and ended once contractEnd or terminatedAt has passed.
Available options:
draft,
rejected,
scheduled,
active,
ended
createdAt
string<date-time>
required
When the contract was first written: the createdAt of its first version. It does not change when a version is approved or changed.
externalReference
object | null
required
The record in another system, such as a CRM deal, that the contract comes from. A create that names a record that already has a contract returns that contract and creates nothing.
Show child attributes
name
string
required
contractStart
string<date-time>
required
contractEnd
string<date-time>
required
billingAnchor
string<date-time> | null
required
The date the contract's billing cycles are counted from.
billingStartsAt
string<date-time> | null
required
The date billing starts, when it is not the contract start.
upliftPercent
string | null
required
The yearly price uplift, in percent.
note
string | null
required
autoCharge
boolean
required
bankTransferOnly
boolean
required
autoApprove
object
required
Two separate choices. contract: approve the contract, and each change to it, when it is written. It needs the contracts:approve permission. invoices: approve its invoices when they are collected.
Show child attributes
terminatedAt
string<date-time> | null
required
The date the contract was ended early.
terminationReason
string | null
required
lines
object[]
required
Show child attributes
updatedAt
string<date-time>
required
When this version last changed. Send it back as basedOnUpdatedAt to edit it.
createdByPrincipalId
string | null
required
pendingChange
object | null
required
The change that waits for a decision, in the same shape as the contract.
Show child attributes
decidedAt
string<date-time> | null
required
When the version in force was approved or rejected.
decidedByPrincipalId
string | null
required
rejectReason
string | null
required
rejectText
string | null
required
validation
object[]
The reasons the draft or pending change cannot be approved. Empty when it can, or when nothing waits. Present on the answer to one contract, not on a list.
Show child attributes
conflicts
object[]
Where the draft or pending change shares an item or a billable metric with another live contract of the customer. Present on the answer to one contract, not on a list.
Show child attributes
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/schema.json","name":"Paygentic","colors":{"primary":"#013F70","light":"#E0B1F7","dark":"#FF6F57"},"logo":{"light":"https://mintcdn.com/paygentic/uUKYt4gDqyfhF9Y7/logo/paygentic-logo-light.svg?fit=max\u0026auto=format\u0026n=uUKYt4gDqyfhF9Y7\u0026q=85\u0026s=cb1fd6b59a3c44e357ecdc522849ab37","dark":"https://mintcdn.com/paygentic/uUKYt4gDqyfhF9Y7/logo/paygentic-logo-dark.svg?fit=max\u0026auto=format\u0026n=uUKYt4gDqyfhF9Y7\u0026q=85\u0026s=e472e905a55866be14a5e51b15f16db6"},"favicon":"https://mintcdn.com/paygentic/uUKYt4gDqyfhF9Y7/favicon.svg?fit=max\u0026auto=format\u0026n=uUKYt4gDqyfhF9Y7\u0026q=85\u0026s=a93d7819e80f48ee401156e695125f09","navbar":{"links":[{"href":"mailto:support@paygentic.io","label":"Support"}]},"fonts":{"heading":{"family":"Funnel Display"},"body":{"family":"Host Grotesk"}},"integrations":{"posthog":{"apiKey":"phc_DYYQW9UMuySBrmREkYbwieAfTzyvSpOJVFm1v9DQzyh","apiHost":"https://us.i.posthog.com"}},"contextual":{"options":["copy","view","chatgpt","claude"],"display":"header"},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"paygentic","hasAudioNarration":false,"actualSubdomain":"paygentic","customDomains":["docs.paygentic.io"],"gitSource":{"type":"github","owner":"paygentic","repo":"paygentic","deployBranch":"main","contentDirectory":"projects/docs","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true,"agentFeedback":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6b09aad725348186d60b6dd7","clientVersion":"0.0.4342","searchFilterCounts":[{"language":"default","tag":"API Reference","count":177},{"language":"default","tag":"Documentation","count":44},{"language":"default","tag":"Platform","count":31},{"language":"default","tag":"Subscriptions","count":15},{"language":"default","tag":"Sources","count":14},{"language":"default","tag":"Billing","count":12},{"language":"default","tag":"Invoices V2","count":12},{"language":"default","tag":"Pricing","count":10},{"language":"default","tag":"Billing Schedules","count":9},{"language":"default","tag":"Orders","count":9}]},"assistantConfig":{},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":true},"customCss":[]}
{"page":{"pagePath":"api-reference/contracts/update","slug":"/api-reference/contracts/update","pageMetadata":{"title":"Update","description":"Edits the draft while the contract was never approved. Once it is approved, the first PATCH opens a pending change as a copy of the version in force with the fields sent applied, and later PATCHes edit that change. The version in force does not change until the pending change is approved.\n\nSend `basedOnUpdatedAt` with the `updatedAt` you read, to edit a draft or a pending change. Without it, a contract that has one answers 409 `CONTRACT_PENDING_CHANGE_EXISTS`. A draft that changed since you read it answers 409 `CONTRACT_CHANGED`. A rejected contract answers 409 `CONTRACT_NOT_PENDING`.\n\nWhen you send `lines`, they are the complete set. A line you leave out is removed. Without `lines`, the lines stay as they are. The customer and the currency cannot change: send the same value or leave them out, else the response is 400 `CONTRACT_FIELD_FIXED`.\n\nWhen the draft or the pending change, with this PATCH applied, has `autoApprove.contract: true`, the PATCH needs the `contracts:approve` permission and answers 403 without it. This is so even when the body does not send `autoApprove`, for example a rename of a contract that already auto-approves. Such a PATCH approves a draft in the same request when its content is valid. When it is not valid, the draft stays waiting and `validation` lists the errors. A pending change to an approved contract stays waiting, and `validation` lists `CONTRACT_RETILE_NOT_AVAILABLE`.","deprecated":null,"version":null,"openapi":"/openapi.json patch /v0/contracts/{id}","href":"/api-reference/contracts/update","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsx(_components.p, {\n children: \"Edits the draft while the contract was never approved. Once it is approved, the first PATCH opens a pending change as a copy of the version in force with the fields sent applied, and later PATCHes edit that change. The version in force does not change until the pending change is approved.\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Send \", _jsx(_components.code, {\n children: \"basedOnUpdatedAt\"\n }), \" with the \", _jsx(_components.code, {\n children: \"updatedAt\"\n }), \" you read, to edit a draft or a pending change. Without it, a contract that has one answers 409 \", _jsx(_components.code, {\n children: \"CONTRACT_PENDING_CHANGE_EXISTS\"\n }), \". A draft that changed since you read it answers 409 \", _jsx(_components.code, {\n children: \"CONTRACT_CHANGED\"\n }), \". A rejected contract answers 409 \", _jsx(_components.code, {\n children: \"CONTRACT_NOT_PENDING\"\n }), \".\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"When you send \", _jsx(_components.code, {\n children: \"lines\"\n }), \", they are the complete set. A line you leave out is removed. Without \", _jsx(_components.code, {\n children: \"lines\"\n }), \", the lines stay as they are. The customer and the currency cannot change: send the same value or leave them out, else the response is 400 \", _jsx(_components.code, {\n children: \"CONTRACT_FIELD_FIXED\"\n }), \".\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"When the draft or the pending change, with this PATCH applied, has \", _jsx(_components.code, {\n children: \"autoApprove.contract: true\"\n }), \", the PATCH needs the \", _jsx(_components.code, {\n children: \"contracts:approve\"\n }), \" permission and answers 403 without it. This is so even when the body does not send \", _jsx(_components.code, {\n children: \"autoApprove\"\n }), \", for example a rename of a contract that already auto-approves. Such a PATCH approves a draft in the same request when its content is valid. When it is not valid, the draft stays waiting and \", _jsx(_components.code, {\n children: \"validation\"\n }), \" lists the errors. A pending change to an approved contract stays waiting, and \", _jsx(_components.code, {\n children: \"validation\"\n }), \" lists \", _jsx(_components.code, {\n children: \"CONTRACT_RETILE_NOT_AVAILABLE\"\n }), \".\"]\n })]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Update","description":"Edits the draft while the contract was never approved. Once it is approved, the first PATCH opens a pending change as a copy of the version in force with the fields sent applied, and later PATCHes edit that change. The version in force does not change until the pending change is approved.\n\nSend `basedOnUpdatedAt` with the `updatedAt` you read, to edit a draft or a pending change. Without it, a contract that has one answers 409 `CONTRACT_PENDING_CHANGE_EXISTS`. A draft that changed since you read it answers 409 `CONTRACT_CHANGED`. A rejected contract answers 409 `CONTRACT_NOT_PENDING`.\n\nWhen you send `lines`, they are the complete set. A line you leave out is removed. Without `lines`, the lines stay as they are. The customer and the currency cannot change: send the same value or leave them out, else the response is 400 `CONTRACT_FIELD_FIXED`.\n\nWhen the draft or the pending change, with this PATCH applied, has `autoApprove.contract: true`, the PATCH needs the `contracts:approve` permission and answers 403 without it. This is so even when the body does not send `autoApprove`, for example a rename of a contract that already auto-approves. Such a PATCH approves a draft in the same request when its content is valid. When it is not valid, the draft stays waiting and `validation` lists the errors. A pending change to an approved contract stays waiting, and `validation` lists `CONTRACT_RETILE_NOT_AVAILABLE`.","deprecated":null,"version":null,"openapi":"/openapi.json patch /v0/contracts/{id}","href":"/api-reference/contracts/update","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"tags":["Contracts"],"summary":"Update","operationId":"updateContract","description":"Edits the draft while the contract was never approved. Once it is approved, the first PATCH opens a pending change as a copy of the version in force with the fields sent applied, and later PATCHes edit that change. The version in force does not change until the pending change is approved.\n\nSend `basedOnUpdatedAt` with the `updatedAt` you read, to edit a draft or a pending change. Without it, a contract that has one answers 409 `CONTRACT_PENDING_CHANGE_EXISTS`. A draft that changed since you read it answers 409 `CONTRACT_CHANGED`. A rejected contract answers 409 `CONTRACT_NOT_PENDING`.\n\nWhen you send `lines`, they are the complete set. A line you leave out is removed. Without `lines`, the lines stay as they are. The customer and the currency cannot change: send the same value or leave them out, else the response is 400 `CONTRACT_FIELD_FIXED`.\n\nWhen the draft or the pending change, with this PATCH applied, has `autoApprove.contract: true`, the PATCH needs the `contracts:approve` permission and answers 403 without it. This is so even when the body does not send `autoApprove`, for example a rename of a contract that already auto-approves. Such a PATCH approves a draft in the same request when its content is valid. When it is not valid, the draft stays waiting and `validation` lists the errors. A pending change to an approved contract stays waiting, and `validation` lists `CONTRACT_RETILE_NOT_AVAILABLE`.","parameters":["f8e8bcbb-39f7-4862-9bca-55ffb8c1fcbd"],"requestBody":"fa1b5e98-a466-4876-a448-23123c4388ec","responses":{"200":"38762742-97c3-4a97-9af7-8b4f71f15773","400":"a21775b9-73c8-4493-87ee-58806e9f8214","401":"9a4152b3-d8d8-4dd3-b232-d9e9d4413f95","403":"90935f56-2512-4396-a1dd-f6e776375e44","404":"2bbacc22-17fc-42d0-9f88-530d3bf9916a","409":"6fef5f70-41ae-4781-9b46-7395011dcf7c","500":"bde4dc84-bf9c-4f39-bed0-8169073ea1fe"},"x-permission":"contracts:write","method":"patch","type":"path","servers":["a2a23f77-8961-4577-88d2-cf0d1c96505d","850b2015-9516-48e4-be3d-58733ff4bdc0"],"security":["b1bf53f0-ef73-44be-8abc-2a25ffdaba6f"],"path":"/v0/contracts/{id}","baseUrlOptions":["https://api.paygentic.io","https://api.sandbox.paygentic.io"],"title":"Update","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"f8e8bcbb-39f7-4862-9bca-55ffb8c1fcbd":{"in":"path","name":"id","required":true,"schema":{"type":"string","isRequired":true,"description":"The contract ID.","uniqueKey":"","typeLabel":"string"},"description":"The contract ID."}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"customerId":{"type":"string","pattern":"^cus_[a-zA-Z0-9]+$","description":"Unique identifier for a customer","uniqueKey":"customerId","typeLabel":"string"},"currency":{"type":"string","pattern":"^[A-Z]{3}$","uniqueKey":"currency","typeLabel":"string"},"name":{"type":"string","minLength":1,"uniqueKey":"name","typeLabel":"string"},"contractStart":{"type":"string","format":"date-time","uniqueKey":"contractStart","typeLabel":"string\u003cdate-time>"},"contractEnd":{"type":"string","format":"date-time","uniqueKey":"contractEnd","typeLabel":"string\u003cdate-time>"},"billingAnchor":{"oneOf":[{"type":"string","format":"date-time","description":"The date the contract's billing cycles are counted from. Null: the contract start.","uniqueKey":"billingAnchor.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","description":"The date the contract's billing cycles are counted from. Null: the contract start.","uniqueKey":"billingAnchor.oneOf.1","typeLabel":"null"}],"uniqueKey":"billingAnchor","typeLabel":"string\u003cdate-time> | null"},"billingStartsAt":{"oneOf":[{"type":"string","format":"date-time","description":"The date billing starts. Null: the contract start.","uniqueKey":"billingStartsAt.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","description":"The date billing starts. Null: the contract start.","uniqueKey":"billingStartsAt.oneOf.1","typeLabel":"null"}],"uniqueKey":"billingStartsAt","typeLabel":"string\u003cdate-time> | null"},"upliftPercent":{"oneOf":[{"type":"string","pattern":"^\\d+(\\.\\d+)?$","description":"The yearly price uplift, in percent.","uniqueKey":"upliftPercent.oneOf.0","typeLabel":"string"},{"type":"null","pattern":"^\\d+(\\.\\d+)?$","description":"The yearly price uplift, in percent.","uniqueKey":"upliftPercent.oneOf.1","typeLabel":"null"}],"uniqueKey":"upliftPercent","typeLabel":"string | null"},"note":{"oneOf":[{"type":"string","uniqueKey":"note.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"note.oneOf.1","typeLabel":"null"}],"uniqueKey":"note","typeLabel":"string | null"},"autoCharge":{"type":"boolean","description":"Charge the invoices with the customer's stored payment method.","uniqueKey":"autoCharge","typeLabel":"boolean"},"bankTransferOnly":{"type":"boolean","description":"Pay the invoices by bank transfer only.","uniqueKey":"bankTransferOnly","typeLabel":"boolean"},"terminatedAt":{"oneOf":[{"type":"string","format":"date-time","description":"End the contract early on this date.","uniqueKey":"terminatedAt.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","description":"End the contract early on this date.","uniqueKey":"terminatedAt.oneOf.1","typeLabel":"null"}],"uniqueKey":"terminatedAt","typeLabel":"string\u003cdate-time> | null"},"terminationReason":{"oneOf":[{"type":"string","uniqueKey":"terminationReason.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"terminationReason.oneOf.1","typeLabel":"null"}],"uniqueKey":"terminationReason","typeLabel":"string | null"},"autoApprove":{"type":"object","additionalProperties":false,"properties":{"contract":{"type":"boolean","uniqueKey":"autoApprove.contract","typeLabel":"boolean"},"invoices":{"type":"boolean","uniqueKey":"autoApprove.invoices","typeLabel":"boolean"}},"uniqueKey":"autoApprove","typeLabel":"object"},"lines":{"type":"array","items":{"oneOf":[{"type":"object","description":"A line the contract already has. It keeps its identity, and each field sent changes. A field left out keeps the line's value.","required":["id"],"properties":{"id":{"type":"string","pattern":"^ctrl_[a-zA-Z0-9]+$","description":"Unique identifier for a contract line. It stays the same in every version of the contract.","isRequired":true,"uniqueKey":"lines.items.[INDEX].oneOf.0.id","typeLabel":"string"},"price":{"type":"object","required":["model","properties"],"additionalProperties":false,"description":"How the line is priced: a pricing model and its properties, for example `standard` with `unitPrice`.","properties":{"model":{"type":"string","description":"The pricing model, for example `standard`.","isRequired":true,"uniqueKey":"lines.items.[INDEX].oneOf.0.price.model","typeLabel":"string"},"properties":{"type":"object","additionalProperties":true,"description":"The model's properties. A rate is a decimal string, for example `{ \"unitPrice\": \"1000\" }`.","isRequired":true,"uniqueKey":"lines.items.[INDEX].oneOf.0.price.properties","typeLabel":"object"}},"uniqueKey":"lines.items.[INDEX].oneOf.0.price","typeLabel":"object"},"billingCadence":{"type":"string","description":"How often the line bills, as an ISO 8601 duration, for example `P1M` or `P1Y`.","uniqueKey":"lines.items.[INDEX].oneOf.0.billingCadence","typeLabel":"string"},"paymentTerm":{"type":"string","enum":["in_advance","in_arrears"],"x-speakeasy-unknown-values":"allow","description":"`in_advance` charges a period when it starts. `in_arrears` charges it when it ends.","uniqueKey":"lines.items.[INDEX].oneOf.0.paymentTerm","typeLabel":"enum\u003cstring>"},"billableMetricId":{"type":"string","pattern":"^bm_[a-zA-Z0-9]+$","description":"The billable metric the line bills. Leave it out to keep the line's metric.","uniqueKey":"lines.items.[INDEX].oneOf.0.billableMetricId","typeLabel":"string"},"quantity":{"type":"string","pattern":"^\\d{1,12}(\\.\\d{1,8})?$","description":"How many units the rate applies to. A fee line is charged rate times quantity. Leave it out to keep the line's quantity.","examples":["3"],"uniqueKey":"lines.items.[INDEX].oneOf.0.quantity","typeLabel":"string"},"billDate":{"oneOf":[{"type":"string","format":"date-time","description":"The date of the line's one-time charge, when it has one.","uniqueKey":"lines.items.[INDEX].oneOf.0.billDate.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","description":"The date of the line's one-time charge, when it has one.","uniqueKey":"lines.items.[INDEX].oneOf.0.billDate.oneOf.1","typeLabel":"null"}],"uniqueKey":"lines.items.[INDEX].oneOf.0.billDate","typeLabel":"string\u003cdate-time> | null"},"startDate":{"oneOf":[{"type":"string","format":"date-time","description":"The line starts billing on this date. Null: it starts with the contract.","uniqueKey":"lines.items.[INDEX].oneOf.0.startDate.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","description":"The line starts billing on this date. Null: it starts with the contract.","uniqueKey":"lines.items.[INDEX].oneOf.0.startDate.oneOf.1","typeLabel":"null"}],"uniqueKey":"lines.items.[INDEX].oneOf.0.startDate","typeLabel":"string\u003cdate-time> | null"},"endDate":{"oneOf":[{"type":"string","format":"date-time","description":"The line stops billing on this date. Null: it ends with the contract.","uniqueKey":"lines.items.[INDEX].oneOf.0.endDate.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","description":"The line stops billing on this date. Null: it ends with the contract.","uniqueKey":"lines.items.[INDEX].oneOf.0.endDate.oneOf.1","typeLabel":"null"}],"uniqueKey":"lines.items.[INDEX].oneOf.0.endDate","typeLabel":"string\u003cdate-time> | null"},"billingAnchor":{"oneOf":[{"type":"string","format":"date-time","description":"The date the line's billing cycle is counted from. Null: the contract's anchor.","uniqueKey":"lines.items.[INDEX].oneOf.0.billingAnchor.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","description":"The date the line's billing cycle is counted from. Null: the contract's anchor.","uniqueKey":"lines.items.[INDEX].oneOf.0.billingAnchor.oneOf.1","typeLabel":"null"}],"uniqueKey":"lines.items.[INDEX].oneOf.0.billingAnchor","typeLabel":"string\u003cdate-time> | null"},"invoiceOffsetDays":{"oneOf":[{"type":"integer","minimum":-3650,"maximum":3650,"description":"Days before the charge date to invoice it, from -3650 to 3650. Null: invoice on the charge date.","uniqueKey":"lines.items.[INDEX].oneOf.0.invoiceOffsetDays.oneOf.0","typeLabel":"integer"},{"type":"null","minimum":-3650,"maximum":3650,"description":"Days before the charge date to invoice it, from -3650 to 3650. Null: invoice on the charge date.","uniqueKey":"lines.items.[INDEX].oneOf.0.invoiceOffsetDays.oneOf.1","typeLabel":"null"}],"uniqueKey":"lines.items.[INDEX].oneOf.0.invoiceOffsetDays","typeLabel":"integer | null"},"featureId":{"oneOf":[{"type":"string","description":"The feature the line grants, when it grants one.","uniqueKey":"lines.items.[INDEX].oneOf.0.featureId.oneOf.0","typeLabel":"string"},{"type":"null","description":"The feature the line grants, when it grants one.","uniqueKey":"lines.items.[INDEX].oneOf.0.featureId.oneOf.1","typeLabel":"null"}],"uniqueKey":"lines.items.[INDEX].oneOf.0.featureId","typeLabel":"string | null"},"entitlementTemplate":{"oneOf":[{"type":"object","additionalProperties":true,"description":"The entitlement the line grants, as a plan price states it.","uniqueKey":"lines.items.[INDEX].oneOf.0.entitlementTemplate.oneOf.0","typeLabel":"object"},{"type":"null","additionalProperties":true,"description":"The entitlement the line grants, as a plan price states it.","uniqueKey":"lines.items.[INDEX].oneOf.0.entitlementTemplate.oneOf.1","typeLabel":"null"}],"uniqueKey":"lines.items.[INDEX].oneOf.0.entitlementTemplate","typeLabel":"object | null"},"invoiceDisplayName":{"type":"string","description":"The line's name on the invoice. Leave it out to keep the line's name.","uniqueKey":"lines.items.[INDEX].oneOf.0.invoiceDisplayName","typeLabel":"string"},"description":{"oneOf":[{"type":"string","description":"Free text shown with the line.","uniqueKey":"lines.items.[INDEX].oneOf.0.description.oneOf.0","typeLabel":"string"},{"type":"null","description":"Free text shown with the line.","uniqueKey":"lines.items.[INDEX].oneOf.0.description.oneOf.1","typeLabel":"null"}],"uniqueKey":"lines.items.[INDEX].oneOf.0.description","typeLabel":"string | null"},"invoiceDisplayGroup":{"oneOf":[{"type":"string","description":"Lines with the same group are shown together on the invoice.","uniqueKey":"lines.items.[INDEX].oneOf.0.invoiceDisplayGroup.oneOf.0","typeLabel":"string"},{"type":"null","description":"Lines with the same group are shown together on the invoice.","uniqueKey":"lines.items.[INDEX].oneOf.0.invoiceDisplayGroup.oneOf.1","typeLabel":"null"}],"uniqueKey":"lines.items.[INDEX].oneOf.0.invoiceDisplayGroup","typeLabel":"string | null"},"rateType":{"type":"string","enum":["amount","proportion"],"x-speakeasy-unknown-values":"allow","description":"`amount` is a rate in currency. `proportion` is a share of another amount.","uniqueKey":"lines.items.[INDEX].oneOf.0.rateType","typeLabel":"enum\u003cstring>"},"supplyScope":{"type":"string","enum":["IN_SCOPE","OUTSIDE_SCOPE"],"x-speakeasy-unknown-values":"allow","description":"Whether the supply is in the scope of tax.","uniqueKey":"lines.items.[INDEX].oneOf.0.supplyScope","typeLabel":"enum\u003cstring>"},"outsideScopeLabel":{"oneOf":[{"type":"string","description":"The label of an outside-scope supply on the invoice.","uniqueKey":"lines.items.[INDEX].oneOf.0.outsideScopeLabel.oneOf.0","typeLabel":"string"},{"type":"null","description":"The label of an outside-scope supply on the invoice.","uniqueKey":"lines.items.[INDEX].oneOf.0.outsideScopeLabel.oneOf.1","typeLabel":"null"}],"uniqueKey":"lines.items.[INDEX].oneOf.0.outsideScopeLabel","typeLabel":"string | null"},"itemId":{"type":"string","pattern":"^itm_[a-zA-Z0-9]+$","description":"The item the line sells. It must belong to your merchant. Leave it out to keep the line's item.","uniqueKey":"lines.items.[INDEX].oneOf.0.itemId","typeLabel":"string"}},"additionalProperties":false,"uniqueKey":"lines.items.[INDEX].oneOf.0","typeLabel":"object"},{"type":"object","description":"A new line priced in the request. The line is a fee line when the item has no billable metric, and a metered line when it has one.","required":["itemId","price","billingCadence","paymentTerm"],"properties":{"itemId":{"type":"string","pattern":"^itm_[a-zA-Z0-9]+$","description":"The item the line sells. It must belong to your merchant.","isRequired":true,"uniqueKey":"lines.items.[INDEX].oneOf.1.itemId","typeLabel":"string"},"price":{"type":"object","required":["model","properties"],"additionalProperties":false,"description":"How the line is priced: a pricing model and its properties, for example `standard` with `unitPrice`.","properties":{"model":{"type":"string","description":"The pricing model, for example `standard`.","isRequired":true,"uniqueKey":"lines.items.[INDEX].oneOf.1.price.model","typeLabel":"string"},"properties":{"type":"object","additionalProperties":true,"description":"The model's properties. A rate is a decimal string, for example `{ \"unitPrice\": \"1000\" }`.","isRequired":true,"uniqueKey":"lines.items.[INDEX].oneOf.1.price.properties","typeLabel":"object"}},"isRequired":true,"uniqueKey":"lines.items.[INDEX].oneOf.1.price","typeLabel":"object"},"billingCadence":{"type":"string","description":"How often the line bills, as an ISO 8601 duration, for example `P1M` or `P1Y`.","isRequired":true,"uniqueKey":"lines.items.[INDEX].oneOf.1.billingCadence","typeLabel":"string"},"paymentTerm":{"type":"string","enum":["in_advance","in_arrears"],"x-speakeasy-unknown-values":"allow","description":"`in_advance` charges a period when it starts. `in_arrears` charges it when it ends.","isRequired":true,"uniqueKey":"lines.items.[INDEX].oneOf.1.paymentTerm","typeLabel":"enum\u003cstring>"},"billableMetricId":{"type":"string","pattern":"^bm_[a-zA-Z0-9]+$","description":"The billable metric the line bills. Leave it out for an item with one metric or none: a metric the item carries is taken, and an item without one gives a fee line. Name it when the item carries several.","uniqueKey":"lines.items.[INDEX].oneOf.1.billableMetricId","typeLabel":"string"},"quantity":{"type":"string","pattern":"^\\d{1,12}(\\.\\d{1,8})?$","description":"How many units the rate applies to. A fee line is charged rate times quantity. Defaults to 1.","examples":["3"],"uniqueKey":"lines.items.[INDEX].oneOf.1.quantity","typeLabel":"string"},"billDate":{"oneOf":[{"type":"string","format":"date-time","description":"The date of the line's one-time charge, when it has one.","uniqueKey":"lines.items.[INDEX].oneOf.1.billDate.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","description":"The date of the line's one-time charge, when it has one.","uniqueKey":"lines.items.[INDEX].oneOf.1.billDate.oneOf.1","typeLabel":"null"}],"uniqueKey":"lines.items.[INDEX].oneOf.1.billDate","typeLabel":"string\u003cdate-time> | null"},"startDate":{"oneOf":[{"type":"string","format":"date-time","description":"The line starts billing on this date. Null: it starts with the contract.","uniqueKey":"lines.items.[INDEX].oneOf.1.startDate.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","description":"The line starts billing on this date. Null: it starts with the contract.","uniqueKey":"lines.items.[INDEX].oneOf.1.startDate.oneOf.1","typeLabel":"null"}],"uniqueKey":"lines.items.[INDEX].oneOf.1.startDate","typeLabel":"string\u003cdate-time> | null"},"endDate":{"oneOf":[{"type":"string","format":"date-time","description":"The line stops billing on this date. Null: it ends with the contract.","uniqueKey":"lines.items.[INDEX].oneOf.1.endDate.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","description":"The line stops billing on this date. Null: it ends with the contract.","uniqueKey":"lines.items.[INDEX].oneOf.1.endDate.oneOf.1","typeLabel":"null"}],"uniqueKey":"lines.items.[INDEX].oneOf.1.endDate","typeLabel":"string\u003cdate-time> | null"},"billingAnchor":{"oneOf":[{"type":"string","format":"date-time","description":"The date the line's billing cycle is counted from. Null: the contract's anchor.","uniqueKey":"lines.items.[INDEX].oneOf.1.billingAnchor.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","description":"The date the line's billing cycle is counted from. Null: the contract's anchor.","uniqueKey":"lines.items.[INDEX].oneOf.1.billingAnchor.oneOf.1","typeLabel":"null"}],"uniqueKey":"lines.items.[INDEX].oneOf.1.billingAnchor","typeLabel":"string\u003cdate-time> | null"},"invoiceOffsetDays":{"oneOf":[{"type":"integer","minimum":-3650,"maximum":3650,"description":"Days before the charge date to invoice it, from -3650 to 3650. Null: invoice on the charge date.","uniqueKey":"lines.items.[INDEX].oneOf.1.invoiceOffsetDays.oneOf.0","typeLabel":"integer"},{"type":"null","minimum":-3650,"maximum":3650,"description":"Days before the charge date to invoice it, from -3650 to 3650. Null: invoice on the charge date.","uniqueKey":"lines.items.[INDEX].oneOf.1.invoiceOffsetDays.oneOf.1","typeLabel":"null"}],"uniqueKey":"lines.items.[INDEX].oneOf.1.invoiceOffsetDays","typeLabel":"integer | null"},"featureId":{"oneOf":[{"type":"string","description":"The feature the line grants, when it grants one.","uniqueKey":"lines.items.[INDEX].oneOf.1.featureId.oneOf.0","typeLabel":"string"},{"type":"null","description":"The feature the line grants, when it grants one.","uniqueKey":"lines.items.[INDEX].oneOf.1.featureId.oneOf.1","typeLabel":"null"}],"uniqueKey":"lines.items.[INDEX].oneOf.1.featureId","typeLabel":"string | null"},"entitlementTemplate":{"oneOf":[{"type":"object","additionalProperties":true,"description":"The entitlement the line grants, as a plan price states it.","uniqueKey":"lines.items.[INDEX].oneOf.1.entitlementTemplate.oneOf.0","typeLabel":"object"},{"type":"null","additionalProperties":true,"description":"The entitlement the line grants, as a plan price states it.","uniqueKey":"lines.items.[INDEX].oneOf.1.entitlementTemplate.oneOf.1","typeLabel":"null"}],"uniqueKey":"lines.items.[INDEX].oneOf.1.entitlementTemplate","typeLabel":"object | null"},"invoiceDisplayName":{"type":"string","description":"The line's name on the invoice. Defaults to the item's name.","uniqueKey":"lines.items.[INDEX].oneOf.1.invoiceDisplayName","typeLabel":"string"},"description":{"oneOf":[{"type":"string","description":"Free text shown with the line.","uniqueKey":"lines.items.[INDEX].oneOf.1.description.oneOf.0","typeLabel":"string"},{"type":"null","description":"Free text shown with the line.","uniqueKey":"lines.items.[INDEX].oneOf.1.description.oneOf.1","typeLabel":"null"}],"uniqueKey":"lines.items.[INDEX].oneOf.1.description","typeLabel":"string | null"},"invoiceDisplayGroup":{"oneOf":[{"type":"string","description":"Lines with the same group are shown together on the invoice.","uniqueKey":"lines.items.[INDEX].oneOf.1.invoiceDisplayGroup.oneOf.0","typeLabel":"string"},{"type":"null","description":"Lines with the same group are shown together on the invoice.","uniqueKey":"lines.items.[INDEX].oneOf.1.invoiceDisplayGroup.oneOf.1","typeLabel":"null"}],"uniqueKey":"lines.items.[INDEX].oneOf.1.invoiceDisplayGroup","typeLabel":"string | null"},"rateType":{"type":"string","enum":["amount","proportion"],"x-speakeasy-unknown-values":"allow","description":"`amount` is a rate in currency. `proportion` is a share of another amount.","uniqueKey":"lines.items.[INDEX].oneOf.1.rateType","typeLabel":"enum\u003cstring>"},"supplyScope":{"type":"string","enum":["IN_SCOPE","OUTSIDE_SCOPE"],"x-speakeasy-unknown-values":"allow","description":"Whether the supply is in the scope of tax.","uniqueKey":"lines.items.[INDEX].oneOf.1.supplyScope","typeLabel":"enum\u003cstring>"},"outsideScopeLabel":{"oneOf":[{"type":"string","description":"The label of an outside-scope supply on the invoice.","uniqueKey":"lines.items.[INDEX].oneOf.1.outsideScopeLabel.oneOf.0","typeLabel":"string"},{"type":"null","description":"The label of an outside-scope supply on the invoice.","uniqueKey":"lines.items.[INDEX].oneOf.1.outsideScopeLabel.oneOf.1","typeLabel":"null"}],"uniqueKey":"lines.items.[INDEX].oneOf.1.outsideScopeLabel","typeLabel":"string | null"}},"additionalProperties":false,"uniqueKey":"lines.items.[INDEX].oneOf.1","typeLabel":"object"},{"type":"object","description":"One new line for each price of the plan version. A line copies the price's model, rate, cadence, payment term, display fields and entitlement template, and does not follow later changes to the plan.","required":["planVersionId"],"properties":{"planVersionId":{"type":"string","description":"The plan version to copy. It must belong to your merchant.","isRequired":true,"uniqueKey":"lines.items.[INDEX].oneOf.2.planVersionId","typeLabel":"string"}},"additionalProperties":false,"uniqueKey":"lines.items.[INDEX].oneOf.2","typeLabel":"object"}],"uniqueKey":"lines.items.[INDEX]","typeLabel":"object"},"description":"The complete set of lines. An entry with an `id` keeps that line and changes the fields sent. An entry without one is a new line. A line left out is removed.","uniqueKey":"lines","typeLabel":"object[]"},"basedOnUpdatedAt":{"type":"string","format":"date-time","description":"The `updatedAt` of the draft or pending change you read. It is required to edit a draft or a pending change. A different value answers 409 `CONTRACT_CHANGED`.","uniqueKey":"basedOnUpdatedAt","typeLabel":"string\u003cdate-time>"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"customerId":"\u003cstring>","currency":"\u003cstring>","name":"\u003cstring>","contractStart":"2023-11-07T05:31:56Z","contractEnd":"2023-11-07T05:31:56Z","billingAnchor":"2023-11-07T05:31:56Z","billingStartsAt":"2023-11-07T05:31:56Z","upliftPercent":"\u003cstring>","note":"\u003cstring>","autoCharge":true,"bankTransferOnly":true,"terminatedAt":"2023-11-07T05:31:56Z","terminationReason":"\u003cstring>","autoApprove":{"contract":true,"invoices":true},"lines":[{"id":"\u003cstring>","billingCadence":"\u003cstring>","billableMetricId":"\u003cstring>","quantity":"3","billDate":"2023-11-07T05:31:56Z","startDate":"2023-11-07T05:31:56Z","endDate":"2023-11-07T05:31:56Z","billingAnchor":"2023-11-07T05:31:56Z","invoiceOffsetDays":0,"featureId":"\u003cstring>","entitlementTemplate":{},"invoiceDisplayName":"\u003cstring>","description":"\u003cstring>","invoiceDisplayGroup":"\u003cstring>","outsideScopeLabel":"\u003cstring>","itemId":"\u003cstring>"}],"basedOnUpdatedAt":"2023-11-07T05:31:56Z"}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"38762742-97c3-4a97-9af7-8b4f71f15773":{"description":"The contract, with its pending change when the PATCH opened or edited one","content":{"application/json":{"schema":{"type":"object","description":"A set of priced lines with a fixed term, owned by one customer and billed in one currency. The fields show the version in force: the last approved one, or the draft while nothing is approved yet. A change that waits for approval is in `pendingChange`.","required":["id","object","merchantId","customerId","currency","status","createdAt","externalReference","name","contractStart","contractEnd","billingAnchor","billingStartsAt","upliftPercent","note","autoCharge","bankTransferOnly","autoApprove","terminatedAt","terminationReason","lines","updatedAt","createdByPrincipalId","pendingChange","decidedAt","decidedByPrincipalId","rejectReason","rejectText"],"properties":{"id":{"type":"string","pattern":"^ctr_[a-zA-Z0-9]+$","description":"Unique identifier for a contract.","isRequired":true,"uniqueKey":"id","typeLabel":"string"},"object":{"type":"string","enum":["contract"],"isRequired":true,"uniqueKey":"object","typeLabel":"enum\u003cstring>"},"merchantId":{"type":"string","pattern":"^org_[a-zA-Z0-9]+$","description":"Unique identifier for an organization","isRequired":true,"uniqueKey":"merchantId","typeLabel":"string"},"customerId":{"type":"string","pattern":"^cus_[a-zA-Z0-9]+$","description":"Unique identifier for a customer","isRequired":true,"uniqueKey":"customerId","typeLabel":"string"},"currency":{"type":"string","isRequired":true,"uniqueKey":"currency","typeLabel":"string"},"status":{"type":"string","enum":["draft","rejected","scheduled","active","ended"],"x-speakeasy-unknown-values":"allow","description":"`draft` and `rejected` hold while the contract was never approved. After approval the status follows the dates, on the customer's clock: `scheduled` before `contractStart`, `active` from it, and `ended` once `contractEnd` or `terminatedAt` has passed.","isRequired":true,"uniqueKey":"status","typeLabel":"enum\u003cstring>"},"createdAt":{"type":"string","format":"date-time","description":"When the contract was first written: the `createdAt` of its first version. It does not change when a version is approved or changed.","isRequired":true,"uniqueKey":"createdAt","typeLabel":"string\u003cdate-time>"},"externalReference":{"oneOf":[{"type":"object","description":"The record in another system, such as a CRM deal, that the contract comes from. A create that names a record that already has a contract returns that contract and creates nothing.","required":["provider","externalId"],"properties":{"provider":{"type":"string","pattern":"^[a-z][a-z0-9_]*$","maxLength":64,"description":"Lowercase snake_case provider identifier (e.g. `salesforce`, `netsuite`)","isRequired":true,"uniqueKey":"externalReference.oneOf.0.provider","typeLabel":"string"},"externalId":{"type":"string","pattern":"^[a-zA-Z0-9_-]+$","maxLength":255,"description":"Optional external identifier for cross-referencing with external systems. Alphanumeric characters, hyphens, and underscores only.","isRequired":true,"uniqueKey":"externalReference.oneOf.0.externalId","typeLabel":"string"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"externalReference.oneOf.0","typeLabel":"object"},{"type":"null","isRequired":true,"uniqueKey":"externalReference.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"externalReference","typeLabel":"object | null"},"name":{"type":"string","isRequired":true,"uniqueKey":"name","typeLabel":"string"},"contractStart":{"type":"string","format":"date-time","isRequired":true,"uniqueKey":"contractStart","typeLabel":"string\u003cdate-time>"},"contractEnd":{"type":"string","format":"date-time","isRequired":true,"uniqueKey":"contractEnd","typeLabel":"string\u003cdate-time>"},"billingAnchor":{"oneOf":[{"type":"string","format":"date-time","description":"The date the contract's billing cycles are counted from.","isRequired":true,"uniqueKey":"billingAnchor.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","description":"The date the contract's billing cycles are counted from.","isRequired":true,"uniqueKey":"billingAnchor.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"billingAnchor","typeLabel":"string\u003cdate-time> | null"},"billingStartsAt":{"oneOf":[{"type":"string","format":"date-time","description":"The date billing starts, when it is not the contract start.","isRequired":true,"uniqueKey":"billingStartsAt.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","description":"The date billing starts, when it is not the contract start.","isRequired":true,"uniqueKey":"billingStartsAt.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"billingStartsAt","typeLabel":"string\u003cdate-time> | null"},"upliftPercent":{"oneOf":[{"type":"string","description":"The yearly price uplift, in percent.","isRequired":true,"uniqueKey":"upliftPercent.oneOf.0","typeLabel":"string"},{"type":"null","description":"The yearly price uplift, in percent.","isRequired":true,"uniqueKey":"upliftPercent.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"upliftPercent","typeLabel":"string | null"},"note":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"note.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"note.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"note","typeLabel":"string | null"},"autoCharge":{"type":"boolean","isRequired":true,"uniqueKey":"autoCharge","typeLabel":"boolean"},"bankTransferOnly":{"type":"boolean","isRequired":true,"uniqueKey":"bankTransferOnly","typeLabel":"boolean"},"autoApprove":{"type":"object","required":["contract","invoices"],"additionalProperties":false,"description":"Two separate choices. `contract`: approve the contract, and each change to it, when it is written. It needs the `contracts:approve` permission. `invoices`: approve its invoices when they are collected.","properties":{"contract":{"type":"boolean","isRequired":true,"uniqueKey":"autoApprove.contract","typeLabel":"boolean"},"invoices":{"type":"boolean","isRequired":true,"uniqueKey":"autoApprove.invoices","typeLabel":"boolean"}},"isRequired":true,"uniqueKey":"autoApprove","typeLabel":"object"},"terminatedAt":{"oneOf":[{"type":"string","format":"date-time","description":"The date the contract was ended early.","isRequired":true,"uniqueKey":"terminatedAt.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","description":"The date the contract was ended early.","isRequired":true,"uniqueKey":"terminatedAt.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"terminatedAt","typeLabel":"string\u003cdate-time> | null"},"terminationReason":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"terminationReason.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"terminationReason.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"terminationReason","typeLabel":"string | null"},"lines":{"type":"array","items":{"type":"object","description":"A line of a contract as stored: the rate, the quantity and the dates it bills on.","required":["id","itemId","billableMetricId","copiedFromPriceId","price","quantity","billingCadence","paymentTerm","billDate","startDate","endDate","billingAnchor","invoiceOffsetDays","featureId","entitlementTemplate","invoiceDisplayName","description","invoiceDisplayGroup","rateType","supplyScope","outsideScopeLabel"],"properties":{"id":{"type":"string","pattern":"^ctrl_[a-zA-Z0-9]+$","description":"Unique identifier for a contract line. It stays the same in every version of the contract.","isRequired":true,"uniqueKey":"lines.items.[INDEX].id","typeLabel":"string"},"itemId":{"oneOf":[{"type":"string","pattern":"^itm_[a-zA-Z0-9]+$","description":"The item the line sells.","isRequired":true,"uniqueKey":"lines.items.[INDEX].itemId.oneOf.0","typeLabel":"string"},{"type":"null","pattern":"^itm_[a-zA-Z0-9]+$","description":"The item the line sells.","isRequired":true,"uniqueKey":"lines.items.[INDEX].itemId.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"lines.items.[INDEX].itemId","typeLabel":"string | null"},"billableMetricId":{"oneOf":[{"type":"string","description":"The billable metric a metered line bills. Null for a fee line.","isRequired":true,"uniqueKey":"lines.items.[INDEX].billableMetricId.oneOf.0","typeLabel":"string"},{"type":"null","description":"The billable metric a metered line bills. Null for a fee line.","isRequired":true,"uniqueKey":"lines.items.[INDEX].billableMetricId.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"lines.items.[INDEX].billableMetricId","typeLabel":"string | null"},"copiedFromPriceId":{"oneOf":[{"type":"string","description":"The plan price the line was copied from, for display only. The line does not follow later changes to that price.","isRequired":true,"uniqueKey":"lines.items.[INDEX].copiedFromPriceId.oneOf.0","typeLabel":"string"},{"type":"null","description":"The plan price the line was copied from, for display only. The line does not follow later changes to that price.","isRequired":true,"uniqueKey":"lines.items.[INDEX].copiedFromPriceId.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"lines.items.[INDEX].copiedFromPriceId","typeLabel":"string | null"},"price":{"type":"object","required":["model","properties"],"additionalProperties":false,"description":"How the line is priced: a pricing model and its properties, for example `standard` with `unitPrice`.","properties":{"model":{"type":"string","description":"The pricing model, for example `standard`.","isRequired":true,"uniqueKey":"lines.items.[INDEX].price.model","typeLabel":"string"},"properties":{"type":"object","additionalProperties":true,"description":"The model's properties. A rate is a decimal string, for example `{ \"unitPrice\": \"1000\" }`.","isRequired":true,"uniqueKey":"lines.items.[INDEX].price.properties","typeLabel":"object"}},"isRequired":true,"uniqueKey":"lines.items.[INDEX].price","typeLabel":"object"},"quantity":{"type":"string","isRequired":true,"uniqueKey":"lines.items.[INDEX].quantity","typeLabel":"string"},"billingCadence":{"type":"string","isRequired":true,"uniqueKey":"lines.items.[INDEX].billingCadence","typeLabel":"string"},"paymentTerm":{"type":"string","enum":["in_advance","in_arrears"],"x-speakeasy-unknown-values":"allow","description":"`in_advance` charges a period when it starts. `in_arrears` charges it when it ends.","isRequired":true,"uniqueKey":"lines.items.[INDEX].paymentTerm","typeLabel":"enum\u003cstring>"},"billDate":{"oneOf":[{"type":"string","format":"date-time","description":"The date of the line's one-time charge.","isRequired":true,"uniqueKey":"lines.items.[INDEX].billDate.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","description":"The date of the line's one-time charge.","isRequired":true,"uniqueKey":"lines.items.[INDEX].billDate.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"lines.items.[INDEX].billDate","typeLabel":"string\u003cdate-time> | null"},"startDate":{"oneOf":[{"type":"string","format":"date-time","description":"The date the line starts billing.","isRequired":true,"uniqueKey":"lines.items.[INDEX].startDate.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","description":"The date the line starts billing.","isRequired":true,"uniqueKey":"lines.items.[INDEX].startDate.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"lines.items.[INDEX].startDate","typeLabel":"string\u003cdate-time> | null"},"endDate":{"oneOf":[{"type":"string","format":"date-time","description":"The date the line stops billing.","isRequired":true,"uniqueKey":"lines.items.[INDEX].endDate.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","description":"The date the line stops billing.","isRequired":true,"uniqueKey":"lines.items.[INDEX].endDate.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"lines.items.[INDEX].endDate","typeLabel":"string\u003cdate-time> | null"},"billingAnchor":{"oneOf":[{"type":"string","format":"date-time","description":"The date the line's billing cycle is counted from.","isRequired":true,"uniqueKey":"lines.items.[INDEX].billingAnchor.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","description":"The date the line's billing cycle is counted from.","isRequired":true,"uniqueKey":"lines.items.[INDEX].billingAnchor.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"lines.items.[INDEX].billingAnchor","typeLabel":"string\u003cdate-time> | null"},"invoiceOffsetDays":{"oneOf":[{"type":"integer","isRequired":true,"uniqueKey":"lines.items.[INDEX].invoiceOffsetDays.oneOf.0","typeLabel":"integer"},{"type":"null","isRequired":true,"uniqueKey":"lines.items.[INDEX].invoiceOffsetDays.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"lines.items.[INDEX].invoiceOffsetDays","typeLabel":"integer | null"},"featureId":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"lines.items.[INDEX].featureId.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"lines.items.[INDEX].featureId.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"lines.items.[INDEX].featureId","typeLabel":"string | null"},"entitlementTemplate":{"oneOf":[{"type":"object","additionalProperties":true,"isRequired":true,"uniqueKey":"lines.items.[INDEX].entitlementTemplate.oneOf.0","typeLabel":"object"},{"type":"null","additionalProperties":true,"isRequired":true,"uniqueKey":"lines.items.[INDEX].entitlementTemplate.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"lines.items.[INDEX].entitlementTemplate","typeLabel":"object | null"},"invoiceDisplayName":{"type":"string","isRequired":true,"uniqueKey":"lines.items.[INDEX].invoiceDisplayName","typeLabel":"string"},"description":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"lines.items.[INDEX].description.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"lines.items.[INDEX].description.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"lines.items.[INDEX].description","typeLabel":"string | null"},"invoiceDisplayGroup":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"lines.items.[INDEX].invoiceDisplayGroup.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"lines.items.[INDEX].invoiceDisplayGroup.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"lines.items.[INDEX].invoiceDisplayGroup","typeLabel":"string | null"},"rateType":{"type":"string","enum":["amount","proportion"],"x-speakeasy-unknown-values":"allow","description":"`amount` is a rate in currency. `proportion` is a share of another amount.","isRequired":true,"uniqueKey":"lines.items.[INDEX].rateType","typeLabel":"enum\u003cstring>"},"supplyScope":{"type":"string","enum":["IN_SCOPE","OUTSIDE_SCOPE"],"x-speakeasy-unknown-values":"allow","description":"Whether the supply is in the scope of tax.","isRequired":true,"uniqueKey":"lines.items.[INDEX].supplyScope","typeLabel":"enum\u003cstring>"},"outsideScopeLabel":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"lines.items.[INDEX].outsideScopeLabel.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"lines.items.[INDEX].outsideScopeLabel.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"lines.items.[INDEX].outsideScopeLabel","typeLabel":"string | null"}},"uniqueKey":"lines.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"lines","typeLabel":"object[]"},"updatedAt":{"type":"string","format":"date-time","description":"When this version last changed. Send it back as `basedOnUpdatedAt` to edit it.","isRequired":true,"uniqueKey":"updatedAt","typeLabel":"string\u003cdate-time>"},"createdByPrincipalId":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"createdByPrincipalId.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"createdByPrincipalId.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"createdByPrincipalId","typeLabel":"string | null"},"pendingChange":{"oneOf":[{"type":"object","description":"The change that waits for a decision, in the same shape as the contract.","required":["name","contractStart","contractEnd","billingAnchor","billingStartsAt","upliftPercent","note","autoCharge","bankTransferOnly","autoApprove","terminatedAt","terminationReason","lines","updatedAt","createdByPrincipalId"],"properties":{"name":{"type":"string","isRequired":true,"uniqueKey":"pendingChange.oneOf.0.name","typeLabel":"string"},"contractStart":{"type":"string","format":"date-time","isRequired":true,"uniqueKey":"pendingChange.oneOf.0.contractStart","typeLabel":"string\u003cdate-time>"},"contractEnd":{"type":"string","format":"date-time","isRequired":true,"uniqueKey":"pendingChange.oneOf.0.contractEnd","typeLabel":"string\u003cdate-time>"},"billingAnchor":{"oneOf":[{"type":"string","format":"date-time","description":"The date the contract's billing cycles are counted from.","isRequired":true,"uniqueKey":"pendingChange.oneOf.0.billingAnchor.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","description":"The date the contract's billing cycles are counted from.","isRequired":true,"uniqueKey":"pendingChange.oneOf.0.billingAnchor.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"pendingChange.oneOf.0.billingAnchor","typeLabel":"string\u003cdate-time> | null"},"billingStartsAt":{"oneOf":[{"type":"string","format":"date-time","description":"The date billing starts, when it is not the contract start.","isRequired":true,"uniqueKey":"pendingChange.oneOf.0.billingStartsAt.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","description":"The date billing starts, when it is not the contract start.","isRequired":true,"uniqueKey":"pendingChange.oneOf.0.billingStartsAt.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"pendingChange.oneOf.0.billingStartsAt","typeLabel":"string\u003cdate-time> | null"},"upliftPercent":{"oneOf":[{"type":"string","description":"The yearly price uplift, in percent.","isRequired":true,"uniqueKey":"pendingChange.oneOf.0.upliftPercent.oneOf.0","typeLabel":"string"},{"type":"null","description":"The yearly price uplift, in percent.","isRequired":true,"uniqueKey":"pendingChange.oneOf.0.upliftPercent.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"pendingChange.oneOf.0.upliftPercent","typeLabel":"string | null"},"note":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"pendingChange.oneOf.0.note.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"pendingChange.oneOf.0.note.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"pendingChange.oneOf.0.note","typeLabel":"string | null"},"autoCharge":{"type":"boolean","isRequired":true,"uniqueKey":"pendingChange.oneOf.0.autoCharge","typeLabel":"boolean"},"bankTransferOnly":{"type":"boolean","isRequired":true,"uniqueKey":"pendingChange.oneOf.0.bankTransferOnly","typeLabel":"boolean"},"autoApprove":{"type":"object","required":["contract","invoices"],"additionalProperties":false,"description":"Two separate choices. `contract`: approve the contract, and each change to it, when it is written. It needs the `contracts:approve` permission. `invoices`: approve its invoices when they are collected.","properties":{"contract":{"type":"boolean","isRequired":true,"uniqueKey":"pendingChange.oneOf.0.autoApprove.contract","typeLabel":"boolean"},"invoices":{"type":"boolean","isRequired":true,"uniqueKey":"pendingChange.oneOf.0.autoApprove.invoices","typeLabel":"boolean"}},"isRequired":true,"uniqueKey":"pendingChange.oneOf.0.autoApprove","typeLabel":"object"},"terminatedAt":{"oneOf":[{"type":"string","format":"date-time","description":"The date the contract was ended early.","isRequired":true,"uniqueKey":"pendingChange.oneOf.0.terminatedAt.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","description":"The date the contract was ended early.","isRequired":true,"uniqueKey":"pendingChange.oneOf.0.terminatedAt.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"pendingChange.oneOf.0.terminatedAt","typeLabel":"string\u003cdate-time> | null"},"terminationReason":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"pendingChange.oneOf.0.terminationReason.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"pendingChange.oneOf.0.terminationReason.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"pendingChange.oneOf.0.terminationReason","typeLabel":"string | null"},"lines":{"type":"array","items":{"type":"object","description":"A line of a contract as stored: the rate, the quantity and the dates it bills on.","required":["id","itemId","billableMetricId","copiedFromPriceId","price","quantity","billingCadence","paymentTerm","billDate","startDate","endDate","billingAnchor","invoiceOffsetDays","featureId","entitlementTemplate","invoiceDisplayName","description","invoiceDisplayGroup","rateType","supplyScope","outsideScopeLabel"],"properties":{"id":{"type":"string","pattern":"^ctrl_[a-zA-Z0-9]+$","description":"Unique identifier for a contract line. It stays the same in every version of the contract.","isRequired":true,"uniqueKey":"pendingChange.oneOf.0.lines.items.[INDEX].id","typeLabel":"string"},"itemId":{"oneOf":[{"type":"string","pattern":"^itm_[a-zA-Z0-9]+$","description":"The item the line sells.","isRequired":true,"uniqueKey":"pendingChange.oneOf.0.lines.items.[INDEX].itemId.oneOf.0","typeLabel":"string"},{"type":"null","pattern":"^itm_[a-zA-Z0-9]+$","description":"The item the line sells.","isRequired":true,"uniqueKey":"pendingChange.oneOf.0.lines.items.[INDEX].itemId.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"pendingChange.oneOf.0.lines.items.[INDEX].itemId","typeLabel":"string | null"},"billableMetricId":{"oneOf":[{"type":"string","description":"The billable metric a metered line bills. Null for a fee line.","isRequired":true,"uniqueKey":"pendingChange.oneOf.0.lines.items.[INDEX].billableMetricId.oneOf.0","typeLabel":"string"},{"type":"null","description":"The billable metric a metered line bills. Null for a fee line.","isRequired":true,"uniqueKey":"pendingChange.oneOf.0.lines.items.[INDEX].billableMetricId.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"pendingChange.oneOf.0.lines.items.[INDEX].billableMetricId","typeLabel":"string | null"},"copiedFromPriceId":{"oneOf":[{"type":"string","description":"The plan price the line was copied from, for display only. The line does not follow later changes to that price.","isRequired":true,"uniqueKey":"pendingChange.oneOf.0.lines.items.[INDEX].copiedFromPriceId.oneOf.0","typeLabel":"string"},{"type":"null","description":"The plan price the line was copied from, for display only. The line does not follow later changes to that price.","isRequired":true,"uniqueKey":"pendingChange.oneOf.0.lines.items.[INDEX].copiedFromPriceId.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"pendingChange.oneOf.0.lines.items.[INDEX].copiedFromPriceId","typeLabel":"string | null"},"price":{"type":"object","required":["model","properties"],"additionalProperties":false,"description":"How the line is priced: a pricing model and its properties, for example `standard` with `unitPrice`.","properties":{"model":{"type":"string","description":"The pricing model, for example `standard`.","isRequired":true,"uniqueKey":"pendingChange.oneOf.0.lines.items.[INDEX].price.model","typeLabel":"string"},"properties":{"type":"object","additionalProperties":true,"description":"The model's properties. A rate is a decimal string, for example `{ \"unitPrice\": \"1000\" }`.","isRequired":true,"uniqueKey":"pendingChange.oneOf.0.lines.items.[INDEX].price.properties","typeLabel":"object"}},"isRequired":true,"uniqueKey":"pendingChange.oneOf.0.lines.items.[INDEX].price","typeLabel":"object"},"quantity":{"type":"string","isRequired":true,"uniqueKey":"pendingChange.oneOf.0.lines.items.[INDEX].quantity","typeLabel":"string"},"billingCadence":{"type":"string","isRequired":true,"uniqueKey":"pendingChange.oneOf.0.lines.items.[INDEX].billingCadence","typeLabel":"string"},"paymentTerm":{"type":"string","enum":["in_advance","in_arrears"],"x-speakeasy-unknown-values":"allow","description":"`in_advance` charges a period when it starts. `in_arrears` charges it when it ends.","isRequired":true,"uniqueKey":"pendingChange.oneOf.0.lines.items.[INDEX].paymentTerm","typeLabel":"enum\u003cstring>"},"billDate":{"oneOf":[{"type":"string","format":"date-time","description":"The date of the line's one-time charge.","isRequired":true,"uniqueKey":"pendingChange.oneOf.0.lines.items.[INDEX].billDate.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","description":"The date of the line's one-time charge.","isRequired":true,"uniqueKey":"pendingChange.oneOf.0.lines.items.[INDEX].billDate.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"pendingChange.oneOf.0.lines.items.[INDEX].billDate","typeLabel":"string\u003cdate-time> | null"},"startDate":{"oneOf":[{"type":"string","format":"date-time","description":"The date the line starts billing.","isRequired":true,"uniqueKey":"pendingChange.oneOf.0.lines.items.[INDEX].startDate.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","description":"The date the line starts billing.","isRequired":true,"uniqueKey":"pendingChange.oneOf.0.lines.items.[INDEX].startDate.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"pendingChange.oneOf.0.lines.items.[INDEX].startDate","typeLabel":"string\u003cdate-time> | null"},"endDate":{"oneOf":[{"type":"string","format":"date-time","description":"The date the line stops billing.","isRequired":true,"uniqueKey":"pendingChange.oneOf.0.lines.items.[INDEX].endDate.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","description":"The date the line stops billing.","isRequired":true,"uniqueKey":"pendingChange.oneOf.0.lines.items.[INDEX].endDate.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"pendingChange.oneOf.0.lines.items.[INDEX].endDate","typeLabel":"string\u003cdate-time> | null"},"billingAnchor":{"oneOf":[{"type":"string","format":"date-time","description":"The date the line's billing cycle is counted from.","isRequired":true,"uniqueKey":"pendingChange.oneOf.0.lines.items.[INDEX].billingAnchor.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","description":"The date the line's billing cycle is counted from.","isRequired":true,"uniqueKey":"pendingChange.oneOf.0.lines.items.[INDEX].billingAnchor.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"pendingChange.oneOf.0.lines.items.[INDEX].billingAnchor","typeLabel":"string\u003cdate-time> | null"},"invoiceOffsetDays":{"oneOf":[{"type":"integer","isRequired":true,"uniqueKey":"pendingChange.oneOf.0.lines.items.[INDEX].invoiceOffsetDays.oneOf.0","typeLabel":"integer"},{"type":"null","isRequired":true,"uniqueKey":"pendingChange.oneOf.0.lines.items.[INDEX].invoiceOffsetDays.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"pendingChange.oneOf.0.lines.items.[INDEX].invoiceOffsetDays","typeLabel":"integer | null"},"featureId":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"pendingChange.oneOf.0.lines.items.[INDEX].featureId.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"pendingChange.oneOf.0.lines.items.[INDEX].featureId.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"pendingChange.oneOf.0.lines.items.[INDEX].featureId","typeLabel":"string | null"},"entitlementTemplate":{"oneOf":[{"type":"object","additionalProperties":true,"isRequired":true,"uniqueKey":"pendingChange.oneOf.0.lines.items.[INDEX].entitlementTemplate.oneOf.0","typeLabel":"object"},{"type":"null","additionalProperties":true,"isRequired":true,"uniqueKey":"pendingChange.oneOf.0.lines.items.[INDEX].entitlementTemplate.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"pendingChange.oneOf.0.lines.items.[INDEX].entitlementTemplate","typeLabel":"object | null"},"invoiceDisplayName":{"type":"string","isRequired":true,"uniqueKey":"pendingChange.oneOf.0.lines.items.[INDEX].invoiceDisplayName","typeLabel":"string"},"description":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"pendingChange.oneOf.0.lines.items.[INDEX].description.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"pendingChange.oneOf.0.lines.items.[INDEX].description.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"pendingChange.oneOf.0.lines.items.[INDEX].description","typeLabel":"string | null"},"invoiceDisplayGroup":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"pendingChange.oneOf.0.lines.items.[INDEX].invoiceDisplayGroup.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"pendingChange.oneOf.0.lines.items.[INDEX].invoiceDisplayGroup.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"pendingChange.oneOf.0.lines.items.[INDEX].invoiceDisplayGroup","typeLabel":"string | null"},"rateType":{"type":"string","enum":["amount","proportion"],"x-speakeasy-unknown-values":"allow","description":"`amount` is a rate in currency. `proportion` is a share of another amount.","isRequired":true,"uniqueKey":"pendingChange.oneOf.0.lines.items.[INDEX].rateType","typeLabel":"enum\u003cstring>"},"supplyScope":{"type":"string","enum":["IN_SCOPE","OUTSIDE_SCOPE"],"x-speakeasy-unknown-values":"allow","description":"Whether the supply is in the scope of tax.","isRequired":true,"uniqueKey":"pendingChange.oneOf.0.lines.items.[INDEX].supplyScope","typeLabel":"enum\u003cstring>"},"outsideScopeLabel":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"pendingChange.oneOf.0.lines.items.[INDEX].outsideScopeLabel.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"pendingChange.oneOf.0.lines.items.[INDEX].outsideScopeLabel.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"pendingChange.oneOf.0.lines.items.[INDEX].outsideScopeLabel","typeLabel":"string | null"}},"uniqueKey":"pendingChange.oneOf.0.lines.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"pendingChange.oneOf.0.lines","typeLabel":"object[]"},"updatedAt":{"type":"string","format":"date-time","description":"When this version last changed. Send it back as `basedOnUpdatedAt` to edit it.","isRequired":true,"uniqueKey":"pendingChange.oneOf.0.updatedAt","typeLabel":"string\u003cdate-time>"},"createdByPrincipalId":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"pendingChange.oneOf.0.createdByPrincipalId.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"pendingChange.oneOf.0.createdByPrincipalId.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"pendingChange.oneOf.0.createdByPrincipalId","typeLabel":"string | null"}},"isRequired":true,"uniqueKey":"pendingChange.oneOf.0","typeLabel":"object"},{"type":"null","description":"The change that waits for a decision, in the same shape as the contract.","isRequired":true,"uniqueKey":"pendingChange.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"pendingChange","typeLabel":"object | null"},"decidedAt":{"oneOf":[{"type":"string","format":"date-time","description":"When the version in force was approved or rejected.","isRequired":true,"uniqueKey":"decidedAt.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","description":"When the version in force was approved or rejected.","isRequired":true,"uniqueKey":"decidedAt.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"decidedAt","typeLabel":"string\u003cdate-time> | null"},"decidedByPrincipalId":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"decidedByPrincipalId.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"decidedByPrincipalId.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"decidedByPrincipalId","typeLabel":"string | null"},"rejectReason":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"rejectReason.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"rejectReason.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"rejectReason","typeLabel":"string | null"},"rejectText":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"rejectText.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"rejectText.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"rejectText","typeLabel":"string | null"},"validation":{"type":"array","items":{"type":"object","description":"One reason the version that waits cannot be approved.","required":["scope","code","message"],"properties":{"scope":{"type":"string","enum":["contract","line"],"title":"ContractValidationErrorScope","isRequired":true,"uniqueKey":"validation.items.[INDEX].scope","typeLabel":"enum\u003cstring>"},"code":{"type":"string","description":"For example `LINE_ITEM_ARCHIVED`, `LINE_DATES_OUTSIDE_TERM` or `CONTRACT_RETILE_NOT_AVAILABLE`.","isRequired":true,"uniqueKey":"validation.items.[INDEX].code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"validation.items.[INDEX].message","typeLabel":"string"},"lineId":{"type":"string","pattern":"^ctrl_[a-zA-Z0-9]+$","description":"Unique identifier for a contract line. It stays the same in every version of the contract.","uniqueKey":"validation.items.[INDEX].lineId","typeLabel":"string"},"field":{"type":"string","description":"The field to change.","uniqueKey":"validation.items.[INDEX].field","typeLabel":"string"},"allowedDates":{"type":"array","items":{"type":"string","format":"date-time","uniqueKey":"validation.items.[INDEX].allowedDates.items.[INDEX]","typeLabel":"string\u003cdate-time>"},"description":"On `LINE_TERM_END_NOT_ON_WINDOW_BOUNDARY`, the two dates either side of the term end that a window boundary allows.","uniqueKey":"validation.items.[INDEX].allowedDates","typeLabel":"string\u003cdate-time>[]"}},"uniqueKey":"validation.items.[INDEX]","typeLabel":"object"},"description":"The reasons the draft or pending change cannot be approved. Empty when it can, or when nothing waits. Present on the answer to one contract, not on a list.","uniqueKey":"validation","typeLabel":"object[]"},"conflicts":{"type":"array","items":{"type":"object","description":"A line that shares an item or a billable metric with a line of another live contract of the customer. It never stops an approval.","required":["code","lineId","otherContractId","otherLineId","message"],"properties":{"code":{"type":"string","enum":["ITEM_ON_OTHER_LIVE_CONTRACT","METRIC_ON_OTHER_LIVE_CONTRACT"],"title":"ContractConflictWarningCode","isRequired":true,"uniqueKey":"conflicts.items.[INDEX].code","typeLabel":"enum\u003cstring>"},"lineId":{"type":"string","pattern":"^ctrl_[a-zA-Z0-9]+$","description":"Unique identifier for a contract line. It stays the same in every version of the contract.","isRequired":true,"uniqueKey":"conflicts.items.[INDEX].lineId","typeLabel":"string"},"otherContractId":{"type":"string","pattern":"^ctr_[a-zA-Z0-9]+$","description":"Unique identifier for a contract.","isRequired":true,"uniqueKey":"conflicts.items.[INDEX].otherContractId","typeLabel":"string"},"otherLineId":{"type":"string","pattern":"^ctrl_[a-zA-Z0-9]+$","description":"Unique identifier for a contract line. It stays the same in every version of the contract.","isRequired":true,"uniqueKey":"conflicts.items.[INDEX].otherLineId","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"conflicts.items.[INDEX].message","typeLabel":"string"},"itemId":{"type":"string","uniqueKey":"conflicts.items.[INDEX].itemId","typeLabel":"string"},"billableMetricId":{"type":"string","uniqueKey":"conflicts.items.[INDEX].billableMetricId","typeLabel":"string"}},"uniqueKey":"conflicts.items.[INDEX]","typeLabel":"object"},"description":"Where the draft or pending change shares an item or a billable metric with another live contract of the customer. Present on the answer to one contract, not on a list.","uniqueKey":"conflicts","typeLabel":"object[]"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"id":"\u003cstring>","object":"contract","merchantId":"\u003cstring>","customerId":"\u003cstring>","currency":"\u003cstring>","status":"draft","createdAt":"2023-11-07T05:31:56Z","externalReference":{"provider":"\u003cstring>","externalId":"\u003cstring>"},"name":"\u003cstring>","contractStart":"2023-11-07T05:31:56Z","contractEnd":"2023-11-07T05:31:56Z","billingAnchor":"2023-11-07T05:31:56Z","billingStartsAt":"2023-11-07T05:31:56Z","upliftPercent":"\u003cstring>","note":"\u003cstring>","autoCharge":true,"bankTransferOnly":true,"autoApprove":{"contract":true,"invoices":true},"terminatedAt":"2023-11-07T05:31:56Z","terminationReason":"\u003cstring>","lines":[{"id":"\u003cstring>","itemId":"\u003cstring>","billableMetricId":"\u003cstring>","copiedFromPriceId":"\u003cstring>","price":{"model":"\u003cstring>","properties":{}},"quantity":"\u003cstring>","billingCadence":"\u003cstring>","paymentTerm":"in_advance","billDate":"2023-11-07T05:31:56Z","startDate":"2023-11-07T05:31:56Z","endDate":"2023-11-07T05:31:56Z","billingAnchor":"2023-11-07T05:31:56Z","invoiceOffsetDays":123,"featureId":"\u003cstring>","entitlementTemplate":{},"invoiceDisplayName":"\u003cstring>","description":"\u003cstring>","invoiceDisplayGroup":"\u003cstring>","rateType":"amount","supplyScope":"IN_SCOPE","outsideScopeLabel":"\u003cstring>"}],"updatedAt":"2023-11-07T05:31:56Z","createdByPrincipalId":"\u003cstring>","pendingChange":{"name":"\u003cstring>","contractStart":"2023-11-07T05:31:56Z","contractEnd":"2023-11-07T05:31:56Z","billingAnchor":"2023-11-07T05:31:56Z","billingStartsAt":"2023-11-07T05:31:56Z","upliftPercent":"\u003cstring>","note":"\u003cstring>","autoCharge":true,"bankTransferOnly":true,"autoApprove":{"contract":true,"invoices":true},"terminatedAt":"2023-11-07T05:31:56Z","terminationReason":"\u003cstring>","lines":[{"id":"\u003cstring>","itemId":"\u003cstring>","billableMetricId":"\u003cstring>","copiedFromPriceId":"\u003cstring>","price":{"model":"\u003cstring>","properties":{}},"quantity":"\u003cstring>","billingCadence":"\u003cstring>","paymentTerm":"in_advance","billDate":"2023-11-07T05:31:56Z","startDate":"2023-11-07T05:31:56Z","endDate":"2023-11-07T05:31:56Z","billingAnchor":"2023-11-07T05:31:56Z","invoiceOffsetDays":123,"featureId":"\u003cstring>","entitlementTemplate":{},"invoiceDisplayName":"\u003cstring>","description":"\u003cstring>","invoiceDisplayGroup":"\u003cstring>","rateType":"amount","supplyScope":"IN_SCOPE","outsideScopeLabel":"\u003cstring>"}],"updatedAt":"2023-11-07T05:31:56Z","createdByPrincipalId":"\u003cstring>"},"decidedAt":"2023-11-07T05:31:56Z","decidedByPrincipalId":"\u003cstring>","rejectReason":"\u003cstring>","rejectText":"\u003cstring>","validation":[{"scope":"contract","code":"\u003cstring>","message":"\u003cstring>","lineId":"\u003cstring>","field":"\u003cstring>","allowedDates":["2023-11-07T05:31:56Z"]}],"conflicts":[{"code":"ITEM_ON_OTHER_LIVE_CONTRACT","lineId":"\u003cstring>","otherContractId":"\u003cstring>","otherLineId":"\u003cstring>","message":"\u003cstring>","itemId":"\u003cstring>","billableMetricId":"\u003cstring>"}]}}},"exampleType":"generated"}},"exampleType":"generated"},"a21775b9-73c8-4493-87ee-58806e9f8214":{"description":"Bad Request - The request could not be understood or was missing required parameters","content":{"application/json":{"schema":{"oneOf":[{"type":"object","required":["message"],"example":{"message":"The requested resource was not found","error":"not_found"},"properties":{"message":{"type":"string","description":"Human-readable error message. Clients must not parse this field programmatically.","isRequired":true,"uniqueKey":"oneOf.0.message","typeLabel":"string"},"error":{"type":"string","description":"Coarse HTTP error category (e.g. 'bad_request', 'forbidden'). Maps to the HTTP status code.","uniqueKey":"oneOf.0.error","typeLabel":"string"},"code":{"type":"string","examples":["TAX_NOT_ENABLED","PAYMENT_SESSION_EXPIRED"],"description":"Optional semantic business error code for machine-readable discrimination (e.g. 'TAX_NOT_ENABLED'). UPPER_SNAKE_CASE. Clients should check this field, not message.","uniqueKey":"oneOf.0.code","typeLabel":"string"},"details":{"type":"object","description":"Additional error details","additionalProperties":true,"uniqueKey":"oneOf.0.details","typeLabel":"object"},"reason":{"type":"string","enum":["no_permission","insufficient_scope","not_member"],"description":"Present on a 403 from the authorization check. Says why access was refused: the caller has no role that grants the permission, the OAuth token lacks the scope, or the caller is not a member of the organization.","uniqueKey":"oneOf.0.reason","typeLabel":"enum\u003cstring>"},"requiredPermissions":{"type":"array","items":{"type":"string","uniqueKey":"oneOf.0.requiredPermissions.items.[INDEX]","typeLabel":"string"},"description":"Present on a 403 from the authorization check. The permissions the caller needs for this request.","uniqueKey":"oneOf.0.requiredPermissions","typeLabel":"string[]"},"requestId":{"type":"string","description":"Identifies this request in our logs. Include it when you contact support. Also sent in the `request-id` response header.","examples":["105445aa7843bc8bf206b12000100000"],"uniqueKey":"oneOf.0.requestId","typeLabel":"string"}},"uniqueKey":"oneOf.0","typeLabel":"object"},{"type":"object","required":["message","errors"],"example":{"message":"Validation failed","error":"validation_error","errors":[{"field":"email","message":"Invalid email format","code":"invalid_format"}]},"properties":{"message":{"type":"string","description":"Human-readable error message","isRequired":true,"uniqueKey":"oneOf.1.message","typeLabel":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","description":"The field that failed validation","isRequired":true,"uniqueKey":"oneOf.1.errors.items.[INDEX].field","typeLabel":"string"},"message":{"type":"string","description":"Validation error message for this field","isRequired":true,"uniqueKey":"oneOf.1.errors.items.[INDEX].message","typeLabel":"string"},"code":{"type":"string","description":"Validation error code","uniqueKey":"oneOf.1.errors.items.[INDEX].code","typeLabel":"string"}},"required":["field","message"],"uniqueKey":"oneOf.1.errors.items.[INDEX]","typeLabel":"object"},"description":"Array of field-specific validation errors","isRequired":true,"uniqueKey":"oneOf.1.errors","typeLabel":"object[]"},"error":{"type":"string","enum":["validation_error"],"default":"validation_error","description":"Error type indicating validation failure","uniqueKey":"oneOf.1.error","typeLabel":"enum\u003cstring>"},"requestId":{"type":"string","description":"Identifies this request in our logs. Include it when you contact support. Also sent in the `request-id` response header.","examples":["105445aa7843bc8bf206b12000100000"],"uniqueKey":"oneOf.1.requestId","typeLabel":"string"}},"uniqueKey":"oneOf.1","typeLabel":"object"}],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"message":"The requested resource was not found","error":"not_found"}}},"exampleType":"generated"}},"exampleType":"generated"},"9a4152b3-d8d8-4dd3-b232-d9e9d4413f95":{"description":"Unauthorized - Authentication failed or user does not have permissions","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string","description":"Human-readable error message. Clients must not parse this field programmatically.","isRequired":true,"uniqueKey":"message","typeLabel":"string"},"error":{"type":"string","description":"Coarse HTTP error category (e.g. 'bad_request', 'forbidden'). Maps to the HTTP status code.","uniqueKey":"error","typeLabel":"string"},"code":{"type":"string","examples":["TAX_NOT_ENABLED","PAYMENT_SESSION_EXPIRED"],"description":"Optional semantic business error code for machine-readable discrimination (e.g. 'TAX_NOT_ENABLED'). UPPER_SNAKE_CASE. Clients should check this field, not message.","uniqueKey":"code","typeLabel":"string"},"details":{"type":"object","description":"Additional error details","additionalProperties":true,"uniqueKey":"details","typeLabel":"object"},"reason":{"type":"string","enum":["no_permission","insufficient_scope","not_member"],"description":"Present on a 403 from the authorization check. Says why access was refused: the caller has no role that grants the permission, the OAuth token lacks the scope, or the caller is not a member of the organization.","uniqueKey":"reason","typeLabel":"enum\u003cstring>"},"requiredPermissions":{"type":"array","items":{"type":"string","uniqueKey":"requiredPermissions.items.[INDEX]","typeLabel":"string"},"description":"Present on a 403 from the authorization check. The permissions the caller needs for this request.","uniqueKey":"requiredPermissions","typeLabel":"string[]"},"requestId":{"type":"string","description":"Identifies this request in our logs. Include it when you contact support. Also sent in the `request-id` response header.","examples":["105445aa7843bc8bf206b12000100000"],"uniqueKey":"requestId","typeLabel":"string"}},"example":{"message":"The requested resource was not found","error":"not_found"},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"message":"The requested resource was not found","error":"not_found"}}},"exampleType":"generated"}},"exampleType":"generated"},"90935f56-2512-4396-a1dd-f6e776375e44":{"description":"Forbidden - Request is understood but refused","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string","description":"Human-readable error message. Clients must not parse this field programmatically.","isRequired":true,"uniqueKey":"message","typeLabel":"string"},"error":{"type":"string","description":"Coarse HTTP error category (e.g. 'bad_request', 'forbidden'). Maps to the HTTP status code.","uniqueKey":"error","typeLabel":"string"},"code":{"type":"string","examples":["TAX_NOT_ENABLED","PAYMENT_SESSION_EXPIRED"],"description":"Optional semantic business error code for machine-readable discrimination (e.g. 'TAX_NOT_ENABLED'). UPPER_SNAKE_CASE. Clients should check this field, not message.","uniqueKey":"code","typeLabel":"string"},"details":{"type":"object","description":"Additional error details","additionalProperties":true,"uniqueKey":"details","typeLabel":"object"},"reason":{"type":"string","enum":["no_permission","insufficient_scope","not_member"],"description":"Present on a 403 from the authorization check. Says why access was refused: the caller has no role that grants the permission, the OAuth token lacks the scope, or the caller is not a member of the organization.","uniqueKey":"reason","typeLabel":"enum\u003cstring>"},"requiredPermissions":{"type":"array","items":{"type":"string","uniqueKey":"requiredPermissions.items.[INDEX]","typeLabel":"string"},"description":"Present on a 403 from the authorization check. The permissions the caller needs for this request.","uniqueKey":"requiredPermissions","typeLabel":"string[]"},"requestId":{"type":"string","description":"Identifies this request in our logs. Include it when you contact support. Also sent in the `request-id` response header.","examples":["105445aa7843bc8bf206b12000100000"],"uniqueKey":"requestId","typeLabel":"string"}},"example":{"message":"The requested resource was not found","error":"not_found"},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"message":"The requested resource was not found","error":"not_found"}}},"exampleType":"generated"}},"exampleType":"generated"},"2bbacc22-17fc-42d0-9f88-530d3bf9916a":{"description":"Not Found - The requested resource could not be found","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string","description":"Human-readable error message. Clients must not parse this field programmatically.","isRequired":true,"uniqueKey":"message","typeLabel":"string"},"error":{"type":"string","description":"Coarse HTTP error category (e.g. 'bad_request', 'forbidden'). Maps to the HTTP status code.","uniqueKey":"error","typeLabel":"string"},"code":{"type":"string","examples":["TAX_NOT_ENABLED","PAYMENT_SESSION_EXPIRED"],"description":"Optional semantic business error code for machine-readable discrimination (e.g. 'TAX_NOT_ENABLED'). UPPER_SNAKE_CASE. Clients should check this field, not message.","uniqueKey":"code","typeLabel":"string"},"details":{"type":"object","description":"Additional error details","additionalProperties":true,"uniqueKey":"details","typeLabel":"object"},"reason":{"type":"string","enum":["no_permission","insufficient_scope","not_member"],"description":"Present on a 403 from the authorization check. Says why access was refused: the caller has no role that grants the permission, the OAuth token lacks the scope, or the caller is not a member of the organization.","uniqueKey":"reason","typeLabel":"enum\u003cstring>"},"requiredPermissions":{"type":"array","items":{"type":"string","uniqueKey":"requiredPermissions.items.[INDEX]","typeLabel":"string"},"description":"Present on a 403 from the authorization check. The permissions the caller needs for this request.","uniqueKey":"requiredPermissions","typeLabel":"string[]"},"requestId":{"type":"string","description":"Identifies this request in our logs. Include it when you contact support. Also sent in the `request-id` response header.","examples":["105445aa7843bc8bf206b12000100000"],"uniqueKey":"requestId","typeLabel":"string"}},"example":{"message":"The requested resource was not found","error":"not_found"},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"message":"The requested resource was not found","error":"not_found"}}},"exampleType":"generated"}},"exampleType":"generated"},"6fef5f70-41ae-4781-9b46-7395011dcf7c":{"description":"Conflict - The request conflicts with the current state of the resource","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string","description":"Human-readable error message. Clients must not parse this field programmatically.","isRequired":true,"uniqueKey":"message","typeLabel":"string"},"error":{"type":"string","description":"Coarse HTTP error category (e.g. 'bad_request', 'forbidden'). Maps to the HTTP status code.","uniqueKey":"error","typeLabel":"string"},"code":{"type":"string","examples":["TAX_NOT_ENABLED","PAYMENT_SESSION_EXPIRED"],"description":"Optional semantic business error code for machine-readable discrimination (e.g. 'TAX_NOT_ENABLED'). UPPER_SNAKE_CASE. Clients should check this field, not message.","uniqueKey":"code","typeLabel":"string"},"details":{"type":"object","description":"Additional error details","additionalProperties":true,"uniqueKey":"details","typeLabel":"object"},"reason":{"type":"string","enum":["no_permission","insufficient_scope","not_member"],"description":"Present on a 403 from the authorization check. Says why access was refused: the caller has no role that grants the permission, the OAuth token lacks the scope, or the caller is not a member of the organization.","uniqueKey":"reason","typeLabel":"enum\u003cstring>"},"requiredPermissions":{"type":"array","items":{"type":"string","uniqueKey":"requiredPermissions.items.[INDEX]","typeLabel":"string"},"description":"Present on a 403 from the authorization check. The permissions the caller needs for this request.","uniqueKey":"requiredPermissions","typeLabel":"string[]"},"requestId":{"type":"string","description":"Identifies this request in our logs. Include it when you contact support. Also sent in the `request-id` response header.","examples":["105445aa7843bc8bf206b12000100000"],"uniqueKey":"requestId","typeLabel":"string"}},"example":{"message":"The requested resource was not found","error":"not_found"},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"message":"The requested resource was not found","error":"not_found"}}},"exampleType":"generated"}},"exampleType":"generated"},"bde4dc84-bf9c-4f39-bed0-8169073ea1fe":{"description":"Internal Server Error - Something went wrong on the server side","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string","description":"Human-readable error message. Clients must not parse this field programmatically.","isRequired":true,"uniqueKey":"message","typeLabel":"string"},"error":{"type":"string","description":"Coarse HTTP error category (e.g. 'bad_request', 'forbidden'). Maps to the HTTP status code.","uniqueKey":"error","typeLabel":"string"},"code":{"type":"string","examples":["TAX_NOT_ENABLED","PAYMENT_SESSION_EXPIRED"],"description":"Optional semantic business error code for machine-readable discrimination (e.g. 'TAX_NOT_ENABLED'). UPPER_SNAKE_CASE. Clients should check this field, not message.","uniqueKey":"code","typeLabel":"string"},"details":{"type":"object","description":"Additional error details","additionalProperties":true,"uniqueKey":"details","typeLabel":"object"},"reason":{"type":"string","enum":["no_permission","insufficient_scope","not_member"],"description":"Present on a 403 from the authorization check. Says why access was refused: the caller has no role that grants the permission, the OAuth token lacks the scope, or the caller is not a member of the organization.","uniqueKey":"reason","typeLabel":"enum\u003cstring>"},"requiredPermissions":{"type":"array","items":{"type":"string","uniqueKey":"requiredPermissions.items.[INDEX]","typeLabel":"string"},"description":"Present on a 403 from the authorization check. The permissions the caller needs for this request.","uniqueKey":"requiredPermissions","typeLabel":"string[]"},"requestId":{"type":"string","description":"Identifies this request in our logs. Include it when you contact support. Also sent in the `request-id` response header.","examples":["105445aa7843bc8bf206b12000100000"],"uniqueKey":"requestId","typeLabel":"string"}},"example":{"message":"The requested resource was not found","error":"not_found"},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"message":"The requested resource was not found","error":"not_found"}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"b1bf53f0-ef73-44be-8abc-2a25ffdaba6f":{"BearerAuth":{"type":"http","scheme":"bearer","description":"API key authentication","scopes":[],"schemeName":"BearerAuth"}}},"servers":{"a2a23f77-8961-4577-88d2-cf0d1c96505d":{"url":"https://api.paygentic.io","description":"Production API"},"850b2015-9516-48e4-be3d-58733ff4bdc0":{"url":"https://api.sandbox.paygentic.io","description":"Sandbox API"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","description":"API key authentication","scopes":[],"schemeName":"BearerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"API key authentication","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"BearerAuth","name":"Authorization"}],"title":"BearerAuth"}]},"originalFileLocation":"openapi.json"},"subdomain":"paygentic","siteName":"Paygentic","title":"Update - Paygentic","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-27T16:08:00.074Z","originalFileLocation":"api-reference/contracts/update.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Edits the draft while the contract was never approved. Once it is approved, the first PATCH opens a pending change as a copy of the version in force with the fields sent applied, and later PATCHes edit that change. The version in force does not change until the pending change is approved. Send basedOnUpdatedAt with the updatedAt you read, to edit a draft or a pending change. Without it, a contract that has one answers 409 CONTRACT_PENDING_CHANGE_EXISTS. A draft that changed since you read it answers 409 CONTRACT_CHANGED. A rejected contract answers 409 CONTRACT_NOT_PENDING. When you send lines, they are the complete set. A line you leave out is removed. Without lines, the lines stay as they are. The customer and the currency cannot change: send the same value or leave them out, else the response is 400 CONTRACT_FIELD_FIXED. When the draft or the pending change, with this PATCH applied, has autoApprove.contract: true, the PATCH needs the contracts:approve permission and answers 403 without it. This is so even when the body does not send autoApprove, for example a rename of a contract that already auto-approves. Such a PATCH approves a draft in the same request when its content is valid. When it is not valid, the draft stays waiting and validation lists the errors. A pending change to an approved contract stays waiting, and validation lists CONTRACT_RETILE_NOT_AVAILABLE.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Paygentic\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/paygentic/u-_iNQrPo4YcRgQd/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/paygentic/u-_iNQrPo4YcRgQd/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/paygentic/u-_iNQrPo4YcRgQd/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/paygentic/u-_iNQrPo4YcRgQd/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/paygentic/u-_iNQrPo4YcRgQd/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/paygentic/u-_iNQrPo4YcRgQd/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/paygentic/u-_iNQrPo4YcRgQd/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/paygentic/u-_iNQrPo4YcRgQd/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/paygentic/u-_iNQrPo4YcRgQd/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Update - Paygentic\">\u003cmeta data-mint-head property=\"og:description\" content=\"Edits the draft while the contract was never approved. Once it is approved, the first PATCH opens a pending change as a copy of the version in force with the fields sent applied, and later PATCHes edit that change. The version in force does not change until the pending change is approved. Send basedOnUpdatedAt with the updatedAt you read, to edit a draft or a pending change. Without it, a contract that has one answers 409 CONTRACT_PENDING_CHANGE_EXISTS. A draft that changed since you read it answers 409 CONTRACT_CHANGED. A rejected contract answers 409 CONTRACT_NOT_PENDING. When you send lines, they are the complete set. A line you leave out is removed. Without lines, the lines stay as they are. The customer and the currency cannot change: send the same value or leave them out, else the response is 400 CONTRACT_FIELD_FIXED. When the draft or the pending change, with this PATCH applied, has autoApprove.contract: true, the PATCH needs the contracts:approve permission and answers 403 without it. This is so even when the body does not send autoApprove, for example a rename of a contract that already auto-approves. Such a PATCH approves a draft in the same request when its content is valid. When it is not valid, the draft stays waiting and validation lists the errors. A pending change to an approved contract stays waiting, and validation lists CONTRACT_RETILE_NOT_AVAILABLE.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Paygentic\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.paygentic.io/api-reference/contracts/update\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://paygentic.mintlify.site/_mintlify/api/og/v2?division=Contracts\u0026amp;title=Update\u0026amp;description=Edits+the+draft+while+the+contract+was+never+approved.+Once+it+is+approved%2C+the+first+PATCH+opens+a+pending+change+as+a+copy+of+the+version+in+force+with+the+fi\u0026amp;theme=6ad1713123e6dfef0529ce98\u0026amp;signature=848d0d3d925ca54d37d7218de57272841f91479f858eebb117f937e05d187269\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Update - Paygentic\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Edits the draft while the contract was never approved. Once it is approved, the first PATCH opens a pending change as a copy of the version in force with the fields sent applied, and later PATCHes edit that change. The version in force does not change until the pending change is approved. Send basedOnUpdatedAt with the updatedAt you read, to edit a draft or a pending change. Without it, a contract that has one answers 409 CONTRACT_PENDING_CHANGE_EXISTS. A draft that changed since you read it answers 409 CONTRACT_CHANGED. A rejected contract answers 409 CONTRACT_NOT_PENDING. When you send lines, they are the complete set. A line you leave out is removed. Without lines, the lines stay as they are. The customer and the currency cannot change: send the same value or leave them out, else the response is 400 CONTRACT_FIELD_FIXED. When the draft or the pending change, with this PATCH applied, has autoApprove.contract: true, the PATCH needs the contracts:approve permission and answers 403 without it. This is so even when the body does not send autoApprove, for example a rename of a contract that already auto-approves. Such a PATCH approves a draft in the same request when its content is valid. When it is not valid, the draft stays waiting and validation lists the errors. A pending change to an approved contract stays waiting, and validation lists CONTRACT_RETILE_NOT_AVAILABLE.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://paygentic.mintlify.site/_mintlify/api/og/v2?division=Contracts\u0026amp;title=Update\u0026amp;description=Edits+the+draft+while+the+contract+was+never+approved.+Once+it+is+approved%2C+the+first+PATCH+opens+a+pending+change+as+a+copy+of+the+version+in+force+with+the+fi\u0026amp;theme=6ad1713123e6dfef0529ce98\u0026amp;signature=848d0d3d925ca54d37d7218de57272841f91479f858eebb117f937e05d187269\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/paygentic/u-_iNQrPo4YcRgQd/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Paygentic\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#013F70\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.paygentic.io/api-reference/contracts/update\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/contracts/update.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.paygentic.io/#organization\",\"name\":\"Paygentic\",\"url\":\"https://docs.paygentic.io\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/paygentic/uUKYt4gDqyfhF9Y7/logo/paygentic-logo-light.svg?fit=max\u0026auto=format\u0026n=uUKYt4gDqyfhF9Y7\u0026q=85\u0026s=cb1fd6b59a3c44e357ecdc522849ab37\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.paygentic.io#website\",\"name\":\"Paygentic\",\"url\":\"https://docs.paygentic.io\",\"publisher\":{\"@id\":\"https://docs.paygentic.io/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.paygentic.io/api-reference/contracts/update#webpage\",\"url\":\"https://docs.paygentic.io/api-reference/contracts/update\",\"name\":\"Update\",\"description\":\"Edits the draft while the contract was never approved. Once it is approved, the first PATCH opens a pending change as a copy of the version in force with the fields sent applied, and later PATCHes edit that change. The version in force does not change until the pending change is approved. Send basedOnUpdatedAt with the updatedAt you read, to edit a draft or a pending change. Without it, a contract that has one answers 409 CONTRACT_PENDING_CHANGE_EXISTS. A draft that changed since you read it answers 409 CONTRACT_CHANGED. A rejected contract answers 409 CONTRACT_NOT_PENDING. When you send lines, they are the complete set. A line you leave out is removed. Without lines, the lines stay as they are. The customer and the currency cannot change: send the same value or leave them out, else the response is 400 CONTRACT_FIELD_FIXED. When the draft or the pending change, with this PATCH applied, has autoApprove.contract: true, the PATCH needs the contracts:approve permission and answers 403 without it. This is so even when the body does not send autoApprove, for example a rename of a contract that already auto-approves. Such a PATCH approves a draft in the same request when its content is valid. When it is not valid, the draft stays waiting and validation lists the errors. A pending change to an approved contract stays waiting, and validation lists CONTRACT_RETILE_NOT_AVAILABLE.\",\"dateModified\":\"2026-11-27T16:08:00.074Z\",\"isPartOf\":{\"@id\":\"https://docs.paygentic.io#website\"},\"breadcrumb\":{\"@id\":\"https://docs.paygentic.io/api-reference/contracts/update#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.paygentic.io/api-reference/contracts/update#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Contracts\",\"item\":\"https://docs.paygentic.io/api-reference/contracts/list\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Update\",\"item\":\"https://docs.paygentic.io/api-reference/contracts/update\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.paygentic.io/api-reference/contracts/update#apireference\",\"headline\":\"Update\",\"name\":\"Update\",\"description\":\"Edits the draft while the contract was never approved. Once it is approved, the first PATCH opens a pending change as a copy of the version in force with the fields sent applied, and later PATCHes edit that change. The version in force does not change until the pending change is approved. Send basedOnUpdatedAt with the updatedAt you read, to edit a draft or a pending change. Without it, a contract that has one answers 409 CONTRACT_PENDING_CHANGE_EXISTS. A draft that changed since you read it answers 409 CONTRACT_CHANGED. A rejected contract answers 409 CONTRACT_NOT_PENDING. When you send lines, they are the complete set. A line you leave out is removed. Without lines, the lines stay as they are. The customer and the currency cannot change: send the same value or leave them out, else the response is 400 CONTRACT_FIELD_FIXED. When the draft or the pending change, with this PATCH applied, has autoApprove.contract: true, the PATCH needs the contracts:approve permission and answers 403 without it. This is so even when the body does not send autoApprove, for example a rename of a contract that already auto-approves. Such a PATCH approves a draft in the same request when its content is valid. When it is not valid, the draft stays waiting and validation lists the errors. A pending change to an approved contract stays waiting, and validation lists CONTRACT_RETILE_NOT_AVAILABLE.\",\"url\":\"https://docs.paygentic.io/api-reference/contracts/update\",\"mainEntityOfPage\":{\"@id\":\"https://docs.paygentic.io/api-reference/contracts/update#webpage\"},\"dateModified\":\"2026-11-27T16:08:00.074Z\",\"publisher\":{\"@id\":\"https://docs.paygentic.io/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.paygentic.io#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Paygentic\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Paygentic\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/contracts/update.md","siteName":"Paygentic","nav":{"global":null,"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":"/getting-started/introduction"}]},{"tab":"API Reference","groups":[{"group":"Me","pages":[{"title":"Get the caller","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/me","href":"/api-reference/me/get-the-caller"}]},{"group":"Billable Metrics","pages":[{"title":"List","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/billableMetrics","href":"/api-reference/billable-metrics/list"},{"title":"Create","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/billableMetrics","href":"/api-reference/billable-metrics/create"},{"title":"Get","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/billableMetrics/{id}","href":"/api-reference/billable-metrics/get"},{"title":"Update","deprecated":null,"version":null,"openapi":"/openapi.json patch /v0/billableMetrics/{id}","href":"/api-reference/billable-metrics/update"},{"title":"Query Meter Usage","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/billableMetrics/{id}/meter","href":"/api-reference/billable-metrics/query-meter-usage"},{"title":"List Meter Events","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/billableMetrics/{id}/events","href":"/api-reference/billable-metrics/list-meter-events"}]},{"group":"Customers","pages":[{"title":"List by Merchant","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/customers","href":"/api-reference/customers/list-by-merchant"},{"title":"Create","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/customers","href":"/api-reference/customers/create"},{"title":"Get","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/customers/{id}","href":"/api-reference/customers/get"},{"title":"Delete","deprecated":null,"version":null,"openapi":"/openapi.json delete /v0/customers/{id}","href":"/api-reference/customers/delete"},{"title":"Update","deprecated":null,"version":null,"openapi":"/openapi.json patch /v0/customers/{id}","href":"/api-reference/customers/update"},{"title":"List payment methods","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/customers/{id}/paymentMethods","href":"/api-reference/customers/list-payment-methods"},{"title":"Set up a payment method","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/customers/{id}/paymentMethods","href":"/api-reference/customers/set-up-a-payment-method"}]},{"group":"Entitlements","pages":[{"title":"List Entitlements","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/entitlements","href":"/api-reference/entitlements/list-entitlements"},{"title":"Issue Entitlement","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/entitlements","href":"/api-reference/entitlements/issue-entitlement"},{"title":"Get Entitlement","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/entitlements/{entitlementId}","href":"/api-reference/entitlements/get-entitlement"}]},{"group":"Grants","pages":[{"title":"List Grants","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/entitlements/{entitlementId}/grants","href":"/api-reference/grants/list-grants"},{"title":"Create Grant","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/entitlements/{entitlementId}/grants","href":"/api-reference/grants/create-grant"},{"title":"Purchase Grant","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/entitlements/{entitlementId}/grants/purchase","href":"/api-reference/grants/purchase-grant"},{"title":"Get Grant","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/entitlements/{entitlementId}/grants/{grantId}","href":"/api-reference/grants/get-grant"},{"title":"Void Grant","deprecated":null,"version":null,"openapi":"/openapi.json delete /v1/entitlements/{entitlementId}/grants/{grantId}","href":"/api-reference/grants/void-grant"}]},{"group":"Features","pages":[{"title":"List","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/features","href":"/api-reference/features/list"},{"title":"Create","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/features","href":"/api-reference/features/create"},{"title":"Get","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/features/{id}","href":"/api-reference/features/get"},{"title":"Delete","deprecated":null,"version":null,"openapi":"/openapi.json delete /v0/features/{id}","href":"/api-reference/features/delete"},{"title":"Update","deprecated":null,"version":null,"openapi":"/openapi.json patch /v0/features/{id}","href":"/api-reference/features/update"}]},{"group":"Fees","pages":[{"title":"List","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/fees","href":"/api-reference/fees/list"},{"title":"Create","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/fees","href":"/api-reference/fees/create"},{"title":"Get","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/fees/{id}","href":"/api-reference/fees/get"},{"title":"Delete","deprecated":null,"version":null,"openapi":"/openapi.json delete /v0/fees/{id}","href":"/api-reference/fees/delete"},{"title":"Update","deprecated":null,"version":null,"openapi":"/openapi.json patch /v0/fees/{id}","href":"/api-reference/fees/update"}]},{"group":"Plans","pages":[{"title":"List","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/plans","href":"/api-reference/plans/list"},{"title":"Create","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/plans","href":"/api-reference/plans/create"},{"title":"List Available Plans","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/plans/available","href":"/api-reference/plans/list-available-plans"},{"title":"Get","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/plans/{id}","href":"/api-reference/plans/get"},{"title":"Update","deprecated":null,"version":null,"openapi":"/openapi.json patch /v0/plans/{id}","href":"/api-reference/plans/update"},{"title":"List versions","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/plans/{id}/versions","href":"/api-reference/plans/list-versions"},{"title":"Mint a plan version","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/plans/{id}/versions","href":"/api-reference/plans/mint-a-plan-version"},{"title":"Get a version","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/plans/{id}/versions/{versionNumber}","href":"/api-reference/plans/get-a-version"},{"title":"Set the default version","deprecated":null,"version":null,"openapi":"/openapi.json patch /v0/plans/{id}/versions/{versionNumber}","href":"/api-reference/plans/set-the-default-version"}]},{"group":"Prices","pages":[{"title":"List","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/prices","href":"/api-reference/prices/list"},{"title":"Create","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/prices","href":"/api-reference/prices/create"},{"title":"Get","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/prices/{id}","href":"/api-reference/prices/get"},{"title":"Delete","deprecated":null,"version":null,"openapi":"/openapi.json delete /v0/prices/{id}","href":"/api-reference/prices/delete"},{"title":"Update","deprecated":null,"version":null,"openapi":"/openapi.json patch /v0/prices/{id}","href":"/api-reference/prices/update"}]},{"group":"PricingUnits","pages":[{"title":"List","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/pricingUnits","href":"/api-reference/pricingunits/list"},{"title":"Create","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/pricingUnits","href":"/api-reference/pricingunits/create"},{"title":"Get","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/pricingUnits/{id}","href":"/api-reference/pricingunits/get"}]},{"group":"CreditPools","pages":[{"title":"List","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/creditPools","href":"/api-reference/creditpools/list"},{"title":"Create or resolve","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/creditPools","href":"/api-reference/creditpools/create-or-resolve"},{"title":"Get","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/creditPools/{id}","href":"/api-reference/creditpools/get"},{"title":"List grants","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/creditPools/{id}/grants","href":"/api-reference/creditpools/list-grants"},{"title":"Grant credits","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/creditPools/{id}/grants","href":"/api-reference/creditpools/grant-credits"},{"title":"Get ledger","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/creditPools/{id}/ledger","href":"/api-reference/creditpools/get-ledger"},{"title":"Purchase credits","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/creditPools/{id}/purchase","href":"/api-reference/creditpools/purchase-credits"}]},{"group":"Products","pages":[{"title":"List","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/products","href":"/api-reference/products/list"},{"title":"Create","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/products","href":"/api-reference/products/create"},{"title":"Get","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/products/{id}","href":"/api-reference/products/get"},{"title":"Update","deprecated":null,"version":null,"openapi":"/openapi.json patch /v0/products/{id}","href":"/api-reference/products/update"}]},{"group":"Sources","pages":[{"title":"List","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/sources","href":"/api-reference/sources/list"},{"title":"Create","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/sources","href":"/api-reference/sources/create"},{"title":"Get","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/sources/{id}","href":"/api-reference/sources/get"},{"title":"Update","deprecated":null,"version":null,"openapi":"/openapi.json patch /v0/sources/{id}","href":"/api-reference/sources/update"},{"title":"List Events","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/sources/{id}/events","href":"/api-reference/sources/list-events"},{"title":"Approve","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/sources/{id}/events/{eventId}/approve","href":"/api-reference/sources/approve"},{"title":"Reject","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/sources/{id}/events/{eventId}/reject","href":"/api-reference/sources/reject"},{"title":"Bulk Approve","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/sources/{id}/events/bulk-approve","href":"/api-reference/sources/bulk-approve"},{"title":"Bulk Reject","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/sources/{id}/events/bulk-reject","href":"/api-reference/sources/bulk-reject"},{"title":"List Rules","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/sourceRules","href":"/api-reference/sources/list-rules"},{"title":"Create Rule","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/sourceRules","href":"/api-reference/sources/create-rule"},{"title":"Get Rule","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/sourceRules/{ruleId}","href":"/api-reference/sources/get-rule"},{"title":"Delete Rule","deprecated":null,"version":null,"openapi":"/openapi.json delete /v0/sourceRules/{ruleId}","href":"/api-reference/sources/delete-rule"},{"title":"Update Rule","deprecated":null,"version":null,"openapi":"/openapi.json patch /v0/sourceRules/{ruleId}","href":"/api-reference/sources/update-rule"}]},{"group":"Subscriptions","pages":[{"title":"List","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/subscriptions","href":"/api-reference/subscriptions/list"},{"title":"Create","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/subscriptions","href":"/api-reference/subscriptions/create"},{"title":"Get","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/subscriptions/{id}","href":"/api-reference/subscriptions/get"},{"title":"Update","deprecated":null,"version":null,"openapi":"/openapi.json patch /v0/subscriptions/{id}","href":"/api-reference/subscriptions/update"},{"title":"Get Price Intervals","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/subscriptions/{id}/intervals","href":"/api-reference/subscriptions/get-price-intervals"},{"title":"Edit Price Intervals","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/subscriptions/{id}/intervals","href":"/api-reference/subscriptions/edit-price-intervals"},{"title":"Migrate To A Plan Version","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/subscriptions/{id}/versionMigration","href":"/api-reference/subscriptions/migrate-to-a-plan-version"},{"title":"List Interval Changes","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/subscriptions/{id}/intervalChanges","href":"/api-reference/subscriptions/list-interval-changes"},{"title":"List Merchant Interval Changes","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/intervalChanges","href":"/api-reference/subscriptions/list-merchant-interval-changes"},{"title":"Generate Portal Link","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/subscriptions/{id}/portal","href":"/api-reference/subscriptions/generate-portal-link"},{"title":"Terminate","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/subscriptions/{id}/termination","href":"/api-reference/subscriptions/terminate"},{"title":"Reconcile Features","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/subscriptions/{id}/reconciliations","href":"/api-reference/subscriptions/reconcile-features"},{"title":"List Adjustments","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/subscriptions/{id}/adjustments","href":"/api-reference/subscriptions/list-adjustments"},{"title":"Create Adjustment","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/subscriptions/{id}/adjustments","href":"/api-reference/subscriptions/create-adjustment"},{"title":"Delete Adjustment","deprecated":null,"version":null,"openapi":"/openapi.json delete /v0/subscriptions/{id}/adjustments/{adjustmentId}","href":"/api-reference/subscriptions/delete-adjustment"}]},{"group":"Subscription Proposals","pages":[{"title":"List","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/subscriptionProposals","href":"/api-reference/subscription-proposals/list"},{"title":"Create","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/subscriptionProposals","href":"/api-reference/subscription-proposals/create"},{"title":"Get","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/subscriptionProposals/{id}","href":"/api-reference/subscription-proposals/get"},{"title":"Amend","deprecated":null,"version":null,"openapi":"/openapi.json patch /v0/subscriptionProposals/{id}","href":"/api-reference/subscription-proposals/amend"},{"title":"Approve or reject","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/subscriptionProposals/{id}/decision","href":"/api-reference/subscription-proposals/approve-or-reject"},{"title":"List projected","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/subscriptionProposals/{id}/projected","href":"/api-reference/subscription-proposals/list-projected"}]},{"group":"Contracts","pages":[{"title":"List","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/contracts","href":"/api-reference/contracts/list"},{"title":"Create","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/contracts","href":"/api-reference/contracts/create"},{"title":"Get","description":"Returns the contract in force with its lines: the last approved version, or the draft while nothing is approved yet. When a change waits for approval, `pendingChange` holds it in the same shape, with its own `updatedAt`. A contract of another merchant answers 404, as an unknown one does.","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/contracts/{id}","href":"/api-reference/contracts/get"},{"title":"Update","deprecated":null,"version":null,"openapi":"/openapi.json patch /v0/contracts/{id}","href":"/api-reference/contracts/update"},{"title":"Approve or reject","description":"Approves or rejects the draft of a contract that was never approved, or the change that waits beside an approved contract. Needs the `contracts:approve` permission, whoever wrote the contract. Send the `updatedAt` of the version you read as `basedOnUpdatedAt`.\n\n`approve` writes every line item of the whole term in one transaction, and the contract becomes the version in force with the approver and the time recorded. The approval time is read from the customer's test clock when it has one. Approving a change to a contract that is already approved is not available yet and answers 409 `CONTRACT_RETILE_NOT_AVAILABLE`. `reject` ends a draft as `rejected`, or discards a pending change and leaves the version in force as it was.\n\n409 carries a `code`. `CONTRACT_NOT_PENDING`: nothing waits for a decision, because the contract was decided or rejected. `CONTRACT_CHANGED`: the version changed after you read it. `CONTRACT_INVALID`: the content has validation errors, listed in `details.errors`. Each 409 leaves the contract as it was.","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/contracts/{id}/decision","href":"/api-reference/contracts/approve-or-reject"},{"title":"Projected invoices","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/contracts/{id}/projected","href":"/api-reference/contracts/projected-invoices"}]},{"group":"Users","pages":[{"title":"Get","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/users/{id}","href":"/api-reference/users/get"},{"title":"Update","deprecated":null,"version":null,"openapi":"/openapi.json patch /v0/users/{id}","href":"/api-reference/users/update"}]},{"group":"Invoices V2","pages":[{"title":"List","deprecated":null,"version":null,"openapi":"/openapi.json get /v2/invoices","href":"/api-reference/invoices-v2/list"},{"title":"List Line Items","deprecated":null,"version":null,"openapi":"/openapi.json get /v2/invoices/lineItems","href":"/api-reference/invoices-v2/list-line-items"},{"title":"Create Manual Line Item","deprecated":null,"version":null,"openapi":"/openapi.json post /v2/invoices/lineItems","href":"/api-reference/invoices-v2/create-manual-line-item"},{"title":"List projected","deprecated":null,"version":null,"openapi":"/openapi.json get /v2/invoices/projected","href":"/api-reference/invoices-v2/list-projected"},{"title":"Get","deprecated":null,"version":null,"openapi":"/openapi.json get /v2/invoices/{id}","href":"/api-reference/invoices-v2/get"},{"title":"Get Line Items","deprecated":null,"version":null,"openapi":"/openapi.json get /v2/invoices/{id}/lineItems","href":"/api-reference/invoices-v2/get-line-items"},{"title":"Download Invoice PDF","deprecated":null,"version":null,"openapi":"/openapi.json get /v2/invoices/{id}/pdf","href":"/api-reference/invoices-v2/download-invoice-pdf"},{"title":"Settle Invoice Payment","deprecated":null,"version":null,"openapi":"/openapi.json post /v2/invoices/{id}/payment","href":"/api-reference/invoices-v2/settle-invoice-payment"},{"title":"List Invoice Refunds","deprecated":null,"version":null,"openapi":"/openapi.json get /v2/invoices/{id}/refunds","href":"/api-reference/invoices-v2/list-invoice-refunds"},{"title":"Refund Invoice","deprecated":null,"version":null,"openapi":"/openapi.json post /v2/invoices/{id}/refunds","href":"/api-reference/invoices-v2/refund-invoice"},{"title":"Void Invoice Refund","deprecated":null,"version":null,"openapi":"/openapi.json post /v2/invoices/{id}/refunds/{refundId}/void","href":"/api-reference/invoices-v2/void-invoice-refund"},{"title":"Retry Payment","deprecated":null,"version":null,"openapi":"/openapi.json post /v2/invoices/{id}/retryPayment","href":"/api-reference/invoices-v2/retry-payment"}]},{"group":"Payments","pages":[{"title":"List Payments","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/payments","href":"/api-reference/payments/list-payments"},{"title":"Create Payment","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/payments","href":"/api-reference/payments/create-payment"},{"title":"Get Payment","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/payments/{id}","href":"/api-reference/payments/get-payment"}]},{"group":"Payment Sessions","pages":[{"title":"List","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/paymentSessions","href":"/api-reference/payment-sessions/list"}]},{"group":"Events","pages":[{"title":"Ingest Event","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/events","href":"/api-reference/events/ingest-event"}]},{"group":"Costs","pages":[{"title":"List","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/costs","href":"/api-reference/costs/list"},{"title":"Create","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/costs","href":"/api-reference/costs/create"},{"title":"Get","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/costs/{id}","href":"/api-reference/costs/get"},{"title":"Delete","deprecated":null,"version":null,"openapi":"/openapi.json delete /v0/costs/{id}","href":"/api-reference/costs/delete"},{"title":"Update","deprecated":null,"version":null,"openapi":"/openapi.json patch /v0/costs/{id}","href":"/api-reference/costs/update"},{"title":"Query Summary","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/costs/{id}/summary","href":"/api-reference/costs/query-summary"},{"title":"Report","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/costs/report","href":"/api-reference/costs/report"}]},{"group":"Revenue","pages":[{"title":"Get revenue summary","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/revenue","href":"/api-reference/revenue/get-revenue-summary"},{"title":"List customer accounts","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/revenue/accounts","href":"/api-reference/revenue/list-customer-accounts"}]},{"group":"Profitability","pages":[{"title":"Get profitability summary","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/profitability","href":"/api-reference/profitability/get-profitability-summary"}]},{"group":"Test Clocks","pages":[{"title":"List","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/testClocks","href":"/api-reference/test-clocks/list"},{"title":"Create","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/testClocks","href":"/api-reference/test-clocks/create"},{"title":"Get","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/testClocks/{id}","href":"/api-reference/test-clocks/get"},{"title":"Delete","deprecated":null,"version":null,"openapi":"/openapi.json delete /v0/testClocks/{id}","href":"/api-reference/test-clocks/delete"},{"title":"Advance","deprecated":null,"version":null,"openapi":"/openapi.json patch /v0/testClocks/{id}","href":"/api-reference/test-clocks/advance"}]},{"group":"Merchant Data","pages":[{"title":"Reset a merchant's data","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/merchants/{merchantId}/reset","href":"/api-reference/merchant-data/reset-a-merchants-data"}]},{"group":"ExternalReferences","pages":[{"title":"List","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/externalReferences","href":"/api-reference/externalreferences/list"},{"title":"Create","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/externalReferences","href":"/api-reference/externalreferences/create"},{"title":"Get","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/externalReferences/{id}","href":"/api-reference/externalreferences/get"},{"title":"Delete","deprecated":null,"version":null,"openapi":"/openapi.json delete /v0/externalReferences/{id}","href":"/api-reference/externalreferences/delete"},{"title":"Update","deprecated":null,"version":null,"openapi":"/openapi.json patch /v0/externalReferences/{id}","href":"/api-reference/externalreferences/update"}]},{"group":"Items","pages":[{"title":"List","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/items","href":"/api-reference/items/list"},{"title":"Create","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/items","href":"/api-reference/items/create"},{"title":"Get","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/items/{id}","href":"/api-reference/items/get"},{"title":"Update","deprecated":null,"version":null,"openapi":"/openapi.json patch /v0/items/{id}","href":"/api-reference/items/update"}]},{"group":"Orders","pages":[{"title":"List orders","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/orders","href":"/api-reference/orders/list-orders"},{"title":"Create an order","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/orders","href":"/api-reference/orders/create-an-order"},{"title":"Get an order","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/orders/{id}","href":"/api-reference/orders/get-an-order"},{"title":"Delete an order","deprecated":null,"version":null,"openapi":"/openapi.json delete /v0/orders/{id}","href":"/api-reference/orders/delete-an-order"},{"title":"Update an order","deprecated":null,"version":null,"openapi":"/openapi.json patch /v0/orders/{id}","href":"/api-reference/orders/update-an-order"},{"title":"Add a line item","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/orders/{orderId}/lineItems","href":"/api-reference/orders/add-a-line-item"},{"title":"Delete a line item","deprecated":null,"version":null,"openapi":"/openapi.json delete /v0/orders/{orderId}/lineItems/{id}","href":"/api-reference/orders/delete-a-line-item"},{"title":"Update a line item","deprecated":null,"version":null,"openapi":"/openapi.json patch /v0/orders/{orderId}/lineItems/{id}","href":"/api-reference/orders/update-a-line-item"},{"title":"Create an approval for the order","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/orders/{orderId}/approvals","href":"/api-reference/orders/create-an-approval-for-the-order"}]},{"group":"Billing Schedules","pages":[{"title":"List billing schedules","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/billingSchedules","href":"/api-reference/billing-schedules/list-billing-schedules"},{"title":"Create a billing schedule","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/billingSchedules","href":"/api-reference/billing-schedules/create-a-billing-schedule"},{"title":"Get a billing schedule","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/billingSchedules/{id}","href":"/api-reference/billing-schedules/get-a-billing-schedule"},{"title":"Delete a billing schedule","deprecated":null,"version":null,"openapi":"/openapi.json delete /v0/billingSchedules/{id}","href":"/api-reference/billing-schedules/delete-a-billing-schedule"},{"title":"Update a billing schedule","deprecated":null,"version":null,"openapi":"/openapi.json patch /v0/billingSchedules/{id}","href":"/api-reference/billing-schedules/update-a-billing-schedule"},{"title":"List schedule intervals","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/billingSchedules/{id}/intervals","href":"/api-reference/billing-schedules/list-schedule-intervals"},{"title":"Replace schedule intervals","deprecated":null,"version":null,"openapi":"/openapi.json put /v0/billingSchedules/{id}/intervals","href":"/api-reference/billing-schedules/replace-schedule-intervals"},{"title":"List staged invoices","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/billingSchedules/{id}/invoices","href":"/api-reference/billing-schedules/list-staged-invoices"},{"title":"Generate staged invoices","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/billingSchedules/{id}/invoices","href":"/api-reference/billing-schedules/generate-staged-invoices"}]},{"group":"Salesforce","pages":[{"title":"List Salesforce accounts","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/integrations/salesforce/accounts","href":"/api-reference/salesforce/list-salesforce-accounts"}]},{"group":"MerchantIntegrations","pages":[{"title":"List","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/merchantIntegrations","href":"/api-reference/merchantintegrations/list"},{"title":"Upsert","deprecated":null,"version":null,"openapi":"/openapi.json put /v0/merchantIntegrations","href":"/api-reference/merchantintegrations/upsert"},{"title":"Get","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/merchantIntegrations/{id}","href":"/api-reference/merchantintegrations/get"},{"title":"Disconnect","deprecated":null,"version":null,"openapi":"/openapi.json patch /v0/merchantIntegrations/{id}/disconnect","href":"/api-reference/merchantintegrations/disconnect"}]},{"group":"Approvals","pages":[{"title":"List approvals","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/approvals","href":"/api-reference/approvals/list-approvals"},{"title":"Submit a resource for approval","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/approvals","href":"/api-reference/approvals/submit-a-resource-for-approval"},{"title":"Get an approval","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/approvals/{id}","href":"/api-reference/approvals/get-an-approval"},{"title":"Update an approval (approve, reject, or cancel)","deprecated":null,"version":null,"openapi":"/openapi.json patch /v0/approvals/{id}","href":"/api-reference/approvals/update-an-approval-approve-reject-or-cancel"}]},{"group":"Webhooks","pages":[{"title":"Get","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/webhooks","href":"/api-reference/webhooks/get"},{"title":"Enable","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/webhooks","href":"/api-reference/webhooks/enable"},{"title":"Disable","deprecated":null,"version":null,"openapi":"/openapi.json delete /v0/webhooks","href":"/api-reference/webhooks/disable"},{"title":"Update","deprecated":null,"version":null,"openapi":"/openapi.json patch /v0/webhooks","href":"/api-reference/webhooks/update"},{"title":"Get Portal Access","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/webhooks/portal","href":"/api-reference/webhooks/get-portal-access"}]}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/changelog"}]}]},"basePath":"","title":"Update - Paygentic","deploymentId":"dpl_QQ3G2kinQNQFFK6Sh8dmX2teK74w","buildId":"dpl_QQ3G2kinQNQFFK6Sh8dmX2teK74w","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-CyAr6xD1.js","snippetPresets-BSqedH3o.js","utils-DXfQSZU_.js","style-to-object-BY3JEAdk.js","utils-DiMyLQC-.js","v4-DIgz8zy6.js","addTypeLabelsToSchema-DvPCxzT8.js","conditional-requirements-CFM0id0Q.js","cloneDeep-dx7iM-7h.js","_Uint8Array-DpQIK2Aw.js","isObject-FP1Yky1u.js","ApiExamples-B2sy5qvP.js","usePlaygroundInputsStore-BDc5FJKB.js","shallow-DxZq5uhD.js","isEqual-Bl_IuwU4.js","CodeSnippets-D1UoeS-I.js","CodeSnippet-C87it1Zg.js","use-playground-group-access-DyECiQ2v.js","Page-wigwbDGe.js","api-description-markdown-DHZIfeWZ.js","DynamicMarkdown-D8KwOkxZ.js","SectionHeading-uish4Ed2.js","MethodPill-DR7O5MCP.js","getPastedJson-D2WQib0m.js","Check2Icon-CUuzblYS.js","axios-CsQoIw0U.js","Markdown-K6_WYP3x.js","AssistantPageLink-BrppVW5v.js","dist-OmDnwAnM.js","lib-DMeTj1gb.js","lib-B8HbPgcC.js","katex-Dbtb6Wk7.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js"]}