- Pending: new, waiting for someone to look at it.
- Claimed: part of a claim you are raising with the supplier.
- Credited: the supplier has credited the amount.
- Dismissed: not something you will act on.
Find alerts
GET /v1/alerts/metricsreturns counts and totals.GET /v1/alerts/groupsgroups them, for example by agreement or topic.GET /v1/alerts/export?format=xlsxdownloads them as a spreadsheet (orformat=csv).
null, as in topic_ids=null.
Record your own alert
When you or your agent find a problem the check missed, record it withPOST /v1/alerts. It then
counts and can be claimed like any other alert. Send topic_id to put it in a topic; without one it
stays uncategorized until Watchdog next sorts the agreement’s alerts, after a check. To sort them
now, call POST /v1/agreements/{id}/alert-topics/reconcile and follow the returned workflow run.
- The invoice must be matched to the agreement.
impact_amountis in the invoice’s currency, positive when the invoice charges more than agreed. For a line or a missing line you can leave it out and sendexpectedprices instead, and Watchdog calculates it. An alert on the whole invoice needsimpact_amount.- To flag one invoice line, send its
invoice_item_idwithcorrection_type: "modify_item". For a missing line useadd_item; for the invoice as a whole, the default,modify_invoice. - Send
topic_idto put the alert in a topic. Without it, the alert stays uncategorized until Watchdog next sorts the agreement’s alerts. - Citations take the same sources as editing: a document quote, agreement prices,
a web page or text you supply. Markers such as
[1]in the text refer to them.
provenance.origin on every alert says who created it: check, user or api_key. A new check
or a check reset replaces alerts you created like any other, unless the alert is accepted in a claim
that is not cancelled.
Resolve an alert
POST /v1/alerts/dismisswith its ID inalert_idsdismisses it. Add acategoryandnoteto say why. Watchdog learns from this and may suggest a change to the agreement’s instructions. Send"suggest_instructions": falsewhen the note only explains a cleanup. The alert shows the reason asdismissal. To change it, dismiss the alert again with the new category and note; other alerts dismissed with it keep theirs.POST /v1/alerts/creditrecords that the supplier has credited it;POST /v1/alerts/uncreditremoves a credit you recorded.POST /v1/alerts/reopensets it back to pending. Credit is kept.
Resolve many alerts at once
POST /v1/alerts/dismiss, /credit and /reopen also work on many alerts at once. Send either a
list of alert_ids, or a filter that uses the same filters as the list:
GET /v1/alerts/metrics with the same filter to see how many alerts you are about
to change.
Delete alerts
DELETE /v1/alerts/{id} deletes an alert, and POST /v1/alerts/delete deletes many with the same
alert_ids or filter. An alert in a claim can’t be deleted until you remove it from the claim.
To reject a wrong finding, dismiss it instead: the dismissal is kept, Watchdog learns from it, and a
new check could otherwise find the same problem again.
Edit an alert
If an alert is almost right, correct it withPATCH /v1/alerts/{id}, sending only the fields you
change, including its confidence and impact_amount. Send the ETag from GET /v1/alerts/{id} as If-Match. A 412
means someone else changed the alert: read it again before retrying. Editing doesn’t re-run the
check.
Topics
Watchdog groups similar alerts on an agreement into topics, such as “Freight charged above the agreed rate”, so you can review them together. Topics are updated automatically after each check.GET /v1/alert-topicslists them, andtopic_idsfilters alerts by topic. Topics without alerts are left out unless you addinclude_empty=true.POST /v1/alert-topicscreates a topic on an agreement, optionally withalert_idsto move in.PATCH /v1/alert-topics/{id}renames or describes a topic.DELETE /v1/alert-topics/{id}deletes a topic. Its alerts stay, without a topic.PATCH /v1/alert-topics/{id}withis_locked: truekeeps a topic’s text as it is, so Watchdog doesn’t rewrite it. You can still move alerts in and out.POST /v1/alert-topics/{id}/alertsmoves alerts into a topic.
See which invoices have been checked
Zero alerts doesn’t always mean an invoice is fine: it may not have been checked yet. Every invoice has analert_summary with its alert counts and whether all its checks are done. Filter invoices
with check_statuses=not_checked,incomplete to find the ones still waiting.