Get jobs by case ID
curl --request GET \
--url https://api.parcha.ai/api/v1/getJobsByCaseId \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.parcha.ai/api/v1/getJobsByCaseId"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.parcha.ai/api/v1/getJobsByCaseId', 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.parcha.ai/api/v1/getJobsByCaseId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.parcha.ai/api/v1/getJobsByCaseId"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.parcha.ai/api/v1/getJobsByCaseId")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.parcha.ai/api/v1/getJobsByCaseId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"jobs": [
{}
],
"count": 123
}Getting Started
Get Jobs by Case ID
Retrieve all jobs associated with a specific case ID for a given agent
GET
/
getJobsByCaseId
Get jobs by case ID
curl --request GET \
--url https://api.parcha.ai/api/v1/getJobsByCaseId \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.parcha.ai/api/v1/getJobsByCaseId"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.parcha.ai/api/v1/getJobsByCaseId', 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.parcha.ai/api/v1/getJobsByCaseId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.parcha.ai/api/v1/getJobsByCaseId"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.parcha.ai/api/v1/getJobsByCaseId")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.parcha.ai/api/v1/getJobsByCaseId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"jobs": [
{}
],
"count": 123
}This endpoint retrieves all jobs associated with a specific case ID for a given agent.
Endpoint
GET /getJobsByCaseId
Parameters
Response
The response follows theJobsResponse model, which typically includes:
Each job object may include:
Deprecation Note: The status_messages field will be deprecated in future versions.
Error Responses
| Status Code | Description |
|---|---|
| 404 | Case or jobs not found |
| 403 | Unauthorized access to agent |
| 500 | Internal server error |
Example Request
curl -X GET 'https://api.parcha.ai/api/v1/getJobsByCaseId?case_id=123456&agent_key=your_agent_key&include_check_results=true&include_status_messages=true' \
-H 'Authorization: Bearer YOUR_API_KEY'
Example Response
{
"jobs": [
{
"id": "job_789012",
"status": "completed",
"created_at": "2023-06-15T10:00:00Z",
"updated_at": "2023-06-15T10:05:00Z",
"check_results": [
{
"id": "check_345678",
"type": "business_verification",
"status": "completed",
"result": {
"verified": true,
"risk_score": 25
}
}
],
"status_messages": [
{
"timestamp": "2023-06-15T10:01:00Z",
"message": "Business verification check started"
},
{
"timestamp": "2023-06-15T10:05:00Z",
"message": "Business verification check completed"
}
]
}
]
}
Notes
- This endpoint requires authentication. Make sure to include your API key in the request headers.
- The user must have access to the specified agent to retrieve the jobs.
- The
include_check_resultsandinclude_status_messagesparameters allow you to control the level of detail in the response. Setting these totruemay increase the response size and processing time. - The structure of check results may vary depending on the type of checks performed in the jobs.