Documentation

Cajari API Documentation (V2)

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

Overview

The Cajari API provides access to accounts, skills, Amazon accounts, merchant marketplaces, vendor groups, 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 an Amazon 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.

Each skill includes required_permission — the Seller Central permission the login needs for that skill (null if not known). Grant it if a skill reports access-denied.

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",
            "required_permission": "Settings → Manage Your Cases"
        },
        {
            "slug": "seller_feedback",
            "name": "Seller Feedback",
            "required_permission": null
        },
        ...
    ]
}
                

Amazon Accounts

To view the list of connected Amazon Accounts, you can use the GET /v2/amazon_accounts endpoint.

Formerly GET /v2/seller_central_accounts, which still works. Responses now include amazon_account_id / amazon_account_name alongside the legacy seller_central_account_* fields.



Request Parameters
Parameter Description

page

Integer page number, in pages of 100

Example Request

curl https://api.cajari.com/v2/amazon_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 an Amazon account, use the POST /v2/amazon_accounts/{id}/discover endpoint. This logs in and discovers marketplaces without running any skills.

Example Request

curl --request POST https://api.cajari.com/v2/amazon_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
        },
        ...
    ]
}
                

Vendor Groups

Vendor groups are the Vendor Central (1P) analog of merchants. To list the vendor groups on your account with their marketplaces nested, use the GET /v2/vendor_groups endpoint.

Request Parameters
Parameter Description

page

Integer page number, in pages of 100

status

Filter by status: all (default), active, or disabled

Example Request

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

Example Response

{
    "status": "ok",
    "error": "",
    "data": [
        {
            "id": "05VG9012",
            "name": "Demo Vendor Group",
            "status": "active",
            "discovered_at": "2025-09-18 06:00:00",
            "last_observed_at": "2025-09-18 06:00:00",
            "marketplaces": [
                {
                    "id": "05VM3456",
                    "marketplace": "ATVPDKIKX0DER",
                    "marketplace_name": "United States",
                    "country_code": "US",
                    "status": "active",
                    "discovered_at": "2025-09-18 06:00:00",
                    "last_scraped_at": "2025-09-18 06:10:00"
                }
            ]
        },
        ...
    ]
}
                

Vendor Group Marketplaces

Vendor group marketplaces are the 1P analog of merchant marketplaces — the unit that carries status and skills. Endpoints mirror the merchant marketplace ones:

  • GET /v2/vendor_group_marketplaces — list (params: page, status [default active, or "all"])
  • GET /v2/vendor_group_marketplaces/{id} — single detail with skills
  • POST /v2/vendor_group_marketplaces/{id}/enable
  • POST /v2/vendor_group_marketplaces/{id}/disable
  • GET /v2/vendor_group_marketplaces/{id}/skills
  • POST /v2/vendor_group_marketplaces/{id}/skills — body {"skills": ["vendor_catalog", "vendor_sales"]} (Vendor Central skills only)

Example Request

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

Example Response

{
    "status": "ok",
    "error": "",
    "data": [
        {
            "id": "05VM3456",
            "vendor_group_id": "05VG9012",
            "vendor_group_name": "Demo Vendor Group",
            "marketplace": "ATVPDKIKX0DER",
            "marketplace_name": "United States",
            "country_code": "US",
            "status": "active",
            "discovered_at": "2025-09-18 06:00:00",
            "last_scraped_at": "2025-09-18 06:10:00",
            "last_execution_started_at": "2025-09-18 06:10:00",
            "last_execution_status": "success"
        },
        ...
    ]
}
                

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 an Amazon account. The system will automatically select an appropriate Amazon 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 an Amazon account that has access to this merchant marketplace.

skills

Optional. An array of skills to perform during this execution. If omitted, every skill enabled on the merchant marketplace is run.

force

Optional (boolean). Run even if this merchant marketplace already completed successfully in the last 12 hours; without it, such a run is skipped as a duplicate.

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

Each result includes a result status and an items count. Use them together to tell an empty report apart from a missing one: result: "success" with items: 0 means the report ran and there was genuinely no data for the period (e.g. no charges that month), whereas result: "skipped" means the source wasn't available yet and the report will be retried — so it is not a confirmed zero. Other values are failure and access-denied.



Request Parameters
Parameter Description

page

Integer page number, in pages of 100

platform

Which platform's results to return: seller (default), vendor, or all. By default only Seller Central results are returned. Vendor Central results carry vendor_group_name / vendor_marketplace_name in place of the merchant fields.

Example Request

curl "https://api.cajari.com/v2/results?platform=all" \
    -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",
            "vendor_group_id": null,
            "vendor_group_name": null,
            "vendor_group_marketplace_id": null,
            "vendor_marketplace_name": null,
            "skill": "skill_voice_of_the_customer",
            "obtained_at": "2025-05-21 02:25:04",
            "result": "success",
            "format": "json",
            "items": 2437,
            "size": 1024149,
            "report_location": "\/v2\/reports\/05OZSIKH"
        },
        {
            "result_id": "05VNSALE",
            "execution_id": "05VNEXEC",
            "seller_central_account_id": "05SC1234",
            "email": "vendor@example.com",
            "merchant_marketplace_id": null,
            "customer_id": null,
            "customer_name": null,
            "merchant_id": null,
            "merchant_name": null,
            "marketplace_name": null,
            "vendor_group_id": "05VG9012",
            "vendor_group_name": "Demo Vendor Group",
            "vendor_group_marketplace_id": "05VM3456",
            "vendor_marketplace_name": "United States",
            "skill": "skill_vendor_sales",
            "obtained_at": "2025-05-21 06:10:00",
            "result": "success",
            "format": "json",
            "items": 128,
            "size": 20481,
            "report_location": "\/v2\/reports\/05VNSALE"
        },
        ...
    ]
}
                

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"
}