agentleFS
simoncai519simoncai519/open-accio-skill/skills/cj-dropshipping-api/SKILL.md

cj-dropshipping-api

Skill8 starsChanged 8 months agoMITView on GitHub

Use when user wants to integrate CJ Dropshipping, search products, create orders, track shipments, manage Shopify listings via CJ, or automate CJ logistics and webhook setups. Triggered for CJ API related tasks like product queries, order creation, shipping calculations, delivery profile management, and webhook configuration.

  • Sends data out

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 4 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Search or list CJ products

    line 16
  2. Distinctive:

    Add products to "My Products"

    line 18
  3. Distinctive:

    Create or query delivery profiles

    line 20
  4. Distinctive:

    Create orders, pay for them, or track shipments

    line 21
  5. Very specific:

    All REST calls require the CJ-Access-Token header obtained from accio-mcp-cli call get_cj_access_token.

    line 25

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

CJ Dropshipping API Skill

Overview

This skill provides concise guidance for interacting with the CJ Dropshipping API (v2.0). It covers authentication, product management, order processing, logistics, delivery profiles, shop management, and webhook configuration. Use the skill when a user asks to:

  • Obtain an OAuth token via accio-mcp-cli
  • Search or list CJ products
  • Retrieve product details, variants, or stock
  • Add products to "My Products"
  • List or batch‑list products to a Shopify store
  • Create or query delivery profiles
  • Create orders, pay for them, or track shipments
  • Configure or manage CJ webhooks
  • Query shop information (shops, locations, countries)

All REST calls require the CJ-Access-Token header obtained from accio-mcp-cli call get_cj_access_token.

Core Workflow Summary

  1. Authenticate – Run the two accio-mcp-cli commands to obtain the access token.
  2. Make REST Calls – Use curl (or any HTTP client) with the token in the header.
  3. Handle Pagination – Most list endpoints accept page and size query parameters.
  4. Error Handling – Check the code field; retry on 500 or respect rate‑limit headers.
  5. Webhooks – Set up callbacks once; store URLs securely.

Usage Examples

# 1️⃣ Obtain OAuth token (once)
accio-mcp-cli call start_cj_auth          # opens browser for user consent
accio-mcp-cli call get_cj_access_token    # prints JSON with accessToken

# Store the token in an env var for convenience
export CJ_TOKEN=$(accio-mcp-cli call get_cj_access_token --raw | jq -r .accessToken)

# 2️⃣ Get product list (search)
curl -s "https://developers.cjdropshipping.com/api2.0/v1/product/listV2?keyWord=phone&page=1&size=20" \
  -H "CJ-Access-Token: $CJ_TOKEN" | jq .

# 3️⃣ Get product detail by SKU
curl -s "https://developers.cjdropshipping.com/api2.0/v1/product/query?productSku=ABC123" \
  -H "CJ-Access-Token: $CJ_TOKEN" | jq .

# 4️⃣ Add a product to My Products
curl -X POST "https://developers.cjdropshipping.com/api2.0/v1/product/addToMyProduct" \
  -H "Content-Type: application/json" \
  -H "CJ-Access-Token: $CJ_TOKEN" \
  -d '{"productId":"1234567890"}' | jq .

# 5️⃣ Create a Shopify delivery profile (required for listing)
curl -X POST "https://developers.cjdropshipping.com/api2.0/v1/product/listed/createDeliveryProfile" \
  -H "Content-Type: application/json" \
  -H "CJ-Access-Token: $CJ_TOKEN" \
  -d '{
        "shopId":"YOUR_SHOP_ID",
        "name":"CJ Dropshipping",
        "locationIds":["CJ_LOCATION_ID"],
        "zones":{"countries":[{"countryCode":"US","provinces":[{"provinceCode":"CA"}]}]}
      }' | jq .

# 6️⃣ Batch list products to Shopify (use deliveryProfileId from previous step)
curl -X POST "https://developers.cjdropshipping.com/api2.0/v1/product/listed/listedByPids" \
  -H "Content-Type: application/json" \
  -H "CJ-Access-Token: $CJ_TOKEN" \
  -d '{
        "shopIds":["YOUR_SHOP_ID"],
        "productIds":["123456","789012"],
        "formula":{ "formulaType":3, "shippingFrom":"CN", "shippingTo":"US", "isLogistics":1 },
        "templateShopCategoryVOList":[{"shopId":"YOUR_SHOP_ID","deliveryProfileId":"YOUR_PROFILE_ID"}]
      }' | jq .

# 7️⃣ Create an order (V2)
curl -X POST "https://developers.cjdropshipping.com/api2.0/v1/shopping/order/createOrderV2" \
  -H "Content-Type: application/json" \
  -H "CJ-Access-Token: $CJ_TOKEN" \
  -d '{
        "orderNumber":"ORDER123",
        "shippingCountryCode":"US",
        "shippingAddress":"123 Main St",
        "shippingCustomerName":"John Doe",
        "shippingPhone":"1234567890",
        "logisticName":"CJPacket Sensitive",
        "payType":"1",
        "products":[{"vid":"VID123","quantity":1}]
      }' | jq .

# 8️⃣ Track a shipment
curl -s "https://developers.cjdropshipping.com/api2.0/v1/logistic/trackInfo?trackNumber=TRACK123" \
  -H "CJ-Access-Token: $CJ_TOKEN" | jq .

# 9️⃣ Set up a webhook for order updates
curl -X POST "https://developers.cjdropshipping.com/api2.0/v1/webhook/set" \
  -H "Content-Type: application/json" \
  -H "CJ-Access-Token: $CJ_TOKEN" \
  -d '{
        "order":{"type":"ENABLE","callbackUrls":["https://yourdomain.com/cj/webhook/order"]}
      }' | jq .

Created by Simon Cai · More e-commerce skills: github.com/simoncai519/open-accio-skill

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.