Documentation

Cajari API Documentation (V1)

API Version: V1 (Legacy)   |   View V2 Documentation (Recommended)

Overview

The Cajari API provides access to accounts, merchant marketplaces, executions, and results so that you can integrate our data into your system


Authentication

Cajari uses API Keys to authenticate requests. You can view your API key on the Account Settings page.

Use your API Key as a Bearer token in the HTTP Authentication header, as in this example

Example Request

curl https://api.cajari.com/v1/whoami \
    -H "Authorization: Bearer <your_api_key_here>"
                

Identity

To view the identity of your token, and verify that the API is working correctly, you can use the identity endpoint

Example Request

curl https://api.cajari.com/v1/whoami \
    -H "Authorization: Bearer <your_api_key_here>"
                

Example Response

{
    "status": "ok",
    "error": "",
    "data": {
        "account": {
            "name": "Demo Account",
            "id": "058D9C3K"
        }
    }
}
                

Seller Central Accounts

To view the list of connected Seller Central Accounts, you can use the GET /v1/seller_central_accounts endpoint



Request Parameters
Parameter Description

page

Integer page number, in pages of 100

Example Request

curl https://api.cajari.com/v1/seller_central_accounts \
    -H "Authorization: Bearer <your_api_key_here>"
                

Example Response

{
    "status": "ok",
    "error": "",
    "data": [
        {
            "seller_central_account_id": "0589RH8O",
            "email": "seller@example.com",
            "created_at": "2025-05-10 01:41:12",
            "last_execution_ts": "2025-05-21 01:04:49",
            "last_execution_summary": "success"
        },
        ...
    ]
}
                

Merchant Marketplaces

To view the list of merchant marketplace combinations on your account, you can use the GET /v1/merchant_marketplaces endpoint. Disabled merchant marketplaces are hidden by default.



Request Parameters
Parameter Description

page

Integer page number, in pages of 100

include_disabled

Optional. When present, includes disabled merchant marketplaces in the response

Example Request

curl https://api.cajari.com/v1/merchant_marketplaces \
    -H "Authorization: Bearer <your_api_key_here>"
                

Example Response

{
    "status": "ok",
    "error": "",
    "data": [
        {
            "seller_central_account_id": "05SC1234",
            "seller_central_account_name": "Demo Merchant United States",
            "customer_id": "customer-abc",
            "merchant_name": "Demo Merchant",
            "marketplace_name": "United States",
            "id": "05MM1234",
            "status": "active",
            "merchant_token": "A1B2C3D4E5F6G7",
            "discovered_at": "2025-05-10 01:41:12",
            "last_observed_at": "2025-05-21 02:25:04"
        },
        ...
    ]
}
                

List Executions

To see the execution history on your account, you can use the GET /v1/executions endpoint



Request Parameters
Parameter Description

page

Integer page number, in pages of 100

Example Request

curl https://api.cajari.com/v1/executions \
    -H "Authorization: Bearer <your_api_key_here>"
                

Example Response

{
    "status": "ok",
    "error": "",
    "data": [
        {
            "execution_id": "05OZCC8W",
            "trigger": "cron",
            "started_at": "2025-05-21 02:12:47",
            "summary": "success",
            "batch_id": "05OZCA1A",
            "seller_central_account_id": "05SC1234",
            "seller_central_account_name": "Demo Merchant United States",
            "email": "seller@example.com",
            "customer_id": "customer-abc",
            "merchant_id": "05MR5678",
            "merchant_name": "Demo Merchant",
            "marketplace_name": "United States",
            "merchant_marketplace_id": "05MM1234"
        },
        ...
    ]
}
                

Trigger an Execution

To trigger executions for all merchant marketplaces associated with a Seller Central account, use the POST /v1/executions endpoint.

Note: This endpoint triggers skills on all active merchant marketplaces for the specified Seller Central account. For more precise control, consider using V2 API which allows targeting a specific merchant marketplace.

Request Parameters
Parameter Description

seller_central_account_id

Required. All active merchant marketplaces for this Seller Central account will be executed.

skills

An array of skills that you wish to perform during this execution

Example Request

curl --request POST --location https://api.cajari.com/v1/executions \
    -H "Authorization: Bearer <your_api_key_here>" \
    -H "Content-Type: application/json" \
    --data '{
        "seller_central_account_id":"05SC1234",
        "skills": [
            "skill_order_defect",
            "skill_policy_compliance"
        ]
    }'
                

Example Response

{
    "status": "ok",
    "error": "",
    "data": {
        "batch_id": "05OZCC8W",
        "executions": [
            {
                "execution_id": "05OZCD9X",
                "seller_central_account_id": "05SC1234",
                "seller_central_account_name": "Demo Merchant United States",
                "customer_id": "customer-abc",
                "merchant_id": "05MR5678",
                "merchant_name": "Demo Merchant",
                "marketplace_name": "United States",
                "merchant_marketplace_id": "05MM1234"
            },
            {
                "execution_id": "05OZCD9Y",
                "seller_central_account_id": "05SC1234",
                "seller_central_account_name": "Demo Merchant Canada",
                "customer_id": "customer-abc",
                "merchant_id": "05MR5678",
                "merchant_name": "Demo Merchant",
                "marketplace_name": "Canada",
                "merchant_marketplace_id": "05MM5678"
            }
        ],
        "trigger": "api",
        "email": "seller@example.com"
    }
}
                

Results

Results represent the output of a skill during a specific execution. To see the results, you can use the GET /v1/results endpoint



Request Parameters
Parameter Description

page

Integer page number, in pages of 100

Example Request

curl https://api.cajari.com/v1/results \
    -H "Authorization: Bearer <your_api_key_here>"
                

Example Response

{
    "status": "ok",
    "error": "",
    "data": [
        {
            "result_id": "05OZSIKH",
            "skill": "skill_voice_of_the_customer",
            "obtained_at": "2025-05-21 02:25:04",
            "format": "json",
            "size": 1024149,
            "report_location": "\/v1\/reports\/05OZSIKH",
            "execution_id": "05OZCC8W",
            "seller_central_account_id": "05SC1234",
            "seller_central_account_name": "Demo Merchant United States",
            "email": "seller@example.com",
            "customer_id": "customer-abc",
            "merchant_id": "05MR5678",
            "merchant_name": "Demo Merchant",
            "marketplace_name": "United States",
            "merchant_marketplace_id": "05MM1234"
        },
        ...
    ]
}
                

View Report

A Report represents the actual data that we obtained. The report format will vary, depending on which skill obtained the report

Use the GET /v1/reports/{result_id} endpoint to download the desired report. The result_id comes from the Results endpoint

Example Request

curl https://api.cajari.com/v1/reports/05Q6XA4G \
    -H "Authorization: Bearer <your_api_key_here>"
                

Example Response

This example is from the shipping_performance skill

{
    "late_shipment_rate_10_day": {
        "period_start": "2025-05-12",
        "period_end": "2025-05-21",
        "total_orders": 2,
        "late_orders": 0,
        "late_shipment_rate": "0%",
        "target": "Under 4%"
    },
    ...
}
                

Webhook Configuration

When we obtain a result, we can send an HTTP post to your Webhook endpoint to alert you that a report is ready for you to process

Configure your webhook URL and API version on the Account Settings page.

For each report that is obtained, we will send you a webhook in the format to the right.

The report_location URL will use your selected Webhook API Version (V1 or V2). New accounts default to V1 for backwards compatibility.

The bearer token we send in the Authorization header is an MD5 hash of your API Key, which allows you to confirm that the message is authentic.

Example Webhook Request

POST https://api.yourdomain.com/cajari-webhook

Content-Type: application/json
Authorization: Bearer <md5_of_your_api_key>

{
    "seller_central_account_id": "05SC1234",
    "seller_central_account_name": "Demo Merchant United States",
    "merchant_name": "Demo Merchant",
    "marketplace_name": "United States",
    "merchant_marketplace_id": "05MM1234",
    "merchant_id": "05MR5678",
    "customer_id": "customer-abc",
    "seller_central_email": "seller@example.com",
    "obtained_at": "2025-05-21 21:53:41",
    "skill": "shipping_performance",
    "outcome": "success",
    "format": "json",
    "size": 1194,
    "report_location": "https://api.cajari.com/v1/reports/05Q6JA4G"
}