POST
/watchlist/candidates/{id}/declineDecline a candidate
Declines a discovered case candidate: your "no" to it.
Overview
Declines a discovered case candidate: your "no" to it. The candidate moves to the historical tab rather than being removed, so it stays visible. Available on accounts where your own team reviews new cases, with the same eligibility as confirming a candidate. A candidate can only be decided once.
Auth API key
Send your API key in the
X-CasePrimus-Api-Key header. See Authentication for how to create a key, and Rate limits & errors for how requests are counted.Parameters
| Name | In | Description |
|---|---|---|
idstring Required | path | The id returned when the resource was created. |
Example request
Replace CASEPRIMUS_API_KEY with your key.
Request
BASE="https://api.caseprimus.ai/api/caseprimus/v1" curl -X POST "$BASE/watchlist/candidates/CANDIDATE_ID/decline" \ -H "X-CasePrimus-Api-Key: $CASEPRIMUS_API_KEY"
const BASE = "https://api.caseprimus.ai/api/caseprimus/v1"; const res = await fetch(BASE + "/watchlist/candidates/CANDIDATE_ID/decline", { method: "POST", headers: { "X-CasePrimus-Api-Key": process.env.CASEPRIMUS_API_KEY, }, }); const data = await res.json();
import os import requests BASE = "https://api.caseprimus.ai/api/caseprimus/v1" res = requests.request( "POST", BASE + "/watchlist/candidates/CANDIDATE_ID/decline", headers={"X-CasePrimus-Api-Key": os.environ["CASEPRIMUS_API_KEY"]}, ) data = res.json()
Responses
200Candidate declined.
Response 200
{}400Candidate does not exist, is not approved yet, or has already been decided on.
Response 400
{
"httpStatusCode": 400,
"code": 60415,
"message": "You've already made a decision on this candidate",
"appError": true
}{
"httpStatusCode": 400,
"code": 60415,
"message": "You've already made a decision on this candidate",
"appError": true
}403The entity this candidate belongs to has not been shared with you, or the CasePrimus team does this for your account instead.
Error responses share one shape, listed on Rate limits & errors.