curl --request GET \
--url http://localhost:3500/v1/agreements/{id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://localhost:3500/v1/agreements/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "http://localhost:3500/v1/agreements/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(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": "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": "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"
}
}Get an agreement
Returns full agreement detail, including renewal, stored invoice applicability conditions, and complete supplier, recipient and tag arrays.
curl --request GET \
--url http://localhost:3500/v1/agreements/{id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://localhost:3500/v1/agreements/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "http://localhost:3500/v1/agreements/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(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": "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": "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
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