# Freight Calculate

CJ PLATFORM allow customer to freight Calculate.

# Description

  • request parameter
Name Data Type Description
storage required , string(30) Shipping warehouse,Optional range: USA or CHINA
zip required , string(30) Zip code
countryCode required , string(30) Country shortcode, example:US
products required , array Format

# products format

[
    {
        "storage": "CHINA",
        "zip": "12345",
        "countryCode": "US",
        "products": [
            {
                "quantity": 2,
                "variantId": "29345977696309"
            }
        ]
    }
]

response parameter

Name Data Type Description
logisticName string Logistics name
price string Price
discountPrice string Discount price
aging string Arrival days range

# Freight Calculate

POST api/logistic/freightCalculate

Name Data Type Description
storage required , string(30) Shipping warehouse,Optional range: USA or CHINA
zip required , string(30) Zip code
countryCode required , string(30) Country shortcode, example:US
products required , array Format

request parameter

[
    {
    "storage": "CHINA",
        "zip": "12345",
        "countryCode": "US",
        "products": [
            {
                "quantity": 2,
                "variantId": "29345977696309"
            }
        ]
    }
]

response parameter HTTP/1.1 200 ok

[
    {
    "result": true,
    "logisticinfo": "[{\"cast\":\"0\",\"logisticName\":\"China EMS\",\"price\":20.31,\"discountPrice\":20.31,\"discount\":0,\"remark\":\"\",\"aging\":\"5-15\"}]",
    "message": []
    }
]

# Freight Calculate products format

[
    {
        "storage": "CHINA",
        "zip": "12345",
        "countryCode": "US",
        "products": [
            {
                "quantity": 2,
                "variantId": "29345977696309"
            }
        ]
    }
]

# Logistics Freight

POST api/logistic/getLogisticsFreight

Name Data Type Description
sku required string product sku
logisticsName string Trial logistics name
logisticsId string Trial Logistics ID
countryCode required , string Trial arrival country
startCountryCode string Arrival country (and startCountryCodes pick one of two)
startCountryCodes array Arrival country List (and startCountryCode pick one of two)
platform string Trial calculation platform (and platforms pick one of two)
platforms array Trial calculation platform (and platform pick one of two)
areaCode string Trial arrival area
zip string Trial Destination Zip Code
useDefaultArea boolean Whether to use the default region to calculate shipping costs

request parameter

{
    "sku": "CJBHNSNS06642-black-34 yards",
    "areaCode": "",
    "countryCode": "US",
    "logisticsId": 0,
    "logisticsName": "",
    "platform": "shopify",
    "platforms": [],
    "startCountryCode": "",
    "startCountryCodes": ["CN"],
    "useDefaultArea": false,
    "zip": "97523"
}

response parameter

Name Data Type Description
postage Bigdecimal Postage USD
postageCNY Bigdecimal Postage rmb
logisticsName String Logistics name
arrivalTime String Delivery time
remark string User description
cast boolean Whether there is a record
startCountry string Sender country
remoteAmount Bigdecimal Remote fee
errorInfo string Error message
success string Whether the current logistics is available

# Logistics Freight format

 {
    "result": true,
    "message": "success",
    "data": [
        {
            "postage": 13.53,
            "logisticsName": "ePacket",
            "arrivalTime": "7-20",
            "remark": "Due to the cancellation of many international flights caused by the spreading coronavirus, ePacket will take 30 days to 50 days to successfully deliver parcels. Considering it using special line, CJPacket is affected relatively less and takes 10 to 20 days. Therefore, CJ recommends you to select CJP",
            "cast": false,
            "startCountry": "CN",
            "remoteAmount": 0,
            "errorInfo": "",
            "success": true
        },
        {
            "postage": 14.53,
            "logisticsName": "Pos Malaysia",
            "arrivalTime": "10-45",
            "remark": "",
            "cast": false,
            "startCountry": "CN",
            "remoteAmount": 0,
            "errorInfo": "",
            "success": true
        },
        {
            "postage": 15.23,
            "logisticsName": "CJPacket",
            "arrivalTime": "5-15",
            "remark": "",
            "cast": false,
            "startCountry": "CN",
            "remoteAmount": 0,
            "errorInfo": "",
            "success": true
        },
        {
            "postage": 22.74,
            "logisticsName": "DHL Official",
            "arrivalTime": "2-3",
            "remark": "",
            "cast": false,
            "startCountry": "CN",
            "remoteAmount": 0,
            "errorInfo": "",
            "success": true
        },
        {
            "postage": 12.97,
            "logisticsName": "Singpost",
            "arrivalTime": "7-20",
            "remark": null,
            "cast": false,
            "startCountry": "CN",
            "remoteAmount": 0,
            "errorInfo": "",
            "success": true
        },
        {
            "postage": 13.48,
            "logisticsName": "HKpost",
            "arrivalTime": "7-20",
            "remark": "Countries like The USA, UK, Canada, Australia, France, Germany, Brazil etc. might be untrackable when it dispatched from China custom, we will not refund or resend for this shipping method.",
            "cast": false,
            "startCountry": "CN",
            "remoteAmount": 0,
            "errorInfo": "",
            "success": true
        },
        {
            "postage": 16.00,
            "logisticsName": "Turkey Post",
            "arrivalTime": "7-25",
            "remark": "",
            "cast": false,
            "startCountry": "CN",
            "remoteAmount": 0,
            "errorInfo": "",
            "success": true
        },
        {
            "postage": 17.57,
            "logisticsName": "PostNL",
            "arrivalTime": "7-25",
            "remark": "",
            "cast": false,
            "startCountry": "CN",
            "remoteAmount": 0,
            "errorInfo": "",
            "success": true
        },
        {
            "postage": 14.39,
            "logisticsName": "Korea Post",
            "arrivalTime": "7-12",
            "remark": "",
            "cast": false,
            "startCountry": "CN",
            "remoteAmount": 0,
            "errorInfo": "",
            "success": true
        },
        {
            "postage": 20.03,
            "logisticsName": "CJ Liquid",
            "arrivalTime": "7-30",
            "remark": null,
            "cast": false,
            "startCountry": "CN",
            "remoteAmount": 0,
            "errorInfo": "",
            "success": true
        },
        {
            "postage": 14.14,
            "logisticsName": "YunExpress US Direct Economy Line",
            "arrivalTime": "7-15",
            "remark": "",
            "cast": false,
            "startCountry": "CN",
            "remoteAmount": 0,
            "errorInfo": "",
            "success": true
        },
        {
            "postage": 20.85,
            "logisticsName": "CJ Liquid Direct Line",
            "arrivalTime": "7-60",
            "remark": "",
            "cast": false,
            "startCountry": "CN",
            "remoteAmount": 0,
            "errorInfo": "",
            "success": true
        }
    ]
}