Fetch Recommended Carriers: India [B2B]
Our recommendation API helps you decide amongst your available Carrier Partners, the best, most efficient, and dependable choice of delivery for any given package.
It makes these decisions based on historical data on shipping costs, RTO percentages, deliveries, delays, and other internal parameters in the user-specified location.
This API contains the necessary modifications needed in the recommendation API to support B2B MPS usecases.
Overview
By entering the shipment details along with the drop and pickup Pincode, enterprises can determine the optimal carrier partner.
-
Our recommendation API helps you decide amongst your available Carrier Partners, the best, most efficient and dependable choice of delivery for any given package.
-
The enterprises can use the Recommendation API to trigger order creation/ order manifestation based on the API response
-
Get the preference array of the carrier partner based on
filters,Ordered List,Weightage feedback, andLoad distribution. This can be configured in from the Clickpost Dashboard -
Help document to configure recommendation rules on Clickpost dashboard : https://clickpost.freshdesk.com/support/solutions/articles/43000764842
How to configure Recommendation Rules from Dashboard
Clickpost Dashboard > Home > Allocation > Allocation Rule

Clickpost Dashboard > Home > Allocation > Allocation Rule
Usecase
This is a standard API which applies to B2B MPS (Multi-Piece Shipments) orders.
Geography
This is a standard API which supports all shipments created and transported within India.
NOTEServiceability supersedes Recommendation API. For example, if a particular Carrier Partner is not serviceable for a the Drop Pincode, then it will not feature in the preference array
Path
POST https://www.clickpost.in/api/v1/recommendation_api/?key=*****
Sample Payload
[
{
"reference_number": "12345",
"pickup_location_code": "Bhiwandi-Wh01",
"pickup_name": "Mr Ramesh",
"drop_location_code": "Thane-Wh02",
"pickup_city": "Bhiwandi",
"is_restricted": "false",
"drop_city": "Thane",
"pickup_state": "Maharashtra",
"drop_state": "Maharashtra",
"pickup_address": "Plot No 17, XYZ Flyover, Bhiwandi",
"drop_address": "Plot No 19, ABC Flyvoer, Thane",
"zone": "WEST",
"item_count": "100",
"pickup_pincode": "110017",
"drop_pincode": "110019",
"invoice_value": 100,
"weight": 100000,
"delivery_type": "FORWARD",
"order_type": "PREPAID",
"boxes": [
{
"height": 50,
"length": 40,
"weight": 10000,
"breadth": 30
},
{
"height": 50,
"length": 50,
"weight": 10000,
"breadth": 20
}
],
"additional": {
"custom_fields": [
{
"key": "destination_type",
"value": "DC"
},
{
"key": "source_location_code",
"value": "32140080"
},
{
"key": "destination_location_code",
"value": "R741"
}
]
}
}
]
Request Payload
| Field Name | Data Type | Field | Description | Max Length | Example |
|---|---|---|---|---|---|
pickup_pincode | string | Mandatory | The pickup pincode where the shipment needs to be picked up | "110001" | |
drop_pincode | string | Mandatory | The drop pincode where the shipment needs to be delivered | "380001" | |
invoice_value | float | Mandatory | The invoice value of the shipment in INR. This field becomes mandatory if enterprise wants to calculate PRICING If there are multiple invoices in the same shipment then please send the sum of invoice values of all invoices. | 200.75 | |
weight | float | Optional | The weight of the shipment in grams. This field becomes mandatory if enterprise wants to calculate shipping_charge | 2.75 | |
delivery_type | enum | Mandatory | The order type for which serviceability needs to be determined. Enter FORWARD if the shipments need to be delivered to the customer from the enterprise's warehouse. Enter RVP if the shipment needs to picked up from the customer’s location and delivered to the enterprise’s warehouse | FORWARD | |
reference_number | string | Mandatory | The reference number for the API request. It has to be unique for each API request. NOTE: As a best practice, please ensure that the reference number for Recommendation and Order Creation is the same | "REF#123" | |
order_type | enum | Mandatory | The order type for the particular shipment
| "PREPAID" | |
item_count | integer | Optional | The sum of the number of items inside a box across all boxes of the shipment | 2 | |
pickup_city | String | Optional | City of the pickup location | ||
drop_city | String | Optional | City of the drop location | ||
pickup_address | String | Optional | Pickup address of the pickup location | ||
drop_address | String | Optional | Drop address of the pickup location | ||
zone | String | Optional | Zone as per the pickup and drop pincode | ||
pickup_location_code | String | Optional | Location code of the pickup location as per the location master | ||
drop_location_code | String | Optional | Location code of the drop location as per the location master | ||
pickup_state | String | Optional | State of the pickup location | ||
drop_state | String | Optional | State of the drop location | ||
boxes | Array | Optional | An array of box objects containing height, length, breadth (in cms) and weight (in grams) of each box This data becomes mandatory to calculate shipping charge. | ||
is_restricted | String | Optional | Whether the Shipment contains any restricted items or not. Possible values- TRUE or FALSE |
additional [additional parameters] [optional]
| Field Name | Data Type | Field | Description | Max Length | Example |
|---|---|---|---|---|---|
additional | JSON OBJECT | Optional | The JSON Object of the additional parameter | { "custom_fields": [{ "key": "ptl_or_ftl", "value": "PTL" }, { "key": "truck_size", "value": "14 feet" } | |
key | string | Optional | The enterprise defined field's key. Enterprise can define keys on the dashboard so that the system tunes the recommendations according to the value provided (see value below). This will come into picture if enterprise wants to set Enterprise defined allocation rules. | "Customer_Type" | |
value | string | Optional | The enterprise defined field's value. This field encapsulates the value of the key defined on the dashboard (see key above). This will come into picture, if enterprise want to set Enterprise defined allocation rules | "Prime Customer" |
Response
meta [meta parameters]
| Field Name | Data Type | Description | Example |
|---|---|---|---|
success | Boolean | Indicates the success of the API request | true |
message | String | The message from clickpost. In case of success it will be "SUCCESS". In case that there are no carrier partners that are servicing the pincodes it will be”Pin code not serviceable" | "SUCCESS" |
status | HTTP Code | The HTTP response status code of the API request | 200 |
result [result parameters]
| Field Name | Data Type | Description | Example |
|---|---|---|---|
preference_array | array | The preference list of eligible carrier partners | [ { "cp_name": "Delhivery", "cp_id": 4, "account_code": "Delhivery_Surface_B2C", "async": false, "account_id": 186908, "priority": 1, "scores_computation": { "scoring_params": { "PRICING": 57.11, "zone": "METRO" }, "total_score": 57.11 }, "shipping_charge": 57.11 }, { "cp_name": "XpressBees", "cp_id": 6, "account_code": "Xpressbees_Surface", "async": false, "account_id": 187017, "priority": 2, "scores_computation": { "scoring_params": { "PRICING": 59.97, "zone": "ROI" }, "total_score": 59.97 }, "shipping_charge": 59.97 } |
cp_name | String | The name of the carrier partner | Delhivery |
cp_id | num | Carrier Partner ID. This can be found on the dashboard or you can refer it to here | 4 |
account_code | string | Courier partner account name configured on the Clickpost dashboard | "Delhivery_Surface_B2C" |
async | Boolean | Whether the carrier partner supports asynchronous order creation or not | false |
account_id | num | The identifier for the particular account configured under the carrier partner | 186908 |
priority | num | The priority of the carrier partner, this will be according to the Allocation rule set up by the enterprise on the Clickpost dashboard | 1 |
scores_computation | JSON Object | The scoring of the carrier partner | { "scoring_params": { "PRICING": 57.11, "zone": "METRO" }, "total_score": 57.11 } |
scoring_params | JSON Object | The scoring parameters on which carrier partners are to be ranked | { "PRICING": 57.11, "zone": "METRO" } |
PRICING | num | The pricing of the carrier partner | 57.11 |
zone | String | The zone which has been mapped with pincodes on the clickpost dashboard under the courier integration section.This can be configured in the Pricing section in courier partner account configuration section. (Settings>Courier>Integrations>Accounts> Configuration > Pricing) | "METRO" |
total_score | num | The total score for the particular carrier partner | 57.11 |
shipping_charge | num | The total shipping charge that the carrier partner will charge for the particular shipment | 57.11 |
filters_ran | JSON Object | The JSON object of all the filters that have applied | "filters_ran": { "1_active_accounts_filter": [], "2_serviceable_accounts_filter":[], "2_1_serviceable_oda_accounts_filter": [], 3_clickpost_define_and_custom_filters_accounts: [], 4_ordered_list_account_names_filters_applied: false, ordered_list_filter_accounts: [] } |
1_active_accounts_filter | array | The list of active carriers that are there on Clickpost account | [ "Delhivery_Surface_Heavy(Delhivery(186909))", "Delhivery_Surface_B2C(Delhivery(186908))", "Delhivery_Express_B2C(Delhivery(186907))", "Delhivery_Surface_Bulk(Delhivery(186915))", "Porter_criticallog(CriticalLog(187713))", "Xpressbees_Surface(XpressBees(187017))", "Xpressbees_Express(XpressBees(187306))", "EcomExpress_Surface(EcomExpress(187019))", "Ekart_Surface(Ekart Logistics(187018))" ] |
2_serviceable_accounts_filter | array | The list of serviceable carrier partners for the particular pickup and drop pincode | [ "Delhivery_Surface_Bulk(Delhivery(186915))", "Xpressbees_Surface(XpressBees(187017))", "Delhivery_Express_B2C(Delhivery(186907))", "Delhivery_Surface_B2C(Delhivery(186908))", "Delhivery_Surface_Heavy(Delhivery(186909))" ] |
2_1_serviceable_oda_accounts_filter | array |
Sample Response
"meta": {
"success": true,
"message": "SUCCESS",
"status": 200
},
"result": [
{
"preference_array": [
{
"cp_name": "Bluedart B2B",
"cp_id": 496,
"courier_name": "Bluedart",
"account_code": "Test_BD",
"async": false,
"account_id": 1012057,
"priority": 1,
"scores_computation": {},
"shipping_charge": null,
"delivery_type": "FORWARD",
"awb_number": "6666777191",
"preassigned_awb_flow": "MASTER_AND_CHILD_DERIVED",
"mode_of_shipment": "SURFACE"
}
],
"filters_ran": {
"1_active_accounts_filter": [
"marks_bluedart(Bluedart B2B MPS(1009477))",
"marks_vxpress(Vxpress B2B(1007653))",
"marks_Ekart_surface(Ekart B2B Apptmyz(1012074))",
"Lg_logistics(Self FTL(1007830))",
"marks_xb(XpressBees Cargo MPS [B2B](1010092))",
"marks_bluedart_Air(Bluedart B2B MPS(1011326))",
"marks_vxpress_air(Vxpress B2B(1011327))",
"marks_xb_air(XpressBees Cargo MPS [B2B](1011328))",
"marks_mudita(Mudita B2B(1012057))",
"marks_mudita_air(Mudita B2B(1012066))"
],
"1_accounts_out_of_threshold": [],
"1_blacklisted_accounts": [],
"2_serviceable_accounts_filter": [
"marks_mudita(Mudita B2B(1012057))"
],
"2_1_serviceable_oda_accounts_filter": [
"marks_mudita(Mudita B2B(1012057))"
],
"3_clickpost_filters_rules_list": [],
"3_clickpost_define_and_custom_filters_accounts_applied": false,
"3_clickpost_define_and_custom_filters_accounts": [],
"accounts_after_load_distribution_filter": [],
"priority_list_account_names": [
"marks_mudita(Mudita B2B(1012057))"
],
"order_list_matched_rule": "Test_preassign",
"4_ordered_list_rules_list": [
{
"sequence": 1,
"rule_name": "Test_preassign",
"rule_priority": 2,
"has_serviceable_accounts": true
}
],
"4_ordered_list_account_names_filters_applied": true,
"ordered_list_filter_accounts": [
"marks_mudita(Mudita B2B(1012057))"
]
},
"pincode_serviceable": true,
"return_serviceable_accounts": true,
"username": "test-b2b",
"reference_number": "Test_preassign"
}
]
}Updated about 2 months ago
