Skip to main content

Get Rates API

Calculate shipping rates for forward or return shipments based on origin, destination, weight, and dimensions.

Method: POST Endpoint: /custom/api/v1/rates

Request Fields

FieldTypeRequiredDescriptionExample
journey_typestringYesforward or returnforward
origin_pincodestringYes6-digit pickup pincode248001
destination_pincodestringYes6-digit delivery pincode560035
dead_weightfloatYesWeight in grams (> 0)500
lengthfloatYesLength in cm (> 0)10
widthfloatYesWidth in cm (> 0)10
heightfloatYesHeight in cm (> 0)10
payment_methodstringConditionalRequired for forward: cod or prepaidcod
shipment_valuefloatConditionalRequired if payment_method = cod (> 0)1200
qc_applicablebooleanConditionalApplicable for return. Default: truefalse

Validation Rules

  1. Journey Type: Must be either forward or return
  2. Forward Shipments: payment_method is mandatory. If cod, then shipment_value must be provided
  3. Return Shipments: qc_applicable defaults to true if not provided
  4. Weight & Dimensions: All must be greater than 0
  5. Pincode Validation: Must be valid Indian pincodes

Sample Requests

Forward Shipment - Prepaid

curl -X POST "https://shazam.velocity.in/custom/api/v1/rates" \
-H "Authorization: Bearer your_access_token" \
-H "Content-Type: application/json" \
-d '{
"journey_type": "forward",
"origin_pincode": "400001",
"destination_pincode": "110001",
"dead_weight": 500,
"length": 20,
"width": 15,
"height": 10,
"payment_method": "prepaid"
}'

Forward Shipment - COD

curl -X POST "https://shazam.velocity.in/custom/api/v1/rates" \
-H "Authorization: Bearer your_access_token" \
-H "Content-Type: application/json" \
-d '{
"journey_type": "forward",
"origin_pincode": "400001",
"destination_pincode": "110001",
"dead_weight": 750,
"length": 25,
"width": 20,
"height": 15,
"payment_method": "cod",
"shipment_value": 2500
}'

Return Shipment

curl -X POST "https://shazam.velocity.in/custom/api/v1/rates" \
-H "Authorization: Bearer your_access_token" \
-H "Content-Type: application/json" \
-d '{
"journey_type": "return",
"origin_pincode": "110001",
"destination_pincode": "400001",
"dead_weight": 500,
"length": 20,
"width": 15,
"height": 10,
"qc_applicable": true
}'

Success Response - Forward Shipment

{
"status": "SUCCESS",
"result": {
"serviceable_couriers": [
{
"carrier_id": "carrier-unique-id",
"carrier_name": "Delhivery",
"carrier_code": "DELHIVERY",
"service_level": "standard",
"is_fast": false,
"is_prime": false,
"status": "active",
"expected_delivery": {
"pickup": "2024-01-16",
"delivery": "2024-01-19"
},
"charges": {
"forward_freight_charges": 85.00,
"cod_charges": 25.00,
"rto_charges": 85.00,
"total_forward_charges": 110.00
},
"platform_fee": 5.00
}
],
"shipment_details": {
"journey_type": "forward",
"origin_pincode": "400001",
"destination_pincode": "110001",
"payment_method": "cod",
"dead_weight": 750.0,
"volumetric_weight": 1500.0,
"applicable_weight": 1500.0,
"zone": "B"
}
}
}

Success Response - Return Shipment

{
"status": "SUCCESS",
"result": {
"serviceable_couriers": [
{
"carrier_id": "carrier-unique-id",
"carrier_name": "Delhivery",
"carrier_code": "DELHIVERY",
"service_level": "standard",
"status": "active",
"expected_delivery": {
"pickup": "2024-01-16",
"delivery": "2024-01-19"
},
"charges": {
"return_freight_charges": 75.00,
"qc_charges": 10.00,
"total_return_charges": 85.00
}
}
],
"shipment_details": {
"journey_type": "return",
"origin_pincode": "110001",
"destination_pincode": "400001",
"dead_weight": 500.0,
"volumetric_weight": 600.0,
"applicable_weight": 600.0,
"zone": "B"
}
}
}