# 05-Logistics

# 1 Logistics

# 1.1 Freight Calculation (POST) (login not required)

Freight calculation. Bulk purchase products will have designated shipping methods, while dropshipping products will usually have more options.

# URL

https://developers.cjdropshipping.com/api2.0/v1/logistic/freightCalculate

# CURL

curl --location --request POST 'https://developers.cjdropshipping.com/api2.0/v1/logistic/freightCalculate' \
                --header 'Content-Type: application/json' \
                --data-raw '{
                    "startCountryCode": "US",
                    "endCountryCode": "US",
                    "products": [
                        {
                            "quantity": 2,
                            "vid": "439FC05B-1311-4349-87FA-1E1EF942C418"
                        }
                    ]
                }'
Parameter Definition Type Required Length Note
startCountryCode Country of origin string yes 200
endCountryCode Country of destination string yes 200
quantity Quantity int Yes 10
vid Variant id string Yes 200

# Return

success

{
    "code": 200,
    "result": true,
    "message": "Success",
    "data": [
        {
            "logisticAging": "2-5",
            "logisticPrice": 4.71,
            "logisticPriceCn": 30.54,
            "logisticName": "USPS+"
        }
    ],
    "requestId": "0242ad78-eea2-481d-876a-7cf64398f07f"
}
Field Definition Type Length Note
logisticPrice Shipping cost in USD BigDecimal (18,2) Unit: $ (USD)
logisticPriceCn Shipping cost in CNY BigDecimal (18,2) Unit: ¥ (CNY)
logisticAging Shipping time string 20
logisticName Carrier name string 20

error

{
    "code": 1600100, 
    "result": false,
    "message": "Param error",
    "data": null,
    "requestId": "323fda9d-3c94-41dc-a944-5cc1b8baf5b1"
}
Field Definition Type Length Note
code error code int 20 Reference error code
result Whether or not the return is normal boolean 1
message return message string 200
data return data object interface data return
requestId requestId string 48 Flag request for logging errors

# 2 Tracking Number

# 2.1 Tracking Number (GET) (login not required)

Shipping information can be found upon tracking numbers. You can also visit CJ Logistic Platform (opens new window)

# URL

https://developers.cjdropshipping.com/api2.0/v1/logistic/getTrackInfo?trackNumber=CJPKL7160102171YQ

# CURL

curl --location --request GET 'https://developers.cjdropshipping.com/api2.0/v1/logistic/getTrackInfo?trackNumber=CJPKL7160102171YQ
                                                                                                    &trackNumber=CJPKL7160102171YQ
                                                                                                    &trackNumber=CJPKL7160102171YQ
                                                                                                    &trackNumber=CJPKL7160102171YQ
Parameter Definition Type Required Length Note
trackNumber trackNumber string Yes 200 batch query

# Return

success

{
    "code": 200,
    "result": true,
    "message": "Success",
    "data": [
        {
            "trackingNumber": "CJPKL7160102171YQ",
            "logisticName": "CJPacket Sensitive",
            "trackingFrom": "CN",
            "trackingTo": "US",
            "deliveryDay": "13",
            "deliveryTime": "2021-06-17 07:04:04",
            "trackingStatus": "In transit"
        }
    ],
    "requestId": "3426e927-8c50-4687-9ced-623e77d55bd0"
}
Field Definition Type Length Note
trackingNumber tracking number string 200
trackingFrom from string 20
trackingTo to string 20
deliveryDay Delivery day string 200
deliveryTime Delivery time string 200
trackingStatus tracking status string 200

error

{
    "code": 1600100,
    "result": false,
    "message": "Param error",
    "data": null,
    "requestId": "323fda9d-3c94-41dc-a944-5cc1b8baf5b1" 
}
Field Definition Type Length Note
code error code int 20 Reference error code
result Whether or not the return is normal boolean 1
message return message string 200
data return data object interface data return
requestId requestId string 48 Flag request for logging errors