Fetch Recommended Carriers: Rest of the World and Cross Border

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

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, e-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

  • Shipments created and transported in
    • North America
    • Europe
    • Middle East
    • South East Asia
  • Cross-Border shipments: Shipments that are to be transported from India to any other country, or vice versa

❗️

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

URL

POST <https://www.clickpost.in/api/v2/recommendation/>

URL Parameters

Query Parameters to be passed directly in the URL.

Field NameData TypeFieldDescriptionMax LengthExample
keyStringMandatoryUnique license key provided by Clickpost for the enterprise100"00000000-0000-0000-0000-000000000000"

Request Body

Pickup Info (pickup_info)

This mandatory object takes in the data for the warehouse/pickup location for the shipment.

Field NameData TypeFieldDescriptionMax LengthExample
latFloatOptionalLatitude of the pickup location45.12211
longFloatOptionalLongitude of the pickup location88.12342
cityStringMandatoryCity of the pickup location100"Riyadh"
nameStringMandatoryContact name of the consignor of the shipment100"Tony Strak"
addressStringMandatoryAddress of the pickup location500"Strak Industry Logistics Park, Warehouse No 1002, Hyt, Riyadh, 14351"
districtStringOptionalDistrict of the pickup location100"Chinatown"
stateStringOptionalState/province of the pickup location100"British Columbia"
landmarkStringOptionalLandmarks to help find the pickup location500"Near XYZ Towers"
emailStringMandatoryEmail of the pickup contact50"[email protected]"
phoneStringMandatoryContact number of the pickup contact11"9876543210"
timeStringMandatoryTime of pickup for the order (to be provided in YYYY-MM-DDTHH:MM:SS format only)2022-01-10T10:02:33
postal_codeStringOptionalPostal code of the pickup location50"Riyadh"
country_codeStringMandatoryAlpha ISO-2 country code of the pickup location. Only "IN" is accepted as input.2"SA"
delivery_instructionsStringOptionalDelivery Instruction to be passed to the Carrier partner100
phone_codeStringMandatoryCounty code of the phone number7"+966"
address_typeStringOptionalPickup address type50"Home"

Drop Info (drop_info)

This mandatory object takes in the data for the delivery/consignee location for the shipment.

Field NameData TypeFieldDescriptionMax LengthExample
latFloatOptionalLatitude of the drop location645.12211
longFloatOptionalLongitude of the drop location688.12342
nameStringMandatoryContact name of the consignee of the shipment100"Mukesh Kumar"
addressStringMandatoryAddress of the drop location500"123, ABC Street"
districtStringOptionalDistrict of the drop location100"Mumbai City"
cityStringMandatoryCity of the drop location100"Mumbai"
stateStringMandatoryState/province of the drop location100"Maharashtra"
landmarkStringOptionalLandmarks to help find the drop location500"Near XYZ Towers"
emailStringOptionalEmail of the drop contact50"[email protected]"
phoneStringMandatoryContact number of the drop contact11"9876543210"
timeStringOptionalEstimated time of drop for the order (to be provided in YYYY-MM-DDTHH:MM:SS format only)2022-01-10T10:02:33
postal_codeStringMandatoryDrop Postal code100"Tweeq"
country_codeStringMandatoryAlpha ISO-2 country code of the drop location. Only "IN" is accepted as input.2"SA"
address_typeStringOptionalThe address type of the drop location100"Home"

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. This will come into picture, if enterprise want to set Enterprise defined allocation rules"Customer_Type"
valuestringOptionalThe enterprise defined field's value. This will come into picture, if enterprise want to set Enterprise defined allocation rules"Prime Customer"

Shipment Details (shipment_details)

In the 'shipment_details' field, the details regarding all items, and important order details like payment type, order type, courier partner, etc. are added.

Field NameData TypeFieldDescriptionMax LengthExample
itemsList[Object]MandatoryList of items to be delivered in the shipment. Details of the items explained below.
heightFloatMandatoryHeight of the overall package (in cms)25.25
widthFloatMandatoryWidth of the overall package (in cms)45.6
lengthFloatMandatoryLength of the overall package (in cms)75.29
weightFloatMandatoryWeight of the package (in gms)500.20
reference_numberStringMandatoryReference number of the order. Must be unique for every shipment, i.e. every call of this API.100"TestOrder00001"
cod_valueFloatMandatoryCash to be given to the courier (currency to be determined by currency_code). Must be non-zero for COD orders, and zero for PREPAID orders.25.25
order_idStringOptionalIdentification string for the order100"TestOrderID00001"
order_typeStringMandatoryType of payment of the shipment. Can only take values "COD" or "PREPAID". cod_value must be non-zero for COD shipments and zero for PREPAID shipments.10"COD"/"PREPAID"
delivery_typeStringMandatoryType of delivery to be done. Can only take values "FORWARD" or "RVP".10"FORWARD"/"RVP"
invoice_valueFloatMandatoryValue of the shipment as mentioned in the invoice.256.29
invoice_dateStringMandatoryDate of issuance of the invoice of the shipment. (YYYY-MM-DD format only)1002022-01-10
invoice_numberStringMandatoryThe Invoice number of the shipment.100"AB00001"

Item Level details (items)

The details for each item to be delivered is passed in the "items" field, in "shipment_details".

Field NameData TypeFieldDescriptionMax LengthExample
catStringOptionalCategory of the item in question50Footwear
descriptionStringMandatoryBrief description of the item500"Brown Cotton Socks - 1 pair"
quantityIntegerMandatoryNumber of units of the item5
weightFloatMandatoryWeight of each unit of the item500
priceFloatMandatoryPrice of each unit of the item (currency to be decided by 'currency_code' field)64.99
manufacture_country_codeStringOptionalAlpha-2 ISO Country code of manufacture of the item2"CA"
manufacture_countryStringOptionalFull country name of manufacture of the item100"Canada"
skuStringOptionalStock-keeping unit of the item100"SKU0001"

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_codestringThe name of the account configured inside of the carrier partner 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