curl --request POST \
--url http://localhost:3500/v1/agreements/{id}/renewal/extend \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'if-match: <if-match>' \
--data '
{
"confirm_occurrence_override": false
}
'const options = {
method: 'POST',
headers: {
'if-match': '<if-match>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({confirm_occurrence_override: false})
};
fetch('http://localhost:3500/v1/agreements/{id}/renewal/extend', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "http://localhost:3500/v1/agreements/{id}/renewal/extend"
payload = { "confirm_occurrence_override": False }
headers = {
"if-match": "<if-match>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"status": "draft",
"effective_date": "<string>",
"expiration_date": "<string>",
"suppliers": [],
"recipients": [],
"tags": [],
"readiness": {
"ready": true,
"reasons": [
"inactive"
]
},
"renewal_action": {
"kind": "cancel_by",
"deadline": "<string>"
},
"version": 1,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"alert_summary": {
"counts": {
"pending": 1,
"claimed": 1,
"dismissed": 1,
"credited": 1
},
"pending_topic_count": 1,
"organization_currency": {
"currency_code": "<string>",
"impact_amount": "<string>",
"missing_amount_count": 123,
"impact_by_status": {
"pending": "<string>",
"claimed": "<string>",
"credited": "<string>",
"dismissed": "<string>"
}
}
},
"relationships": {
"price_item_count": 1,
"document_count": 1,
"invoice_match_count": 1
},
"applicability": {
"match": "all",
"conditions": [
{
"field": "all_references",
"operator": "contains",
"value": "<string>"
}
]
},
"renewal": {
"mode": null,
"period": null,
"occurrences_remaining": null,
"notice_period": null,
"deadline_override": null
},
"instructions": "<string>",
"alert_settings": {
"flag_undercharges": false,
"flag_uncovered_items": false
},
"matching_settings": {
"smart_matching_enabled": false,
"smart_matching_criterion": null
}
}{
"error": {
"code": "validation_error",
"message": "Invalid request format, parameters, or body. Details contain up to 20 actionable field errors; the complete encoded request body must be at most 2 MiB (2,097,152 bytes).",
"request_id": "req_example"
}
}{
"error": {
"code": "invalid_token",
"message": "Missing or invalid bearer credential.",
"request_id": "req_example"
}
}{
"error": {
"code": "forbidden",
"message": "Access denied: forbidden, token_disabled, organization_required, insufficient_role, or mfa_required. Check the error code and effective permissions.",
"request_id": "req_example"
}
}{
"error": {
"code": "not_found",
"message": "The resource does not exist in the current organization.",
"request_id": "req_example"
}
}{
"error": {
"code": "conflict",
"message": "Work is in progress, active-agreement requirements are unmet, the source is unavailable, or an idempotency key conflicts.",
"request_id": "req_example"
}
}{
"error": {
"code": "precondition_failed",
"message": "The resource changed since the supplied ETag was read.",
"request_id": "req_example"
}
}{
"error": {
"code": "precondition_required",
"message": "A current strong If-Match is required.",
"request_id": "req_example"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "The IP or authenticated credential exceeded its request limit.",
"request_id": "req_example"
}
}{
"error": {
"code": "internal_error",
"message": "Unexpected server failure. Include the request ID when contacting support.",
"request_id": "req_example"
}
}{
"error": {
"code": "service_unavailable",
"message": "Authentication infrastructure is unavailable or rate limited. Honor Retry-After when provided.",
"request_id": "req_example"
}
}Extend an agreement term
Exercises an optional renewal: moves the expiration date one renewal period, spends one remaining occurrence and clears the deadline override. Only agreements with optional renewal, an expiration date and a renewal period can be extended (409). When no renewals remain on record (occurrences_remaining null or 0), it returns 409 unless confirm_occurrence_override is true. The agreement version advances and the activity timeline records the extension. Requires a strong If-Match. Starts no matching; refresh matched invoices to apply the new end date.
curl --request POST \
--url http://localhost:3500/v1/agreements/{id}/renewal/extend \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'if-match: <if-match>' \
--data '
{
"confirm_occurrence_override": false
}
'const options = {
method: 'POST',
headers: {
'if-match': '<if-match>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({confirm_occurrence_override: false})
};
fetch('http://localhost:3500/v1/agreements/{id}/renewal/extend', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "http://localhost:3500/v1/agreements/{id}/renewal/extend"
payload = { "confirm_occurrence_override": False }
headers = {
"if-match": "<if-match>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"status": "draft",
"effective_date": "<string>",
"expiration_date": "<string>",
"suppliers": [],
"recipients": [],
"tags": [],
"readiness": {
"ready": true,
"reasons": [
"inactive"
]
},
"renewal_action": {
"kind": "cancel_by",
"deadline": "<string>"
},
"version": 1,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"alert_summary": {
"counts": {
"pending": 1,
"claimed": 1,
"dismissed": 1,
"credited": 1
},
"pending_topic_count": 1,
"organization_currency": {
"currency_code": "<string>",
"impact_amount": "<string>",
"missing_amount_count": 123,
"impact_by_status": {
"pending": "<string>",
"claimed": "<string>",
"credited": "<string>",
"dismissed": "<string>"
}
}
},
"relationships": {
"price_item_count": 1,
"document_count": 1,
"invoice_match_count": 1
},
"applicability": {
"match": "all",
"conditions": [
{
"field": "all_references",
"operator": "contains",
"value": "<string>"
}
]
},
"renewal": {
"mode": null,
"period": null,
"occurrences_remaining": null,
"notice_period": null,
"deadline_override": null
},
"instructions": "<string>",
"alert_settings": {
"flag_undercharges": false,
"flag_uncovered_items": false
},
"matching_settings": {
"smart_matching_enabled": false,
"smart_matching_criterion": null
}
}{
"error": {
"code": "validation_error",
"message": "Invalid request format, parameters, or body. Details contain up to 20 actionable field errors; the complete encoded request body must be at most 2 MiB (2,097,152 bytes).",
"request_id": "req_example"
}
}{
"error": {
"code": "invalid_token",
"message": "Missing or invalid bearer credential.",
"request_id": "req_example"
}
}{
"error": {
"code": "forbidden",
"message": "Access denied: forbidden, token_disabled, organization_required, insufficient_role, or mfa_required. Check the error code and effective permissions.",
"request_id": "req_example"
}
}{
"error": {
"code": "not_found",
"message": "The resource does not exist in the current organization.",
"request_id": "req_example"
}
}{
"error": {
"code": "conflict",
"message": "Work is in progress, active-agreement requirements are unmet, the source is unavailable, or an idempotency key conflicts.",
"request_id": "req_example"
}
}{
"error": {
"code": "precondition_failed",
"message": "The resource changed since the supplied ETag was read.",
"request_id": "req_example"
}
}{
"error": {
"code": "precondition_required",
"message": "A current strong If-Match is required.",
"request_id": "req_example"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "The IP or authenticated credential exceeded its request limit.",
"request_id": "req_example"
}
}{
"error": {
"code": "internal_error",
"message": "Unexpected server failure. Include the request ID when contacting support.",
"request_id": "req_example"
}
}{
"error": {
"code": "service_unavailable",
"message": "Authentication infrastructure is unavailable or rate limited. Honor Retry-After when provided.",
"request_id": "req_example"
}
}Authorizations
Personal API key. Send X-Organization-Id. The required cumulative level is listed in x-watchdog-permission.
Headers
Required for personal API keys. Target one organization you have access to. Migrated keys may omit it to use their original organization. For Clerk sessions, it must match the active organization.
Required strong ETag from the individual resource GET. A missing, weak or * validator returns 428; a stale validator returns 412.
1 - 4096Path Parameters
Body
Extend although no renewals remain on record (occurrences_remaining is null or 0).
Response
Current resource.
draft, active, archived ^\d{4}-\d{2}-\d{2}$^\d{4}-\d{2}-\d{2}$Complete supplier selection. An empty array matches no invoices.
Show child attributes
Show child attributes
[]
Complete recipient selection. An empty array means any recipient.
Show child attributes
Show child attributes
[]
Complete assigned tags, ordered by ID. Empty means no tags.
Show child attributes
Show child attributes
[]
Current eligibility for compliance checks. reasons contains every blocker and is empty exactly when ready is true. This is not a guarantee that a check will succeed or be admitted.
Show child attributes
Show child attributes
Contractual action from the stored renewal terms, independent of agreement status. Reads never roll terms forward. A null deadline means no dated action is known; automatic_notice retains its notice period.
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
Show child attributes
Show child attributes
x >= 0All retained alerts of this agreement, as GET /v1/alerts/metrics?agreement_ids={id} reports them. Team filters select agreements; they do not narrow this summary.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Additional invoice-matching conditions over reference and delivery fields. Included in agreement detail; omitted from list summaries. Null means no additional conditions. Existing values retain whitespace and may exceed current write limits; unsupported stored conditions return 409.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Additional context used when interpreting this agreement during compliance checks.
Agreement-specific alert preferences. Replaces the complete object; omitted flags default to false. Saving preferences does not run checks.
Show child attributes
Show child attributes
Stored smart-matching configuration. Replaces the complete object; omitted values default to false and null. Saving does not run matching.
Show child attributes
Show child attributes