# Orders Synchronization Processing

This document introduces the three main processes for synchronizing orders to the CJ platform through the API:

  1. Platform Waybill Order Processing — CJ warehouses fulfill the order; you upload the shipping label (waybill) yourself.
  2. CJ Logistics Order Processing — CJ ships the order directly through its own logistics channels; no waybill upload is needed.
  3. Store Product Order Flow — place orders with your own store product identifiers (orderFlow=2, Create Order V3 only). It only changes how products are identified in step 1 "Create Order"; all later steps follow process 1 or 2 depending on your logistics mode (shopLogisticsType).

The interface paths in the sequence diagrams below omit the common prefix https://developers.cjdropshipping.com/api2.0/{version}/shopping or .../logistic; refer to the corresponding interface documentation for the exact version {version} and full URL.

# 1. Platform Waybill Order Processing

This process suits merchants who use CJ warehouses for fulfillment but upload the shipping label (waybill) themselves. You need to set shopLogisticsType to 1 or 3, together with a warehouse storageId; once you choose this mode, the warehouse only starts processing after it receives your uploaded waybill.

  1. Query Inventory by Product ID

    Docs: Query Inventory by Product ID

  2. Query Warehouse Information

    Docs: Query Warehouse Information

  3. Create Order

    Docs: Create Order V2 or Create Order V3

    Tips:

    1. New parameters: shopLogisticsType and storageId
    2. Both the logistics type and the storage ID are required (the storage ID cannot be changed once specified)
  4. Add Orders to Cart

    Docs: Add Orders to Cart

    Tip: Adds multiple orders to the cart in a single call.

  5. Confirm Add Cart

    Docs: Confirm Add Cart

  6. Generate Parent Order and Obtain Payment ID

    Docs: Generate Parent Order and Obtain Payment ID

  7. Payment

    Docs: Payment

    Tip: You can also make bulk payments through the MyCJ website.

  8. Upload Waybill and Shipping Information

    Docs: Upload Waybill and Shipping Information

    Tip: Can only be called after the payment is completed.

  9. Update Waybill and Shipping Information (optional)

    Docs: Update Waybill and Shipping Information

    Tip: Can only be called while the order status is UNSHIPPED.

# 1.1 Sequence Diagram

sequenceDiagram
    participant Merchant as Merchant System (Caller)
    participant CJ as CJ Open API

    Merchant->>CJ: Query Inventory by Product ID (GET /product/stock/getInventoryByPid)
    CJ-->>Merchant: Inventory information

    Merchant->>CJ: Query Warehouse Information (GET /warehouse/detail)
    CJ-->>Merchant: Warehouse information

    Merchant->>CJ: Create Order (POST /order/createOrderV2 or /order/createOrderV3<br/>shopLogisticsType=1 or 3, storageId=chosen warehouse)
    CJ-->>Merchant: Order number and order status

    Merchant->>CJ: Add Orders to Cart (POST /order/addCart)
    CJ-->>Merchant: Add-to-cart result

    Merchant->>CJ: Confirm Add Cart (POST /order/addCartConfirm)
    CJ-->>Merchant: Confirmation result

    Merchant->>CJ: Generate Parent Order and Obtain Payment ID (POST /order/saveGenerateParentOrder)
    CJ-->>Merchant: Parent order number, payable amount, payment ID

    Merchant->>CJ: Payment (POST /pay/payBalanceV2) or bulk payment via MyCJ website
    CJ-->>Merchant: Payment result

    Note over Merchant,CJ: The warehouse only starts processing after receiving the waybill — upload it promptly after payment

    Merchant->>CJ: Upload Waybill and Shipping Information (POST /order/uploadWaybillInfo)
    CJ-->>Merchant: Upload result

    opt Order status is UNSHIPPED
        Merchant->>CJ: Update Waybill and Shipping Information (POST /order/updateWaybillInfo)
        CJ-->>Merchant: Update result
    end

# 2. CJ Logistics Order Processing

This process suits merchants who ship directly through CJ's own logistics channels without uploading a waybill themselves — the key difference from process 1 is that no waybill upload is needed. Set shopLogisticsType to 2, leave storageId empty, and specify a logistics method via logisticName; once payment is complete, CJ arranges shipment on its own.

  1. Create Order

    Docs: Create Order V2 or Create Order V3

    Tips:

    1. Set shopLogisticsType to 2 and leave storageId empty
    2. A logistics method is required, parameter: logisticName
  2. Add Orders to Cart

    Docs: Add Orders to Cart

    Tip: Adds multiple orders to the cart in a single call.

  3. Confirm Add Cart

    Docs: Confirm Add Cart

  4. Generate Parent Order and Obtain Payment ID

    Docs: Generate Parent Order and Obtain Payment ID

  5. Payment

    Docs: Payment

    Tip: You can also make bulk payments through the MyCJ website.

  6. Waiting for CJ delivery

  7. Obtain Order Details

    Docs: Obtain Order Details

    Tip: Check orderStatus in the response to see whether CJ has shipped the order.

  8. Query Logistics Track

    Docs: Query Logistics Track

# 2.1 Sequence Diagram

sequenceDiagram
    participant Merchant as Merchant System (Caller)
    participant CJ as CJ Open API

    Merchant->>CJ: Create Order (POST /order/createOrderV2 or /order/createOrderV3<br/>shopLogisticsType=2, storageId empty, logisticName specified)
    CJ-->>Merchant: Order number and order status

    Merchant->>CJ: Add Orders to Cart (POST /order/addCart)
    CJ-->>Merchant: Add-to-cart result

    Merchant->>CJ: Confirm Add Cart (POST /order/addCartConfirm)
    CJ-->>Merchant: Confirmation result

    Merchant->>CJ: Generate Parent Order and Obtain Payment ID (POST /order/saveGenerateParentOrder)
    CJ-->>Merchant: Parent order number, payable amount, payment ID

    Merchant->>CJ: Payment (POST /pay/payBalanceV2) or bulk payment via MyCJ website
    CJ-->>Merchant: Payment result

    Note over CJ: Waiting for CJ delivery

    Merchant->>CJ: Obtain Order Details (GET /order/getOrderDetail)
    CJ-->>Merchant: Order details

    Merchant->>CJ: Query Logistics Track (GET /logistic/trackInfo)
    CJ-->>Merchant: Logistics track

# 3. Store Product Order Flow

# 3.1 Overview and Use Cases

CJ's Create Order V3 interface supports two ways of identifying products, distinguished by the orderFlow parameter:

orderFlow Name Use case
1 (default) CJ Product Order Flow You must provide a CJ variant ID (vid) or CJ SKU; product information comes entirely from the CJ product catalog
2 Store Product Order Flow You can pass your own store's product/variant identifiers (store SKU, store product ID) directly, without knowing the corresponding CJ variant ID in advance

If your store product has not yet been linked to a CJ product, Store Product Order Flow can significantly simplify integration: you don't need to complete the link before placing the order — the order can still be submitted — but you still need to go to the My CJ - Unconnected (opens new window) page afterward to complete the connection manually.

After an order is created, where it appears depends on whether the product is linked to a CJ product:

# 3.2 How to Use Store Product Order Flow

  1. You must use the Create Order V3 interface (not V2) when placing a store product order, and set orderFlow to 2;
  2. Product information is provided via the products array:
    • products.vid: your store product/variant identifier (required in this flow; sku is generally not used here — see section 3.3)
    • products.storeProductId: your store product ID (required in this flow)
    • products.storeProductImg: your store product image (required in this flow)
  3. If the product has not yet been linked to a CJ product, go to the My CJ - Unconnected (opens new window) page, find the unlinked product, and complete the connection; you can also save the product and complete the connection via API in advance — see section 3.7.

If your account has been enabled for "Store Product Order Flow" at the account level by CJ, orders will follow this flow even without passing orderFlow. Please contact your CJ business contact to confirm your account's configuration.

# 3.3 Interface Parameters

Key parameters from Create Order V3 (POST):

Parameter Type Required Description
orderFlow int No, default 1 Order flow type. 1=CJ Product Order Flow (create order using CJ variants, default); 2=Store Product Order Flow (supports creating orders using store SKUs)
products[].vid string No (required for Store Product Order Flow) A CJ variant ID under CJ Product Order Flow; your store product/variant identifier under Store Product Order Flow. vid/sku cannot both be empty
products[].sku string No CJ variant SKU; used to look up the variant when vid is missing (generally not used under Store Product Order Flow)
products[].storeProductId String No (required for Store Product Order Flow) Your store-side product ID, saved to the store product record
products[].storeProductImg String No (required for Store Product Order Flow) Your store-side product image, saved to the store product record

# 3.4 Complete Business Process

Store Product Order Flow only changes how products are identified in step 1 "Create Order"; the remaining steps are identical to processes 1 and 2:

  1. Create Order

    Docs: Create Order V3

    Tips:

    1. You must use the Create Order V3 interface; V2 is not supported for this flow
    2. Set orderFlow to 2
    3. In products, provide all three fields together: vid (your store product/variant identifier), storeProductId (your store product ID), storeProductImg (your store product image)
    4. If the product is already linked to a CJ product, the order appears under Imported → Orders (opens new window) after creation and can be processed normally
    5. If the product has not yet been linked to a CJ product, the system will automatically create a store product record so the order can still be submitted, but it will not automatically create the link to a CJ product; the order appears under Imported → Invalid Orders (opens new window) after creation, and you must complete the connection at My CJ - Unconnected (opens new window) before it can be processed normally
    6. If your account has been enabled for "Store Product Order Flow" at the account level by CJ, orders will follow this flow even without passing orderFlow. Please contact your CJ business contact to confirm your account's configuration
  2. For the remaining steps — Add Orders to Cart, Confirm Add Cart, Generate Parent Order and Obtain Payment ID, Payment, Upload/Update Waybill and Shipping Information, Obtain Order Details, and Query Logistics Track — follow process 1 (Platform Waybill Order Processing) or process 2 (CJ Logistics Order Processing) above, depending on which logistics mode (shopLogisticsType) you choose.

# 3.5 Comparison with CJ Product Order Flow

Dimension Store Product Order Flow (orderFlow=2) CJ Product Order Flow (orderFlow=1, default)
Product information required to place an order Your own store product/variant identifiers (store SKU, store product ID); no need to know the CJ variant ID in advance You must provide a valid CJ variant ID (vid) or CJ SKU
Handling when not linked to a CJ product The system automatically creates a store product record so the order can still proceed, but does not automatically create the CJ link; the order appears under Imported → Invalid Orders (opens new window) The product must already be a valid CJ variant, otherwise the order cannot be placed
Follow-up maintenance You need to go to the My CJ - Unconnected (opens new window) page, find the unlinked product, and complete the connection yourself No additional maintenance needed — it is already a CJ product
Suitable for Merchants who want to integrate directly with their own store's product system and simplify upfront product linking Merchants who have already fully maintained the CJ product/variant mapping

# 3.6 Sequence Diagram

sequenceDiagram
    participant Merchant as Merchant System (Caller)
    participant CJ as CJ Open API

    Merchant->>CJ: Create Order V3 (POST /order/createOrderV3, orderFlow=2<br/>products.vid + storeProductId + storeProductImg)
    alt Store product already linked to a CJ product
        CJ-->>CJ: Match the corresponding CJ product directly
        CJ-->>Merchant: Order appears under Imported → Orders
    else Store product not yet linked to a CJ product
        CJ-->>CJ: Automatically create a store product record (does not create the CJ link), the order can still be completed
        CJ-->>Merchant: Order appears under Imported → Invalid Orders
        Note over Merchant,CJ: The merchant must go to the My CJ → Unconnected page<br/>to find the product and complete the connection manually (the API does not proactively notify)
    end
    CJ-->>Merchant: Order number and order status

    Merchant->>CJ: Add Orders to Cart (POST /order/addCart)
    CJ-->>Merchant: Add-to-cart result

    Merchant->>CJ: Confirm Add Cart (POST /order/addCartConfirm)
    CJ-->>Merchant: Confirmation result

    Merchant->>CJ: Generate Parent Order and Obtain Payment ID (POST /order/saveGenerateParentOrder)
    CJ-->>Merchant: Parent order number, payable amount, payment ID

    Merchant->>CJ: Payment (POST /pay/payBalanceV2) or bulk payment via MyCJ website
    CJ-->>Merchant: Payment result

    opt Platform logistics mode (shopLogisticsType=1 or 3)
        Merchant->>CJ: Upload Waybill Info (POST /order/uploadWaybillInfo) / Update Waybill Info (POST /order/updateWaybillInfo)
        CJ-->>Merchant: Waybill processing result
    end

    Merchant->>CJ: Obtain Order Details (GET /order/getOrderDetail)
    CJ-->>Merchant: Order details

    Merchant->>CJ: Query Logistics Track (GET /logistic/trackInfo)
    CJ-->>Merchant: Logistics track

# 3.7 Proactively Maintain Store Products and Connections (Optional)

If you want to sync your store products to CJ and establish the connection to a CJ product before placing an order — avoiding orders landing in Imported → Invalid Orders (opens new window) and needing to be fixed afterward on the Unconnected page — you can call the following interfaces, which have the same effect as doing it manually in My CJ:

  1. Save Product

    Docs: Save Product (POST)

    Tip: Saves your store product information to CJ's system in advance.

  2. Save Variant Batch

    Docs: Save Variant Batch (POST)

    Tip: Saves your store product's variant information to CJ's system in batch.

  3. Create Product Connection

    Docs: Create Product Connection (POST)

    Tip: Links a store product (and its variants) to a CJ product (and its variants) — same effect as manually connecting them on the My CJ - Unconnected (opens new window) page.

  4. Disconnect Product Connection

    Docs: Disconnect Product Connection (DELETE)

    Tip: Removes an existing connection by store product ID (and optionally variant ID).