This endpoint retrieves all jobs associated with a specific case ID for a given agent.

Endpoint

GET /getJobsByCaseId

Parameters

case_id
string
required

The unique identifier of the case.

agent_key
string
required

The key of the agent associated with the jobs.

include_check_results
boolean
default: "false"

Whether to include detailed check results in the response.

include_status_messages
boolean
default: "false"

Whether to include status messages in the response.

Response

The response follows the JobsResponse model, which typically includes:

jobs
array

An array of job objects associated with the case ID.

Each job object may include:

id
string

The unique identifier of the job.

status
string

The current status of the job (e.g., “pending”, “completed”, “failed”).

created_at
string

The timestamp when the job was created.

updated_at
string

The timestamp when the job was last updated.

check_results
array

An array of check results, if include_check_results is true.

status_messages
array

An array of status messages, if include_status_messages is true.

Error Responses

error
string

A description of the error that occurred.

Status CodeDescription
404Case or jobs not found
403Unauthorized access to agent
500Internal server error

Example Request

curl -X GET 'https://api.parcha.ai/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_results and include_status_messages parameters allow you to control the level of detail in the response. Setting these to true may increase the response size and processing time.
  • The structure of check results may vary depending on the type of checks performed in the jobs.