Pre-adverse action for case
curl --request POST \
--url https://api-stage.karmacheck.io/case/id/{caseId}/action/preadverse \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reason": "The candidate was positive for cocaine in his drug test.",
"adverseScreeningSelections": [
"service-drug-1200-panel"
]
}
'import requests
url = "https://api-stage.karmacheck.io/case/id/{caseId}/action/preadverse"
payload = {
"reason": "The candidate was positive for cocaine in his drug test.",
"adverseScreeningSelections": ["service-drug-1200-panel"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
reason: 'The candidate was positive for cocaine in his drug test.',
adverseScreeningSelections: ['service-drug-1200-panel']
})
};
fetch('https://api-stage.karmacheck.io/case/id/{caseId}/action/preadverse', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-stage.karmacheck.io/case/id/{caseId}/action/preadverse",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'reason' => 'The candidate was positive for cocaine in his drug test.',
'adverseScreeningSelections' => [
'service-drug-1200-panel'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-stage.karmacheck.io/case/id/{caseId}/action/preadverse"
payload := strings.NewReader("{\n \"reason\": \"The candidate was positive for cocaine in his drug test.\",\n \"adverseScreeningSelections\": [\n \"service-drug-1200-panel\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-stage.karmacheck.io/case/id/{caseId}/action/preadverse")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"reason\": \"The candidate was positive for cocaine in his drug test.\",\n \"adverseScreeningSelections\": [\n \"service-drug-1200-panel\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-stage.karmacheck.io/case/id/{caseId}/action/preadverse")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"reason\": \"The candidate was positive for cocaine in his drug test.\",\n \"adverseScreeningSelections\": [\n \"service-drug-1200-panel\"\n ]\n}"
response = http.request(request)
puts response.read_bodyCases
Pre-adverse action for case
Begins the adverse action process for a case by putting the case into the Pre-Adverse Action status. This also sends a pre-adverse action notice to the candidate by email, which can also be downloaded from both the customer and candidate dashboards.
POST
/
case
/
id
/
{caseId}
/
action
/
preadverse
Pre-adverse action for case
curl --request POST \
--url https://api-stage.karmacheck.io/case/id/{caseId}/action/preadverse \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reason": "The candidate was positive for cocaine in his drug test.",
"adverseScreeningSelections": [
"service-drug-1200-panel"
]
}
'import requests
url = "https://api-stage.karmacheck.io/case/id/{caseId}/action/preadverse"
payload = {
"reason": "The candidate was positive for cocaine in his drug test.",
"adverseScreeningSelections": ["service-drug-1200-panel"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
reason: 'The candidate was positive for cocaine in his drug test.',
adverseScreeningSelections: ['service-drug-1200-panel']
})
};
fetch('https://api-stage.karmacheck.io/case/id/{caseId}/action/preadverse', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-stage.karmacheck.io/case/id/{caseId}/action/preadverse",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'reason' => 'The candidate was positive for cocaine in his drug test.',
'adverseScreeningSelections' => [
'service-drug-1200-panel'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-stage.karmacheck.io/case/id/{caseId}/action/preadverse"
payload := strings.NewReader("{\n \"reason\": \"The candidate was positive for cocaine in his drug test.\",\n \"adverseScreeningSelections\": [\n \"service-drug-1200-panel\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-stage.karmacheck.io/case/id/{caseId}/action/preadverse")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"reason\": \"The candidate was positive for cocaine in his drug test.\",\n \"adverseScreeningSelections\": [\n \"service-drug-1200-panel\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-stage.karmacheck.io/case/id/{caseId}/action/preadverse")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"reason\": \"The candidate was positive for cocaine in his drug test.\",\n \"adverseScreeningSelections\": [\n \"service-drug-1200-panel\"\n ]\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The ID of the case to to begin an adverse action process on.
Body
application/json
The request body is optional, but if provided, note that the values in the reason and adverseScreeningSelections fields will be visible to the candidate in the pre-adverse action notice. This is to give an indication of the reason and specific screenings for which the action is being taken.
Response
OK
⌘I