Documentation

Cajari API Documentation (V2)

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

Overview

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

V2 Improvements: The V2 API introduces merchant marketplace-centric execution triggering, allowing you to target specific merchant marketplaces rather than triggering all marketplaces for a Seller Central account.


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/v2/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/v2/whoami \
    -H "Authorization: Bearer <your_api_key_here>"
                

Example Response

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

Available Skills

To list all available skills that can be enabled for merchant marketplaces, use the GET /v2/skills endpoint.

Example Request

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

Example Response

{
    "status": "ok",
    "error": "",
    "data": [
        {
            "slug": "case_log",
            "name": "Case Log"
        },
        {
            "slug": "seller_feedback",
            "name": "Seller Feedback"
        },
        ...
    ]
}
                

Seller Central Accounts

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



Request Parameters
Parameter Description

page

Integer page number, in pages of 100

Example Request

curl https://api.cajari.com/v2/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_used_at": "2025-05-21 01:04:49",
            "last_login_status": "success"
        },
        ...
    ]
}
                

Trigger Discovery

To discover all merchant + marketplace combinations available to a Seller Central account, use the POST /v2/seller_central_accounts/{id}/discover endpoint. This logs in and discovers marketplaces without running any skills.

Example Request

curl --request POST https://api.cajari.com/v2/seller_central_accounts/05SC1234/discover \
    -H "Authorization: Bearer <your_api_key_here>"
                

Example Response

{
    "status": "ok",
    "error": "",
    "data": {
        "message": "Discovery queued",
        "batch_id": "05OZCC8W",
        "execution_id": "05OZCD9X",
        "seller_central_account": "seller@example.com"
    }
}
                

Merchant Marketplaces

To view the list of merchant marketplace combinations on your account, you can use the GET /v2/merchant_marketplaces endpoint. By default, only active merchant marketplaces are returned. Use status=all to include disabled and pending marketplaces.



Request Parameters
Parameter Description

page

Integer page number, in pages of 100

status

Filter by status. Default: active. Use all to include disabled and pending marketplaces.

Example Request

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

Example Response

{
    "status": "ok",
    "error": "",
    "data": [
        {
            "id": "05MM1234",
            "customer_id": "customer-abc",
            "customer_name": "Demo Customer",
            "status": "active",
            "merchant_name": "Demo Merchant",
            "marketplace_name": "United States",
            "discovered_at": "2025-05-10 01:41:12",
            "last_observed_at": "2025-05-21 02:25:04",
            "last_execution_started_at": "2025-05-21 02:12:47",
            "last_execution_status": "success"
        },
        ...
    ]
}
                

Get Merchant Marketplace

To get details for a single merchant marketplace including all skills with their enabled/disabled state, use the GET /v2/merchant_marketplaces/{id} endpoint.

Example Request

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

Example Response

{
    "status": "ok",
    "error": "",
    "data": {
        "id": "05MM1234",
        "customer_id": "customer-abc",
        "customer_name": "Demo Customer",
        "status": "active",
        "merchant_name": "Demo Merchant",
        "marketplace_name": "United States",
        "discovered_at": "2025-05-10 01:41:12",
        "last_observed_at": "2025-05-21 02:25:04",
        "last_execution_started_at": "2025-05-21 02:12:47",
        "last_execution_status": "success",
        "skills": [
            {
                "slug": "case_log",
                "name": "Case Log",
                "enabled": true
            },
            {
                "slug": "seller_feedback",
                "name": "Seller Feedback",
                "enabled": false
            },
            ...
        ]
    }
}
                

Enable / Disable Merchant Marketplace

To enable or disable a merchant marketplace, use:

  • POST /v2/merchant_marketplaces/{id}/enable
  • POST /v2/merchant_marketplaces/{id}/disable

Disabled marketplaces will not be included in scheduled executions.

Example Request

curl --request POST https://api.cajari.com/v2/merchant_marketplaces/05MM1234/enable \
    -H "Authorization: Bearer <your_api_key_here>"
                

Example Response

{
    "status": "ok",
    "error": "",
    "data": {
        "id": "05MM1234",
        "customer_id": "customer-abc",
        "customer_name": "Demo Customer",
        "status": "active",
        "merchant_name": "Demo Merchant",
        "marketplace_name": "United States",
        ...
    }
}
                

Update Merchant Marketplace

To update a merchant marketplace's status and/or your own reference fields, use the POST /v2/merchant_marketplaces/{id} endpoint with a JSON body. Send any subset of status, customer_id, and customer_name. status must be active or disabled; send null to clear a customer field.

Example Request

curl --request POST https://api.cajari.com/v2/merchant_marketplaces/05MM1234 \
    -H "Authorization: Bearer <your_api_key_here>" \
    -H "Content-Type: application/json" \
    --data '{"status": "active", "customer_id": "customer-abc", "customer_name": "Demo Customer"}'
                

Example Response

{
    "status": "ok",
    "error": "",
    "data": {
        "id": "05MM1234",
        "customer_id": "customer-abc",
        "customer_name": "Demo Customer",
        "status": "active",
        "merchant_name": "Demo Merchant",
        "marketplace_name": "United States",
        ...
    }
}
                

Merchant Marketplace Skills

To view all skills with their enabled/disabled state for a merchant marketplace, use the GET /v2/merchant_marketplaces/{id}/skills endpoint.

To set which skills are enabled, use the POST /v2/merchant_marketplaces/{id}/skills endpoint with a JSON body. All skills not in the list will be disabled.

Example Request (Set Skills)

curl --request POST https://api.cajari.com/v2/merchant_marketplaces/05MM1234/skills \
    -H "Authorization: Bearer <your_api_key_here>" \
    -H "Content-Type: application/json" \
    --data '{"skills": ["case_log", "seller_feedback"]}'
                

Example Response

{
    "status": "ok",
    "error": "",
    "data": [
        {
            "slug": "case_log",
            "name": "Case Log",
            "enabled": true
        },
        {
            "slug": "seller_feedback",
            "name": "Seller Feedback",
            "enabled": true
        },
        {
            "slug": "order_defect",
            "name": "Order Defect Rate",
            "enabled": false
        },
        ...
    ]
}
                

List Executions

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



Request Parameters
Parameter Description

page

Integer page number, in pages of 100

Example Request

curl https://api.cajari.com/v2/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",
            "email": "seller@example.com",
            "merchant_marketplace_id": "05MM1234",
            "customer_id": "customer-abc",
            "customer_name": "Demo Customer",
            "merchant_id": "05MR5678",
            "merchant_name": "Demo Merchant",
            "marketplace_name": "United States"
        },
        ...
    ]
}
                

Trigger an Execution

To trigger an execution for a specific merchant marketplace, use the POST /v2/executions endpoint.

V2 Advantage: Target a specific merchant marketplace instead of triggering all marketplaces for a Seller Central account. The system will automatically select an appropriate Seller Central account if you don't specify one.

Request Parameters
Parameter Description

merchant_marketplace_id

Required. The specific merchant marketplace to run skills on.

seller_central_account_id

Optional. If not provided, the system will automatically select a Seller Central account that has access to this merchant marketplace.

skills

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

Example Request

curl --request POST --location https://api.cajari.com/v2/executions \
    -H "Authorization: Bearer <your_api_key_here>" \
    -H "Content-Type: application/json" \
    --data '{
        "merchant_marketplace_id":"05MM1234",
        "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",
                "merchant_marketplace_id": "05MM1234",
                "customer_id": "customer-abc",
                "customer_name": "Demo Customer",
                "merchant_id": "05MR5678",
                "merchant_name": "Demo Merchant",
                "marketplace_name": "United States"
            }
        ],
        "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 /v2/results endpoint



Request Parameters
Parameter Description

page

Integer page number, in pages of 100

Example Request

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

Example Response

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

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 /v2/reports/{result_id} endpoint to download the desired report. The result_id comes from the Results endpoint

For reports returned as JSON, append ?format=csv to download a flattened CSV instead — convenient for opening in Excel or Google Sheets. Reports that are already tabular are returned unchanged.

Example Request

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

Example Request (CSV)

curl "https://api.cajari.com/v2/reports/05Q6XA4G?format=csv" \
    -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",
    "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/v2/reports/05Q6JA4G"
}