This endpoint allows you to run a specific check for either Know Your Business (KYB) or Know Your Customer (KYC) processes.

API Endpoint

POST https://api.parcha.ai/runCheck

Request Body

agent_key
string
required

The unique identifier for the agent to be used for the check.

check_id
string
required

The identifier of the specific check you want to run.

payload
object
required

The KYB or KYC schema containing the information for the check.

webhook_url
string

An optional URL to receive webhook notifications about the check status.

check_args
object

Optional arguments specific to the check being run.

Response

id
string

The unique identifier for the created check job.

status
string

The current status of the check job (e.g., “PENDING”, “RUNNING”, “COMPLETE”).

created_at
string

The timestamp when the check job was created.

updated_at
string

The timestamp when the check job was last updated.

agent_id
string

The ID of the agent used for this check.

input_payload
object

The input payload provided for the check job.

Example Request

Example Response

{
  "id": "check-12345-abcde",
  "status": "PENDING",
  "created_at": "2023-06-15T15:30:00Z",
  "updated_at": "2023-06-15T15:30:00Z",
  "agent_id": "public-bdd",
  "input_payload": {
    "agent_key": "public-bdd",
    "check_id": "kyb.web_presence_check",
    "payload": {
      "id": "parcha-single-check-001",
      "self_attested_data": {
        "business_name": "Acme Corp",
        "website": "https://www.acmecorp.com"
      }
    },
    "webhook_url": "https://your-webhook.com/check-updates"
  }
}

This endpoint runs a specific check with the provided parameters. The response includes a check job ID that can be used to track the progress and retrieve results of the check.

Implementation Details

The runCheck endpoint is implemented in the shared_router.py file. Here’s a brief overview of the implementation:

  1. The endpoint uses the get_check_schema dependency to parse and validate the incoming request data.
  2. It then calls the celery_enqueue_run_check function, which handles the logic for running a single check.
  3. The function checks if the user has access to the requested agent and validates the check configuration.
  4. If everything is valid, it enqueues the check job using Celery.
  5. Finally, it returns a JSON response with the check job details.

For more detailed information about the implementation, you can refer to the shared_router.py file in the Parcha backend codebase.

Available Checks

Here are some of the available checks that can be run using this endpoint:

  • kyb.web_presence_check: Verifies the online presence of a business.
  • kyb.business_registration_check: Checks the registration status of a business.
  • kyc.identity_verification: Verifies the identity of an individual.
  • kyc.adverse_media_check: Searches for any negative media coverage related to an individual.

The available checks may vary depending on your subscription level and the specific agent you’re using. Consult the Parcha documentation or contact support for a complete list of checks available to you.

Best Practices

  1. Choose the right check: Make sure you’re using the appropriate check for your use case (KYB or KYC).
  2. Provide comprehensive data: The more details you provide in the payload, the more thorough and accurate the check can be.
  3. Use webhooks: Setting up a webhook_url allows you to receive real-time updates about your check progress.
  4. Handle errors gracefully: Be prepared to handle potential errors or edge cases in your application.
  5. Respect rate limits: Be mindful of any rate limits on the API to ensure smooth operation of your integration.

By following these guidelines, you can effectively use the runCheck endpoint to perform specific checks as part of your KYB or KYC processes.