Fetch Recommended Carriers: India

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.

Overview

By entering the shipment details along with the drop and pickup Pincode, enterprises can determine the optimal carrier partner.

  1. Our recommendation API helps you decide amongst your available Carrier Partners, the best, most efficient and dependable choice of delivery for any given package.

  2. The enterprises can use the Recommendation API to trigger order creation/ order manifestation based on the API response

  3. Get the preference array of the carrier partner based on filters, Ordered List, Weightage feedback, and Load distribution. This can be configured in from the Clickpost Dashboard

  4. Help document to configure recommendation rules on Clickpost dashboard : https://clickpost.freshdesk.com/a/solutions/articles/43000688518

Important Links

Run in Postman API Reference

How to configure Recommendation Rules from Dashboard

Clickpost Dashboard > Home > Allocation > Allocation Rule

2866

Clickpost Dashboard > Home > Allocation > Allocation Rule

Usecase

This is a standard API which applies to MPS (Multi-Piece Shipments) and SPS (Single Piece Shipments) orders

Geography

This is a standard API which supports all shipments created and transported within India.

❗️

NOTE

Serviceability 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

Request Payload

Field NameData TypeFieldDescriptionMax LengthExample
lengthfloatOptionalThe length of the shipment in centimeter. This field becomes mandatory if enterprise wants to calculate shipping_charge10.25
pickup_pincodestringMandatoryThe pickup pincode where the shipment needs to be picked up"110001"
drop_pincodestringMandatoryThe drop pincode where the shipment needs to be delivered"380001"
breadthfloatOptionalThe breadth of the shipment in centimeter. This field becomes mandatory if enterprise wants to calculate shipping_charge20.50
height floatOptionalThe height of the shipment in centimeter. This field becomes mandatory if enterprise wants to calculate shipping_charge20.50
invoice_valuefloatOptionalThe invoice value of the shipment in INR. This field becomes mandatory if enterprise wants to calculate PRICING200.75
weightfloatOptionalThe weight of the shipment in kilograms. This field becomes mandatory if enterprise wants to calculate shipping_charge2.75
delivery_typeenumMandatoryThe 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 warehouseFORWARD
reference_numberstringMandatoryThe 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_typeenumMandatoryThe order type for the particular shipment

1. PREPAID
2. COD
"PREPAID"
item_countintegerOptionalThe number of units of the item(s) in the shipment2

additional [additional parameters] [optional]

Field NameData TypeFieldDescriptionMax LengthExample
additionalJSON OBJECTOptionalThe JSON Object of the additional parameter{
"custom_fields": [{
"key": "ptl_or_ftl",
"value": "PTL"
}, {
"key": "truck_size",
"value": "14 feet"
}
keystringOptionalThe 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"
valuestringOptionalThe 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 NameData TypeDescriptionExample
successBooleanIndicates the success of the API requesttrue
messageStringThe 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"
statusHTTP CodeThe HTTP response status code of the API request200

result [result parameters]

Field NameData TypeDescriptionExample
preference_arrayarrayThe 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_nameStringThe name of the carrier partnerDelhivery
cp_idnumCarrier Partner ID. This can be found on the dashboard or you can refer it to here4
account_codestringCourier partner account name configured on the Clickpost dashboard"Delhivery_Surface_B2C"
asyncBooleanWhether the carrier partner supports asynchronous order creation or notfalse
account_idnumThe identifier for the particular account configured under the carrier partner186908
prioritynumThe priority of the carrier partner, this will be according to the Allocation rule set up by the enterprise on the Clickpost dashboard1
scores_computationJSON ObjectThe scoring of the carrier partner{
"scoring_params": {
"PRICING": 57.11,
"zone": "METRO"
},
"total_score": 57.11
}
scoring_paramsJSON ObjectThe scoring parameters on which carrier partners are to be ranked{
"PRICING": 57.11,
"zone": "METRO"
}
PRICINGnumThe pricing of the carrier partner57.11
zoneStringThe 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_scorenumThe total score for the particular carrier partner57.11
shipping_chargenumThe total shipping charge that the carrier partner will charge for the particular shipment57.11
filters_ranJSON ObjectThe 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_filterarrayThe 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_filterarrayThe 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_filterarray