curl --request POST \
--url http://localhost:3500/v1/alerts/{id}/credit \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('http://localhost:3500/v1/alerts/{id}/credit', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "http://localhost:3500/v1/alerts/{id}/credit"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text){
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"explanation": "<string>",
"status": "pending",
"correction_type": "modify_item",
"confidence": {
"level": "high",
"reason": "<string>"
},
"impact_amount": "<string>",
"currency_code": "<string>",
"organization_currency": {
"currency_code": "<string>",
"impact_amount": "<string>"
},
"freshness": "current",
"invoice": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invoice_number": "<string>",
"title": "<string>",
"category": "invoice",
"issued_date": "2023-12-25",
"due_date": "2023-12-25",
"currency_code": "<string>",
"total_amount_including_vat": "<string>"
},
"invoice_item": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"line_number": 123,
"product_code": "<string>",
"description": "<string>",
"unit": "<string>"
},
"agreement": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"status": "draft",
"version": 123
},
"supplier": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>"
},
"recipient": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>"
},
"topic": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"is_locked": true
},
"claim": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"status": "pending"
},
"provenance": {
"agreement_version": 123,
"invoice_fingerprint": "<string>",
"retained_check": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
},
"correction_relationships": [
{
"replacement_alert_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"replaced_alert_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"correction_relationships_truncated": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"questions": [
"<string>"
],
"price_item_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"expected": {
"base_price": "<string>",
"quantity": "<string>",
"discount": "<string>",
"surcharge": "<string>",
"adjustment_uplift": "<string>",
"net_price": "<string>",
"total": "<string>",
"price_explanation": "<string>",
"adjustment_explanation": "<string>",
"product_code": "<string>",
"description": "<string>",
"unit": "<string>"
},
"invoiced": {
"base_price": "<string>",
"net_price": "<string>",
"quantity": "<string>",
"discount": "<string>",
"surcharge": "<string>",
"total": "<string>"
},
"evidence": {
"citations": [
{
"source_ref": 123,
"citation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"quote": "<string>",
"text": "<string>",
"verification": "verified",
"verification_score": 123,
"available": true,
"source_type": "document",
"document_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"document_name": "<string>",
"page": "<string>",
"section_title": "<string>",
"context_before": "<string>",
"context_after": "<string>",
"original_quote": "<string>"
}
],
"truncated": true
}
}{
"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 alert belongs to a completed claim, or this status transition is incompatible.",
"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"
}
}Mark an alert as credited
Records that the supplier has credited this alert. Only the status changes: any claim attachment is kept and no claim amount is recorded. A later change in credit-note coverage does not revert it. Credited is a no-op.
curl --request POST \
--url http://localhost:3500/v1/alerts/{id}/credit \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('http://localhost:3500/v1/alerts/{id}/credit', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "http://localhost:3500/v1/alerts/{id}/credit"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text){
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"explanation": "<string>",
"status": "pending",
"correction_type": "modify_item",
"confidence": {
"level": "high",
"reason": "<string>"
},
"impact_amount": "<string>",
"currency_code": "<string>",
"organization_currency": {
"currency_code": "<string>",
"impact_amount": "<string>"
},
"freshness": "current",
"invoice": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invoice_number": "<string>",
"title": "<string>",
"category": "invoice",
"issued_date": "2023-12-25",
"due_date": "2023-12-25",
"currency_code": "<string>",
"total_amount_including_vat": "<string>"
},
"invoice_item": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"line_number": 123,
"product_code": "<string>",
"description": "<string>",
"unit": "<string>"
},
"agreement": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"status": "draft",
"version": 123
},
"supplier": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>"
},
"recipient": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>"
},
"topic": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"is_locked": true
},
"claim": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"status": "pending"
},
"provenance": {
"agreement_version": 123,
"invoice_fingerprint": "<string>",
"retained_check": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
},
"correction_relationships": [
{
"replacement_alert_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"replaced_alert_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"correction_relationships_truncated": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"questions": [
"<string>"
],
"price_item_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"expected": {
"base_price": "<string>",
"quantity": "<string>",
"discount": "<string>",
"surcharge": "<string>",
"adjustment_uplift": "<string>",
"net_price": "<string>",
"total": "<string>",
"price_explanation": "<string>",
"adjustment_explanation": "<string>",
"product_code": "<string>",
"description": "<string>",
"unit": "<string>"
},
"invoiced": {
"base_price": "<string>",
"net_price": "<string>",
"quantity": "<string>",
"discount": "<string>",
"surcharge": "<string>",
"total": "<string>"
},
"evidence": {
"citations": [
{
"source_ref": 123,
"citation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"quote": "<string>",
"text": "<string>",
"verification": "verified",
"verification_score": 123,
"available": true,
"source_type": "document",
"document_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"document_name": "<string>",
"page": "<string>",
"section_title": "<string>",
"context_before": "<string>",
"context_after": "<string>",
"original_quote": "<string>"
}
],
"truncated": true
}
}{
"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 alert belongs to a completed claim, or this status transition is incompatible.",
"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
The alert with its current edit revision.
pending, claimed, dismissed, credited modify_item, modify_invoice, add_item Show child attributes
Show child attributes
^-?\d+(?:\.\d+)?$The impact converted with the rate stored on the alert.
Show child attributes
Show child attributes
current, outdated, unknown Show child attributes
Show child attributes
Current linked invoice line details, not a snapshot at alert creation. Null when no accessible line is linked.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
The claim this alert is currently attached to, if any.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Links between an added-item alert and the line alerts it replaces. Alerts connected by these links form one replacement set.
100Show child attributes
Show child attributes
Agreement price items the finding relies on. Read them with GET /v1/agreements/{id}/price-items?ids=.
Show child attributes
Show child attributes
Pricing values captured when the alert was created.
Show child attributes
Show child attributes
Show child attributes
Show child attributes