API - Shipment Rate

Created by KloudShip Support, Modified on Fri, 24 Oct at 7:39 PM by KloudShip Support

POST: ShipmentRate

  • This document provides information about the `POST /api/v1/ShipmentRate` endpoint, which allows you to get shipment rate estimates for a given shipment request.
  • This API retrieves available shipping rates for the given shipment details including source, destination, package dimensions, and weight.
    It helps determine shipping costs and available carrier services before creating a shipment.


Endpoint details

MethodPOST
Production Environment URLhttps://api.kloudship.com/api/v1/ShipmentRate
Test Environment URLhttps://api-ppd.kloudship.com:960/api/v1/ShipmentRate
Content-Typeapplication/json


Request body:

FieldTypeRequiredDescription
addressFromobjectYesSender's address details
addressToobjectYesReceiver's address details
locationIdstringNo
The warehouse or origin location ID
packagesarrayYesList of package details (dimensions, weight, etc.)
itemsarrayYesList of shipment items with product and tax details
specialServicesarrayNoOptional special services such as insurance, COD and OTP required
isTestbooleanNoIndicates whether the request is for test mode (true or false)


Address Object Structure:

FieldTypeRequiredDescription
firstnamestringYesContact first name
lastnamestringNo
Contact last name
companystringNoCompany name
street1stringYesPrimary street address
street2, street3stringNoAdditional address lines
citystringYesCity name
stateCodestringYesTwo-letter state code (e.g., MH, UP)
zipstringYesPostal code
countryCodestringNoCountry code (IN for India)
phonestringYesContact number 
emailstringNo
Contact email
savebooleanNoWhether to save address
verifybooleanNoWhether to verify address
isResidentialbooleanNoWhether the address is residential
latitudenumberNoGeographical latitude
longitudenumberNoGeographical longitude


Package Object Structure:

FieldTypeRequiredDescription
namestringNo
Package name or description
lengthnumberYesLength of the package
widthnumberYesWidth of the package
heightnumberYesHeight of the package
dimensionUnitstringNoDimension unit (cm, in)
weightnumberYesPackage weight
weightUnitstringNoWeight unit (kg, g, lb)


Item Object Structure:

FieldTypeRequiredDescription
productIdstringYes
Unique product identifier
productNamestringYesProduct name
namestringYesItem name
weightnumberYesItem weight
weightUnitstringNoWeight unit (g, kg)
totalValuenumberYesTotal item value (including tax)
valuenumberNoItem base value
taxInfosarrayNoTax details applied to the item


Tax Info Object:

FieldTypeDescription
codestringTax type (e.g., IGST, SGST)
valuestringTax value amount


Example:

{
    "addressFrom": {
        "firstname": "Nisha",
        "lastname": "Thuwal",
        "company": "Bharti Creations",
        "street1": "Bharti Creations, Gaon Bhag",
        "street2": "",
        "street3": "",
        "city": "Sangli",
        "stateCode": "MH",
        "zip": "416416",
        "countryCode": "IN",
        "phone": "9999999999",
        "email": "aackl@abc.com",
        "save": false,
        "verify": false,
        "isResidential": false,
        "latitude": 16.8597981,
        "longitude": 74.5635889
    },
    "locationId": "6784fed7326a0ee24be9f4f7",
    // "carrierAccountId": "",
    // "service": "Surface",
    "addressTo": {
        "firstname": "ABC",
        "lastname": "xyz",
        "company": "Impledge Technologies",
        "street1": "5TH FLOOR, REGUS, TOWER C",
        "street2": "Green Boulevard, B-BLOCK",
        "street3": "",
        "city": "Gautam Buddha Nagar",
        "stateCode": "UP",
        "zip": "201309",
        "countryCode": "IN",
        "phone": "9999999999",
        "email": "xyz@gmail.com",
        "save": false,
        "verify": true,
        "isResidential": false,
        "latitude": 28.6228797,
        "longitude": 77.3672554
    },
    "packages": [
        {
            "name": "Watch Box",
            "length": 10.0,
            "width": 10.0,
            "height": 5.0,
            "dimensionUnit": "cm",
            "weight": 1.64,
            "weightUnit": "kg"
        }
    ],
    "items": [
        {
            "productId": "58712aebe8f048ec902bcc6c2d06426c",
            "productName": "Used Watch",
            "name": "Used Watch",
            "weight": 1000.0,
            "weightUnit": "g",
            "totalValue": 599.0,
            "value": 500.0,
            "taxInfos": [
                {
                    "code": "IGST",
                    "value": "99"
                }
            ]
        }
    ],
    "specialServices": [
        // {
        //     "code": "Insure",
        //     "parameters": [
        //         {
        //             "code": "Amount",
        //             "value": "50"
        //         }
        //     ]
        // }
    ],
    "isTest": false
}

cURL:

curl --location 'https://api-ppd.kloudship.com:960/api/v1/ShipmentRate' \
--header 'transactionId: 10001' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer *****' \
--data-raw '{
    "addressFrom": {
        "firstname": "Nisha",
        "lastname": "Thuwal",
        "company": "Bharti Creations",
        "street1": "Bharti Creations, Gaon Bhag",
        "street2": "",
        "street3": "",
        "city": "Sangli",
        "stateCode": "MH",
        "zip": "416416",
        "countryCode": "IN",
        "phone": "9999999999",
        "email": "aackl@abc.com",
        "save": false,
        "verify": false,
        "isResidential": false,
        "latitude": 16.8597981,
        "longitude": 74.5635889
    },
    "locationId": "6784fed7326a0ee24be9f4f7",
    "addressTo": {
        "firstname": "ABC",
        "lastname": "xyz",
        "company": "Impledge Technologies",
        "street1": "5TH FLOOR, REGUS, TOWER C",
        "street2": "Green Boulevard, B-BLOCK",
        "street3": "",
        "city": "Gautam Buddha Nagar",
        "stateCode": "UP",
        "zip": "201309",
        "countryCode": "IN",
        "phone": "9999999999",
        "email": "xyz@gmail.com",
        "save": false,
        "verify": true,
        "isResidential": false,
        "latitude": 28.6228797,
        "longitude": 77.3672554
    },
    "packages": [
        {
            "name": "Watch Box",
            "length": 10.0,
            "width": 10.0,
            "height": 5.0,
            "dimensionUnit": "cm",
            "weight": 1.64,
            "weightUnit": "kg"
        }
    ],
    "items": [
        {
            "productId": "58712aebe8f048ec902bcc6c2d06426c",
            "productName": "Used Watch",
            "name": "Used Watch",
            "weight": 1000.0,
            "weightUnit": "g",
            "totalValue": 599.0,
            "value": 500.0,
            "taxInfos": [
                {
                    "code": "IGST",
                    "value": "99"
                }
            ]
        }
    ],
    "specialServices": [
       
    ],
    "isTest": false
}'


Response example:

{
    "rates": [
        {
            "valueCurrency": "INR",
            "totalFee": 110.33000,
            "finalWeight": 1.640,
            "finalVolume": 500.000,
            "fee": [
                {
                    "packageNumber": 1,
                    "cost": 76.500,
                    "costType": "Base"
                },
                {
                    "packageNumber": 1,
                    "cost": 17.0,
                    "costType": "Surcharge"
                },
                {
                    "packageNumber": 1,
                    "cost": 16.83000,
                    "costType": "Tax"
                }
            ],
            "finalWeightUnit": "kg",
            "finalDimensionUnit": "cm",
            "carrierAccountId": "670ca084323de7c806a1e652",
            "carrier": "Delhivery",
            "carrierAccountName": "Delhivery",
            "category": "Native",
            "service": "Surface",
            "specialServices": []
        },
        {
            "valueCurrency": "INR",
            "totalFee": 110.33000,
            "finalWeight": 1.640,
            "finalVolume": 500.000,
            "fee": [
                {
                    "packageNumber": 1,
                    "cost": 76.500,
                    "costType": "Base"
                },
                {
                    "packageNumber": 1,
                    "cost": 17.0,
                    "costType": "Surcharge"
                },
                {
                    "packageNumber": 1,
                    "cost": 16.83000,
                    "costType": "Tax"
                }
            ],
            "finalWeightUnit": "kg",
            "finalDimensionUnit": "cm",
            "carrierAccountId": "670ca084323de7c806a1e652",
            "carrier": "Delhivery",
            "carrierAccountName": "Delhivery",
            "category": "Native",
            "service": "Express",
            "specialServices": []
        },
        {
            "valueCurrency": "INR",
            "totalFee": 125.90600,
            "finalWeight": 1.64,
            "finalVolume": 500.000,
            "deliveryDays": 2,
            "deliveryDate": "2025-10-15T16:19:28.5508071Z",
            "fee": [
                {
                    "packageNumber": 1,
                    "cost": 106.700,
                    "costType": "Base"
                },
                {
                    "packageNumber": 1,
                    "cost": 19.20600,
                    "costType": "Tax"
                }
            ],
            "finalWeightUnit": "kg",
            "finalDimensionUnit": "cm",
            "carrierAccountId": "670ca085323de7c806a1e654",
            "carrier": "XpressBees",
            "carrierAccountName": "XpressBees",
            "category": "Native",
            "service": "Surface",
            "specialServices": []
        },
        {
            "valueCurrency": "INR",
            "totalFee": 61.49000,
            "finalWeight": 2.0,
            "finalVolume": 500.000,
            "deliveryDays": 0,
            "deliveryDate": "2025-10-13T18:00:00Z",
            "categories": [
                "Cheapest"
            ],
            "fee": [
                {
                    "packageNumber": 1,
                    "cost": 60.500,
                    "costType": "Base"
                },
                {
                    "packageNumber": 1,
                    "cost": 0.99000,
                    "costType": "Tax"
                }
            ],
            "finalWeightUnit": "kg",
            "finalDimensionUnit": "cm",
            "carrierAccountId": "670ca085323de7c806a1e655",
            "carrier": "Borzo",
            "carrierAccountName": "Borzo",
            "category": "Native",
            "service": "Surface",
            "specialServices": []
        },
        {
            "valueCurrency": "INR",
            "totalFee": 110.33000,
            "finalWeight": 1.64,
            "finalVolume": 500.000,
            "deliveryDays": 4,
            "deliveryDate": "2025-10-17T16:19:28.7893392Z",
            "fee": [
                {
                    "packageNumber": 1,
                    "cost": 76.500,
                    "costType": "Base"
                },
                {
                    "packageNumber": 1,
                    "cost": 17.0,
                    "costType": "Surcharge"
                },
                {
                    "packageNumber": 1,
                    "cost": 16.83000,
                    "costType": "Tax"
                }
            ],
            "finalWeightUnit": "kg",
            "finalDimensionUnit": "cm",
            "carrierAccountId": "6778182c3c1cd7574c4e8768",
            "carrier": "Ekart",
            "carrierAccountName": "Ekart",
            "category": "Native",
            "service": "Surface",
            "specialServices": []
        },
        {
            "valueCurrency": "INR",
            "totalFee": 116.82000,
            "finalWeight": 1.64,
            "finalVolume": 500.000,
            "deliveryDays": 4,
            "deliveryDate": "2025-10-17T16:19:30.649677Z",
            "fee": [
                {
                    "packageNumber": 1,
                    "cost": 99.000,
                    "costType": "Base"
                },
                {
                    "packageNumber": 1,
                    "cost": 17.82000,
                    "costType": "Tax"
                }
            ],
            "finalWeightUnit": "kg",
            "finalDimensionUnit": "cm",
            "carrierAccountId": "6880a6f0e32e19eea1a57b15",
            "carrier": "EkartElite",
            "carrierAccountName": "Ekart Elite",
            "category": "Native",
            "service": "Surface",
            "specialServices": []
        },
        {
            "valueCurrency": "INR",
            "totalFee": 95.65608,
            "finalWeight": 1.64,
            "finalVolume": 9052.560,
            "deliveryDays": 0,
            "deliveryDate": "2025-10-13T18:19:28.9931449Z",
            "categories": [
                "Fastest"
            ],
            "fee": [
                {
                    "packageNumber": 1,
                    "cost": 94.116,
                    "costType": "Base"
                },
                {
                    "packageNumber": 1,
                    "cost": 1.54008,
                    "costType": "Tax"
                }
            ],
            "finalWeightUnit": "kg",
            "finalDimensionUnit": "cm",
            "carrierAccountId": "68e02252392381e9215a83a3",
            "carrier": "Porter",
            "carrierAccountName": "Porter",
            "category": "Native",
            "service": "Surface",
            "specialServices": []
        }
    ],
    "errors": [],
    "warnings": [
        {
            "module": "ShipmentRate",
            "message": "Origin pin not serviceable.",
            "source": "KloudShip.CSA.Delhivery",
            "carrierCode": "Delhivery"
        },
        {
            "module": "ShipmentRate",
            "message": "Origin pin not serviceable.",
            "source": "KloudShip.CSA.Delhivery",
            "carrierCode": "Delhivery"
        }
    ]
}


Response object structure:

Root Level

FieldTypeDescription
ratesarrayList of available carrier rate details
errorsarrayList of errors (if any occurred)
warningsarrayList of warnings such as non-serviceable routes

Rate Object

FieldTypeDescription
valueCurrencystringCurrency code (e.g., INR)
totalFeenumberTotal shipping cost (sum of base, surcharge, tax, etc.)
finalWeightnumberFinal weight considered for rate calculation
finalVolumenumberVolume of package in cubic centimeters
feearrayDetailed cost breakdown
finalWeightUnitstringUnit of weight (e.g., kg)
finalDimensionUnitstringUnit of dimensions (e.g., cm)
carrierAccountIdstringUnique ID of the carrier account
carrierstringCarrier name (e.g., Delhivery, Ekart, Borzo)
carrierAccountNamestringDisplay name of the carrier account
categorystringType of integration (e.g., Native)
servicestringCarrier service type (e.g., Surface, Express)
deliveryDaysnumberEstimated delivery days (optional)
deliveryDatestringEstimated delivery date and time (ISO format)
categoriesarrayAdditional classification (e.g., Cheapest, Fastest)
specialServicesarrayApplied optional services, if any

Fee Object

FieldTypeDescription
packageNumbernumberPackage index number
costnumberCost amount
costTypestringType of charge (Base, Surcharge, Tax)

Warnings Object

FieldTypeDescription
modulestringModule where warning occurred
messagestringWarning message
sourcestringSource module or component
carrierCodestringCarrier associated with the warning

Example Use Cases

  • To compare rates from different carriers for a given route.
  • To select the cheapest or fastest carrier before creating a shipment.
  • To verify carrier serviceability between the source and destination.

Notes

  • When the origin or destination PIN is not serviceable by a carrier, the response includes a warning under the warnings array.
  • The API may return multiple rate options for the same carrier (e.g., Surface, Express).
  • categories like Cheapest and Fastest are provided for quick decision-making.


Not Yet Signed Up?

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article