curl --request POST \
--url http://localhost:3500/v1/agreements/{id}/context-suggestions/{suggestion_id}/accept \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('http://localhost:3500/v1/agreements/{id}/context-suggestions/{suggestion_id}/accept', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "http://localhost:3500/v1/agreements/{id}/context-suggestions/{suggestion_id}/accept"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text){
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"status": "draft",
"effective_date": "<string>",
"expiration_date": "<string>",
"suppliers": [],
"recipients": [],
"tags": [],
"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": "The suggestion was already reviewed, no longer matches the instructions, would make them longer than 20,000 characters, or agreement work is in progress. Nothing changed.",
"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"
}
}Accept a suggested instruction edit
Applies the edit to the agreement’s instructions as an ordinary edit: the same 20,000-character limit and in-progress rules as PATCH apply, and the agreement version advances, so existing checks become outdated. Other pending suggestions the edit no longer fits are deleted. Returns the updated agreement and its new ETag.
curl --request POST \
--url http://localhost:3500/v1/agreements/{id}/context-suggestions/{suggestion_id}/accept \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('http://localhost:3500/v1/agreements/{id}/context-suggestions/{suggestion_id}/accept', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "http://localhost:3500/v1/agreements/{id}/context-suggestions/{suggestion_id}/accept"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text){
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"status": "draft",
"effective_date": "<string>",
"expiration_date": "<string>",
"suppliers": [],
"recipients": [],
"tags": [],
"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": "The suggestion was already reviewed, no longer matches the instructions, would make them longer than 20,000 characters, or agreement work is in progress. Nothing changed.",
"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.
Path Parameters
A pending suggestion of this agreement.
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
[]
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