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 deliveries, delays and other internal parameters in the user-specified location.
This API can be used for shipments in the GCC, North America, and European Countries.
Important Links
Payload Example
{
"pickup_info": {
"city": "Umm Sala Ali",
"name": "Hellmann",
"time": "2020-12-23T13:01:01",
"email": "[email protected]",
"phone": "555555555",
"state": "",
"address": "GW100 Doha City Umm Salal Muhammed, Doha",
"landmark": null,
"phone_code": "+974",
"postal_code": "Umm Sala Ali",
"country_code": "QA"
},
"drop_info": {
"city": "Doha",
"name": "Varsha Hon",
"email": "[email protected]",
"phone": "555555555",
"state": "",
"address": "St 11, Gate 108, Barsha Khulaib Street",
"landmark": null,
"phone_code": "+974",
"postal_code": "Al Dafna",
"country_code": "QA"
},
"shipment_details": {
"items": [
{
"sku": "8719134064735",
"price": 50,
"quantity": 1,
"description": "Shower Oil",
"cat":"Soap",
"weight":"1000",
"manufacture_country_code":"IN",
"manufacture_country":"INDIA"
}
],
"additional": {
"custom_fields": [
{
"key": "areaId",
"value": 28233
},
{
"key": "pieces",
"value": 1
}
]
},
"height": 10,
"length": 10,
"weight": 10,
"breadth": 10,
"cod_value": 90.00,
"order_type": "COD",
"invoice_date": "2020-12-22",
"currency_code": "USD",
"delivery_type": "FORWARD",
"invoice_value": 90.00,
"invoice_number": "120000009",
"reference_number": "120000059"
}
}
Request Payload
Pickup Info (pickup_info
)
pickup_info
)This mandatory object takes in the data for the warehouse/pickup location for the shipment.
Field Name | Data Type | Field | Description |
---|---|---|---|
lat | Float | Optional | Latitude of the pickup location |
long | Float | Optional | Longitude of the pickup location |
city | String | Mandatory | City of the pickup location |
name | String | Mandatory | Contact name of the consignor of the shipment |
address | String | Mandatory | Address of the pickup location |
district | String | Optional | District of the pickup location |
state | String | Mandatory | State/province of the pickup location |
landmark | String | Optional | Landmarks to help find the pickup location |
email | String | Mandatory | Email of the pickup contact |
phone | String | Mandatory | Contact number of the pickup contact |
time | String | Mandatory | Time of pickup for the order (to be provided in YYYY-MM-DDTHH:MM:SS format only) |
postal_code | String | Optional | Postal code of the pickup location |
country_code | String | Mandatory | Alpha ISO-2 country code of the pickup location. Only "IN" is accepted as input. |
delivery_instructions | String | Optional | Delivery Instruction to be passed to the Carrier partner |
phone_code | String | Mandatory | County code of the phone number |
address_type | String | Optional | Pickup address type |
Drop Info (drop_info
)
drop_info
)This mandatory object takes in the data for the delivery/consignee location for the shipment.
Field Name | Data Type | Field | Description |
---|---|---|---|
lat | Float | Optional | Latitude of the drop location |
long | Float | Optional | Longitude of the drop location |
name | String | Mandatory | Contact name of the consignee of the shipment |
address | String | Mandatory | Address of the drop location |
district | String | Optional | District of the drop location |
city | String | Mandatory | City of the drop location |
state | String | Mandatory | State/province of the drop location |
landmark | String | Optional | Landmarks to help find the drop location |
email | String | Optional | Email of the drop contact |
phone | String | Mandatory | Contact number of the drop contact |
time | String | Optional | Estimated time of drop for the order (to be provided in YYYY-MM-DDTHH:MM:SS format only) |
postal_code | String | Mandatory | Drop Postal code |
country_code | String | Mandatory | Alpha ISO-2 country code of the drop location. Only "IN" is accepted as input. |
address_type | String | Optional | The address type of the drop location |
additional
[additional parameters] [optional]
Field Name | Data Type | Field | Description |
---|---|---|---|
additional | JSON OBJECT | Optional | The JSON Object of the additional parameter |
key | string | Optional | The enterprise defined field's key. This will come into picture, if enterprise want to set Enterprise defined allocation rules |
value | string | Optional | The enterprise defined field's value. This will come into picture, if enterprise want to set Enterprise defined allocation rules |
Shipment Details (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 Name | Data Type | Field | Description |
---|---|---|---|
items | List[Object] | Mandatory | List of items to be delivered in the shipment. Details of the items explained below. |
height | Float | Mandatory | Height of the overall package (in cms) |
width | Float | Mandatory | Width of the overall package (in cms) |
length | Float | Mandatory | Length of the overall package (in cms) |
weight | Float | Mandatory | Weight of the package (in gms) |
reference_number | String | Mandatory | Reference number of the order. Must be unique for every shipment, i.e. every call of this API. |
cod_value | Float | Mandatory | Cash 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. |
order_id | String | Optional | Identification string for the order |
order_type | String | Mandatory | Type 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. |
delivery_type | String | Mandatory | Type of delivery to be done. Can only take values "FORWARD" or "RVP". |
invoice_value | Float | Mandatory | Value of the shipment as mentioned in the invoice. |
invoice_date | String | Mandatory | Date of issuance of the invoice of the shipment. (YYYY-MM-DD format only) |
invoice_number | String | Mandatory | The Invoice number of the shipment. |
Item Level details (items
)
items
)The details for each item to be delivered is passed in the "items" field, in "shipment_details".
Field Name | Data Type | Field | Description |
---|---|---|---|
cat | String | Optional | Category of the item in question |
description | String | Mandatory | Brief description of the item |
quantity | Integer | Optional | Number of units of the item |
weight | Float | Mandatory | Weight of each unit of the item |
price | Float | Mandatory | Price of each unit of the item (currency to be decided by 'currency_code' field) |
manufacture_country_code | String | Optional | Alpha-2 ISO Country code of manufacture of the item |
manufacture_country | String | Optional | Full country name of manufacture of the item |
sku | String | Optional | Stock-keeping unit of the item |
Response
meta
[meta parameters]
Field Name | Data Type | Description |
---|---|---|
success | Boolean | Indicates the success of the API request |
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" |
status | HTTP Code | The HTTP response status code of the API request |
result
[result parameters]
Field Name | Data Type | Description |
---|---|---|
preference_array | array | The preference list of eligible carrier partners |
cp_name | String | The name of the carrier partner |
cp_id | num | Carrier Partner ID. This can be found on the dashboard or you can refer it to here |
account_code | string | The name of the account configured inside of the carrier partner on the Clickpost dashboard |
async | Boolean | Whether the carrier partner supports asynchronous order creation or not |
account_id | num | The identifier for the particular account configured under the carrier partner |
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 |
scores_computation | JSON Object | The scoring of the carrier partner |
scoring_params | JSON Object | The scoring parameters on which carrier partners are to be ranked |
PRICING | num | The pricing of the carrier partner |
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) |
total_score | num | The total score for the particular carrier partner |
shipping_charge | num | The total shipping charge that the carrier partner will charge for the particular shipment |
filters_ran | JSON Object | The JSON object of all the filters that have applied |
1_active_accounts_filter | array | The list of active carriers that are there on Clickpost account |
2_serviceable_accounts_filter | array | The list of serviceable carrier partners for the particular pickup and drop pincode |
2_1_serviceable_oda_accounts_filter | array |