Skip to content

Sending match feedback

Feedback records whether Prokure got a match right. It needs the opportunities:write scope, which is what that scope grants.

Terminal window
curl -X POST "https://app.prokure.ca/api/v1/opportunities/$ID/feedback" \
-H "Authorization: Bearer $PROKURE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"verdict": "disagree", "reason": "We do not hold the required certification."}'

verdict is required and must be agree or disagree. reason is optional and runs 1–2000 characters when present. It is worth sending: feedback is what Prok learns from, and a bare disagree says the verdict was wrong without saying what was wrong about it.

A successful call returns 201:

{
"feedback_log_id": "9f3c1b62-77ad-42e0-9d18-5a4e6c0b3f81",
"action": "portal_disagree",
"reason": "We do not hold the required certification.",
"reverdict_queued": true
}

action is the stored form of your verdict, either portal_agree or portal_disagree. reverdict_queued reports whether this feedback queued the opportunity for re-scoring. Read it rather than assuming feedback always triggers a re-run.

portal_agree and portal_disagree are what this endpoint records whether the call came from your own integration or from the Relevant and Not relevant controls on an opportunity card in the portal — both go through this route. Replies to a digest email record their own actions, so do not assume the field only ever holds those two values.

Past feedback comes back in full on the opportunity detail record as feedback_history. Every list item also carries the last of it — latest_feedback_action and latest_feedback_at, the newest action recorded for that opportunity on your account and when it was recorded, both null if there is none. That pair is the cheap check before re-submitting after a retry or a crash: one list call covers a page of opportunities, where feedback_history costs a detail call each.