NAV Navbar
Logo
json

Introduction

Welcome to the Clickpost API! You can use our API to access Clickpost API endpoints which can get information on our different APIs:

  1. Recommendation Engine: Recommend list of Courier Partners in priority order
  2. Manifestation API: Create order on Courier Partner and fetch AWB, Cancel orders and place pickup request
  3. Track Shipment: Track your shipment using AWB and Courier Partner
  4. Cancellation API: Cancel shipment manifested on Courier Partner for faster returns and higher inventory availability
  5. Serviceability API: Check pincode serviceability
  6. Expected Date of Delivery API: Check predictive sla time range for any shipment
  7. Pickup Request API: Recommend list of Courier Partners in priority order
  8. Customer Feedback API: Gives list of customer feedbacks submitted on tracking page by end user.
  9. NDR Action update API: Updates the after NDR action directly on courier company’s database. (Currently works for Delhivery only)

You can view code examples in the dark area to the right, and you can switch the programming language of the examples with the tabs in the top right.

Recommendation API

URL to hit

https://www.clickpost.in/api/v1/recommendation_api/?key=2e9b19ac-8e1f-41ac-a35b-4cd23f41ae17

(key needs to be replaced with the key provided to you)

Example(POST Body)

[{
     "pickup_pincode": "110017",
     "drop_pincode": "110019",
     "order_type": "PREPAID",
     "reference_number": "1",
     "item": "bottle",
     "invoice_value": 1245,
     "delivery_type": "FORWARD",
     "weight": 10,
     "height": 10,
     "length": 10,
     "breadth": 10
}]

Response

{
    "result": [
        {
            "form_tax_details": [
                {
                    "entry_tax": false,
                    "form_name": ""
                }
            ],
            "request_details": {
                "order_type": "PREPAID",
                "drop_pincode": "110019",
                "reference_number": "1",
                "delivery_type": "FORWARD",
                "pickup_pincode": "110017",
                "invoice_value": 1245,
                "item": "bottle"
            },
            "preference_array": [
                {
                    "cp_name": "Fedex",
                    "cp_id": 1,
                    "account_code": "Fedex Economy",
                    "priority": 1
                },
                {
                    "cp_name": "Fedex",
                    "cp_id": 1,
                    "account_code": "Fedex Standard Overnight",
                    "priority": 2
                }
            ],
            "pincode_serviceable": true
        }
    ],
    "meta": {
        "message": "SUCCESS",
        "success": true,
        "status": 200
    }
}

It’s a POST request as follows

URL: https://www.clickpost.in/api/v1/recommendation_api/

Headers: {‘Content-type’: 'application/json’}

URL Parameters:

Parameter Type Description
key character API key provided to you

POST Parameters:

Format: JSON

Compulsory Fields

Payload is a list of json objects each of which have following fields:

Parameter Type Description
pickup_pincode integer pincode of pickup address
drop_pincode integer pincode of drop address
order_type character COD/PREPAID
reference_number character to identify each json object uniquely
item character item that you wish to send
invoice_value double invoice value of the shipment
delivery_type character FORWARD/RVP

Optional Fields

In case you want the recommendation logic to incorporate pricing as a parameter as well please pass the following fields in the API. If not passed, the pricing given by you in the system will not be entertained as a parameter.

Parameter Type Description
weight integer weight of the shipment
length integer length of the shipment
breadth integer breadth of the shipment
height integer height of the shipment

Response explanation:

Response object has two parts:

  1. meta: stores information about the API, success or failure
    • success: true/false, tells whether the order was created or not
    • message: SUCCESS in case order was created successfully, else returns error message.
    • status:
      1. 200 if the order is created successfully,
      2. 400 if there is a bad request encountered: errors will be present in “message”
  2. result: It’s a list of multiple objects, each corresponding to the request json objects, with unique identifier: reference_number. For each json object in result, refer:
    • pincode_serviceable: this field will let you know whether the pincode is serviceable by any courier partner or not. Values: true: if the pincode is serviceable else false
    • preference_array: it’s the list of eligible courier partners for the corresponding reference_number. It has following fields
      1. cp_id: courier partner id as mentioned on page 1 of this document
      2. cp_name: name of the courier partner
      3. account_code: account code created while adding credentials on Clickpost dashboard, this is useful if you have multiple accounts for a courier partner
      4. priority: priority

Shipment Manifestation / AWB Generation API

Order Creation V1 API

URL to hit:

https://www.clickpost.in/api/v1/create-order/?username=<user-name>&key=<api-key>
Headers: {'Content-type': 'application/json'}

(Username/key needs to be replaced with the username/key provided to you)

Example: POST Body (COD Shipment)

{
  "pickup_name": "Heronakamura",
  "pickup_phone": "9999999999",
  "pickup_address": "1, Top Floor, Canaught Place, New Delhi",
  "pickup_city": "Delhi",
  "pickup_state": "DL",
  "pickup_country": "IN",
  "pickup_pincode": "110001",
  "pickup_time": "2017-02-14T18:00:00+05:30",
  "drop_name": "Rahul Jagat",
  "drop_phone": "8080808080",
  "drop_address": "KFC, Kalkaji Main Road, New Delhi",
  "drop_city": "DELHI",
  "drop_state": "DELHI",
  "drop_country": "IN",
  "drop_pincode": "110020",
  "return_info": {
        "pincode": "110019",
        "city": "DELHI",
        "name": "Deepanshu",
        "state": "DELHI",
        "country": "IN",
        "phone": 8080808080,
        "address": "Test Address top floor kalkaji New Delhi "
    },
  "tin": "00000000",
  "invoice_date": "2016-12-16",
  "order_type": "PREPAID",
  "cod_value": 0,
  "items": [{"price":"370.00","description":"IN1543MTOSKTBLA-146-10","sku":"IN1543MTOSKTBLA-146-10","quantity":"1","images": "http://sample-file1.jpg,http://sample-file2.jpg"},{"price":"694.00","description":"IN1516MTODREMLT-147-10","sku":"IN1516MTODREMLT-147-10","quantity":"1","images": "http://sample-file1.jpg,http://sample-file2.jpg"}],
  "invoice_number": "123465",
  "invoice_value": 1006.00,
  "reference_number": "ASDF1234",
  "email": "founders@clickpost.in",
  "weight": 500,
  "length": 5,
  "height": 10,
  "breadth": 15,
  "courier_partner": 2,
  "gst_info": {
        "seller_gstin": "1234",
        "taxable_value": 100,
        "ewaybill_serial_number": "2345677",
        "is_seller_registered_under_gst": false,
        "sgst_tax_rate": 100,
        "place_of_supply": "DELHI",
        "gst_discount": 0,
        "hsn_code": "1234",
        "sgst_amount": 100,
        "enterprise_gstin": "13",
        "gst_total_tax": 100,
        "igst_amount": 100,
        "cgst_amount": 200,
        "gst_tax_base": 200,
        "consignee_gstin": "1233",
        "igst_tax_rate": 100,
        "invoice_reference": "1234",
        "cgst_tax_rate": 100
    }
}

Response

{
  "meta": {
    "message": "Order Placed Successfully",
    "status": 200,
    "success": true
  },
  "result": {
    "reference_number": "ASDF1234",
    "waybill": "785578015860",
    "label": "https://pyck-res-bucket.s3.amazonaws.com:443/fedex/2017-02-11/785578015860.pdf"
  }
}

Example: POST Body (PREPAID Shipment)

{
    "pickup_address": "B-220/2, 1st Floor, Right Door, Savitri
Nagar, New Delhi",
    "pickup_city": "DELHI",
    "pickup_state": "DELHI",
    "pickup_country": "IN",
    "pickup_pincode": "110017",
    "pickup_time": "2015-12-10T12:00:00Z",
    "drop_name": "Rahul",
    "drop_phone": "8376035546",
    "drop_address": "L-19B, Third Floor, Malviya Nagar, New
    Delhi",
    "drop_city": "delhi",
    "pickup_name": "Deepanshu",
    "pickup_phone": "8376035546",
    "drop_state": "DL",
    "drop_country": "IN",
    "drop_pincode": "110092",
    "return_info": {
        "pincode": "110019",
        "city": "DELHI",
        "name": "Clickpost",
        "state": "DELHI",
        "country": "IN",
        "phone": 8080808080,
        "address": "Test Address, Test Location, Test Landmark New Delhi"
    },
    "tin": "120349483",
    "invoice_date": "2015-12-27",
    "order_type": "PREPAID",
    "cod_value": "0",
    "items": [{"price":"370.00","description":"IN1543MTOSKTBLA-146-10","sku":"IN1543MTOSKTBLA-146-10","quantity":"1","images": "http://sample-file1.jpg,http://sample-file2.jpg"},{"price":"694.00","description":"IN1516MTODREMLT-147-10","sku":"IN1516MTODREMLT-147-10","quantity":"1","images":"http://sample-file1.jpg,http://sample-file2.jpg"}],
    "invoice_number": "INV-234/3",
    "invoice_value": "100",
    "reference_number": "SAMPLE-REF-No",
    "email": "founders@clickpost.in",
    "weight": "10",
    "length": "10",
    "height": "10",
    "breadth": "10",
    "courier_partner": 5,
    "gst_info": {
        "seller_gstin": "1234",
        "taxable_value": 100,
        "ewaybill_serial_number": "2345677",
        "is_seller_registered_under_gst": false,
        "sgst_tax_rate": 100,
        "place_of_supply": "DELHI",
        "gst_discount": 0,
        "hsn_code": "1234",
        "sgst_amount": 100,
        "enterprise_gstin": "13",
        "gst_total_tax": 100,
        "igst_amount": 100,
        "cgst_amount": 200,
        "gst_tax_base": 200,
        "consignee_gstin": "1233",
        "igst_tax_rate": 100,
        "invoice_reference": "1234",
        "cgst_tax_rate": 100
    }
}

Example: POST Body: (Reverse Pickup: RVP Shipment):

{
    "courier_partner": 7,
    "email": "founders@clickpost.in",
    "pickup_name": "Deepanshu",
    "pickup_phone": "8080808080",
    "pickup_address": "B-220/2, 1st Floor, Right Door, Savitri Nagar,
    New Delhi",
    "pickup_pincode": "110017",
    "pickup_city": "DELHI",
    "pickup_state": "DELHI",
    "pickup_country": "IN",
    "drop_name": "Rahul",
    "drop_phone": "8080808080",
    "drop_address": "L-19B, third Floor Malviya Nagar, New Delhi",
    "drop_pincode": "110017",
    "drop_city": "DELHI",
    "drop_state": "DELHI",
    "drop_country": "IN",
    "order_type": "PREPAID",
    "cod_value": 0,
    "tin": "120349483",
    "invoice_number": "INV-4/3",
    "invoice_value": 100,
    "invoice_date": "2015-12-27",
    "items": [{"price": 200, "description": "item1", "sku":
    "XYZ1", "quantity": 1, "images": "http://sample-file1.jpg,http://sample-file2.jpg"}],
    "height": 10,
    "length": 10,
    "breadth": 10,
    "weight": 100,
    "reference_number": "sok56sjkaphf",
    "pickup_time": "2016-10-01T12:00:00Z",
    "gst_info": {
        "seller_gstin": "1234",
        "taxable_value": 100,
        "ewaybill_serial_number": "2345677",
        "is_seller_registered_under_gst": false,
        "sgst_tax_rate": 100,
        "place_of_supply": "DELHI",
        "gst_discount": 0,
        "hsn_code": "1234",
        "sgst_amount": 100,
        "enterprise_gstin": "13",
        "gst_total_tax": 100,
        "igst_amount": 100,
        "cgst_amount": 200,
        "gst_tax_base": 200,
        "consignee_gstin": "1233",
        "igst_tax_rate": 100,
        "invoice_reference": "1234",
        "cgst_tax_rate": 100
    },

    "rvp_reason": "Not Interested",
    "delivery_type": "RVP",
}

Example: POST Body: (Reverse Pickup with QC detail RVP Shipment[Only for Shadowfax Reverse]):

{
    "courier_partner": 7,
    "email": "founders@clickpost.in",
    "pickup_name": "Deepanshu",
    "pickup_phone": "8080808080",
    "pickup_address": "B-220/2, 1st Floor, Right Door, Savitri Nagar,
    New Delhi",
    "pickup_pincode": "110017",
    "pickup_city": "DELHI",
    "pickup_state": "DELHI",
    "pickup_country": "IN",
    "drop_name": "Rahul",
    "drop_phone": "8080808080",
    "drop_address": "L-19B, third Floor Malviya Nagar, New Delhi",
    "drop_pincode": "110017",
    "drop_city": "DELHI",
    "drop_state": "DELHI",
    "drop_country": "IN",
    "order_type": "PREPAID",
    "cod_value": 0,
    "tin": "120349483",
    "invoice_number": "INV-4/3",
    "invoice_value": 100,
    "invoice_date": "2015-12-27",
    "items": [
    {"price": 200, 
    "description": "item1",
    "sku": "XYZ1",
    "quantity": 1,
    "qc_type": "doorstep",
    "cat": "electronics",
    "sub_cat": "tv",    
    "image_urls":[
        "https://assetscdn.paytm.com/images/catalog/view_item/114560/1494268990652.jpg",
        "https://assetscdn.paytm.com/images/catalog/view_item/116303/1493891914950.jpg"
      ]
    }
    ],    
    "height": 10,
    "length": 10,
    "breadth": 10,
    "weight": 100,
    "reference_number": "sok56sjkaphf",
    "pickup_time": "2016-10-01T12:00:00Z",
    "rvp_reason": "Not Interested",
    "delivery_type": "RVP",
    "gst_info": {
        "seller_gstin": "1234",
        "taxable_value": 100,
        "ewaybill_serial_number": "2345677",
        "is_seller_registered_under_gst": false,
        "sgst_tax_rate": 100,
        "place_of_supply": "DELHI",
        "gst_discount": 0,
        "hsn_code": "1234",
        "sgst_amount": 100,
        "enterprise_gstin": "13",
        "gst_total_tax": 100,
        "igst_amount": 100,
        "cgst_amount": 200,
        "consignee_gstin": "1233",
        "igst_tax_rate": 100,
        "invoice_reference": "1234",
        "cgst_tax_rate": 100
    }
}

The create order API allows uploading the package details (manifest information) into the courier partner’s system and returns a label generated by them. You can create single order; errors/warnings will be highlighted in the response.

Please note, in case of any validation failure - order will not get created. Please wait for 8 seconds before you reject a rest-request for latency.

The API is a HTTP POST request to: https://www.clickpost.in/api/v1/create-order/ where output format is json.

Listed below are the parameters:

URL parameters:

Parameter Type Description
Username character User name provided to you
key character API key provided to you

POST Parameters:

Format: JSON

Compulsory Fields:

Pickup information
Parameter Type Description
pickup_name character maximum length of 100 characters
pickup_phone integer 10/11 digit phone number
pickup_pincode integer 6 digit pincode
pickup_address character maximum length of 500 characters
pickup_time character (ISO Format: example 2015-12-10T12:00:00Z)
pickup_city character pickup city name, maximum length 200 characters
pickup_state character pickup state name, maximum length 200 characters
pickup_country character pickup country name, maximum length 100 characters i. email: email id to be sent to courier partner for this shipment
vendor_code character (optional) vendor code of pickup location. If this field is not provided, Clickpost will generate vendor code for the pickup location
Drop Information
Parameter Type Description
drop_name character maximum length of 100 characters
drop_address character maximum length of 500 characters
drop_phone integer 10/11 digit phone number
drop_pincode integer 6 digit pincode
drop_city character drop city name, maximum length 200 characters
drop_state character drop state name, maximum length 200 characters
drop_country character drop country name, maximum length 200 characters
drop_email character (optional) email of the customer
Return Information
Parameter Type Description
name character maximum length of 100 characters
address character maximum length of 500 characters
phone integer 10/11 digit phone number
pincode integer 6 digit pincode
city character drop city name, maximum length 200 characters
state character drop state name, maximum length 200 characters
country character drop country name, maximum length 200 characters
email character (optional) email of the customer
Shipment details
Parameter Type Description
items List Json list with multiple item objects in it. Each item object should have
price double price of the item
description character Item description
sku character SKU unit name of item
quantity Integer number of item pieces
invoice_value decimal/float/integer value
invoice_number character string of length 50 characters
invoice_date character (Format: YYYY-MM-DD, example: 2015-12-25 for 25th December 2015)
reference_number character reference number to tag the order with your order id. Reference number has to follow Code 39 standards (https://en.wikipedia.org/wiki/Code_39)
length integer in cm
breadth integer in cm
height integer in cm
weight integer grams
tin character TIN number of seller (Now GST No)
images character comma separated images of the item
GST Information
Parameter Type Description
enterprise_gstin string GST No of enterprise shipping the shipment
seller_gstin string GST No of seller sending the shipment (will be different from above for marketplaces)
taxable_value double taxable amount for GST (generally invoice_value of shipment)
ewaybill_serial_number string ewaybill for the shipment (optional)
is_seller_registered_under_gst boolean True / False, depending on whether you are registered for GST
place_of_supply string place of supply of service/product (https://cleartax.in/s/gst-state-code-jurisdiction)
gst_discount double discount given under gst, if any (optional)
hsn_code string HSN code for the product shipped (You may search for HSN https://cleartax.in/s/gst-hsn-lookup)
gst_total_tax double total GST applicable for the shipment
sgst_tax_rate integer tax percent applicable for sgst for the shipment (optional)
sgst_amount double amount applicable for sgst for the shipment (optional)
igst_tax_rate integer tax percent applicable for igst for the shipment (optional)
igst_amount double amount applicable for igst for the shipment (optional)
cgst_tax_rate integer tax percent applicable for cgst for the shipment (optional)
cgst_amount double amount applicable for cgst for the shipment (optional)
consignee_gstin string GST No of consignee (compulsory for B2B shipments)
invoice_reference string invoice number for the shipment
Order type:
Parameter Type Description
order_type character COD/PREPAID
cod_value: if order_type = COD double cod_value should be greater than 0
cod_value: if order_type = PREPAID double cod_value should be equal to 0
Courier Partner:
Parameter Type Description
courier_partner integer ID of courier partner for which the order is to be placed.

List of courier partners is present at: http://track.clickpost.in/courier_partner

Compulsory fields for RVP order creation:
Parameter Type Description
rvp_reason character stating the reason for Reverse Pickup
delivery_type character For Reverse Pickup, the value of this field should be “RVP”
Optional field for NuvoEx RVP (Doorstep QC):
Parameter Type Description
qc_type character pass “doorstep” if you want reverse pickup to be done as doorstep quality check as leave it blank
image_urls character add this field in items array for each item. value will be comma seperated url strings without spaces.
cat character category of product for qc questions to be asked at doorstep. To be passed in items array for each item object
sub_cat character sub category of product for qc questions to be asked at doorstep. To be passed in items array for each item object
Optional field for Bluedart (Critical / Time defined delivery service):
Parameter Type Description
service_type character If you are using Critical shipment service, Time Defined delivery Service (10:30 am or 12 noon next day), Please pass this field with values:
  1. C: Critical Shipment
  2. T: Time defined delivery on or before 10:30
  3. N: Time defined delivery on or before 12

Response Explanation:

Response Object has two parts:

  1. meta: stores information about the API, success or failure
    1. “success”: true/false, tells whether the order was created or not
    2. “message”: SUCCESS in case order was created successfully, else returns error
    3. “status”:
      • 200 if the order is created successfully,
      • 400 if there is a bad request encountered: errors will be present in “message”
  2. result:
    1. reference_number: reference number provided in the post data
    2. waybill: waybill generated by courier partner for the shipment
    3. label: AWS link of the label generated for the shipment (Not generated for RVP shipments) Additional fields for Bluedart:
    4. DestinationLocation: 3 digit destination location code needed by Bluedart on shipping label
    5. DestinationArea: 3 digit destination area code needed by Bluedart on shipping label

Order Creation V3 API

URL to hit:

https://www.clickpost.in/api/v3/create-order/?username=<user-name>&key=<api-key>
Headers: {'Content-type': 'application/json'}

(Username/key needs to be replaced with the username/key provided to you)

Example: POST Body (COD Shipment)

{
    "pickup_info": {
        "pickup_state": "DELHI",
        "pickup_address": "A-228 top floor kalkaji New Delhi ",
        "email": "deepanshu.kartikey@pyck.in",
        "pickup_time": "2017-05-20T12:00:00Z",
        "pickup_pincode": "110019",
        "pickup_city": "DELHI",
        "tin": "120349483",
        "pickup_name": "Deepanshu",
        "pickup_country": "IN",
        "pickup_phone": "9816691388"
    },
    "drop_info": {
        "drop_address": "F-68 third floor kalkaji New Delhi ",
        "drop_phone": "9717732407",
        "drop_country": "IN",
        "drop_state": "DELHI",
        "drop_pincode": "110019",
        "drop_city": "Delhi",
        "drop_name": "Prashant"
    },
    "shipment_details": {
        "height": 12,
        "order_type": "COD",
        "invoice_value": 200,
        "invoice_number": "INV123",
        "invoice_date": "2015-12-27",
        "reference_number": "Order-1232",
        "length": 10,
        "breadth": 10,
        "weight": 100,
        "items": [
            {
                "price": 200,
                "description": "item1",
                "additional": {
                    "length": 10,
                    "height": 10,
                    "breadth": 10,
                    "weight": 100,
                    "images": "http://sample-file1.jpg,http://sample-file2.jpg"
                },
                "quantity": 1,
                "sku": "XYZ1"
            }
        ],
        "cod_value": 200,
        "courier_partner": 3
    },
    "gst_info": {
        "seller_gstin": "1234",
        "taxable_value": 100,
        "ewaybill_serial_number": "2345677",
        "is_seller_registered_under_gst": false,
        "sgst_tax_rate": 100,
        "place_of_supply": "DELHI",
        "gst_discount": 0,
        "hsn_code": "1234",
        "sgst_amount": 100,
        "enterprise_gstin": "13",
        "gst_total_tax": 100,
        "igst_amount": 100,
        "cgst_amount": 200,
        "gst_tax_base": 200,
        "consignee_gstin": "1233",
        "igst_tax_rate": 100,
        "invoice_reference": "1234",
        "cgst_tax_rate": 100
    },
    "additional": {
        "label": true,
        "return_info": {
            "pincode": "110019",
            "address": "Test Address top floor kalkaji NewDelhi ",
            "state": "DELHI",
            "phone": "8080808080",
            "name": "Deepanshu",
            "city": "DELHI",
            "country": "IN"
        },
        "awb_number ": "43062728295",
        "delivery_type": "FORWARD",
        "async": true,
        "gst_number" : "21313",
        "account_code": "ecom surface"
    }
}

Response

{
  "meta": {
    "message": "Order Placed Successfully",
    "status": 200,
    "success": true
  },
  "result": {
    "reference_number": "ASDF1234",
    "waybill": "785578015860",
    "label": "https://pyck-res-bucket.s3.amazonaws.com:443/fedex/2017-02-11/785578015860.pdf"
  }
}

Example: POST Body (PREPAID Shipment)

{
    "drop_info": {
        "drop_address": "F-68 third floor kalkaji New Delhi ",
        "drop_phone": "9717732407",
        "drop_country": "IN",
        "drop_state": "DELHI",
        "drop_pincode": "110019",
        "drop_city": "Delhi",
        "drop_name": "Prashant"
    },
    "additional": {
        "label ": true,
        "return_info": {
            "pincode": "110019",
            "address": "Test Address top floor kalkaji NewDelhi ",
            "state": "DELHI",
            "phone": "8080808080",
            "name": "Deepanshu",
            "city": "DELHI",
            "country": "IN"
        },
        "awb_number ": "43062728295",
        "delivery_type": "FORWARD",
        "async": true,
        "gst_number" : "21313",
        "account_code": "ecom surface"
    },
    "pickup_info": {
        "pickup_state": "DELHI",
        "pickup_address": "A-228 top floor kalkaji New Delhi ",
        "email": "deepanshu.kartikey@pyck.in",
        "pickup_time": "2017-05-20T12:00:00Z",
        "pickup_pincode": "110019",
        "pickup_city": "DELHI",
        "tin": "120349483",
        "pickup_name": "Deepanshu",
        "pickup_country": "IN",
        "pickup_phone": "9816691388"
    },
    "gst_info": {
        "seller_gstin": "1234",
        "taxable_value": 100,
        "ewaybill_serial_number": "2345677",
        "is_seller_registered_under_gst": false,
        "sgst_tax_rate": 100,
        "place_of_supply": "DELHI",
        "gst_discount": 0,
        "hsn_code": "1234",
        "sgst_amount": 100,
        "enterprise_gstin": "13",
        "gst_total_tax": 100,
        "igst_amount": 100,
        "cgst_amount": 200,
        "gst_tax_base": 200,
        "consignee_gstin": "1233",
        "igst_tax_rate": 100,
        "invoice_reference": "1234",
        "cgst_tax_rate": 100
    },
    "shipment_details": {
        "height": 12,
        "order_type": "PREPAID",
        "invoice_value": 200,
        "invoice_number": "INV123",
        "invoice_date": "2015-12-27",
        "reference_number": "Order-1232",
        "length": 10,
        "breadth": 10,
        "weight": 100,
        "items": [
            {
                "price": 200,
                "description": "item1",
                "additional": {
                    "length": 10,
                    "height": 10,
                    "breadth": 10,
                    "weight": 100,
                    "images": "http://sample-file1.jpg,http://sample-file2.jpg"
                },
                "quantity": 1,
                "sku": "XYZ1"
            }
        ],
        "cod_value": 200,
        "courier_partner": 3
    }
}

The create order API allows uploading the package details (manifest information) into the courier partner’s system and returns a label generated by them. You can create single order; errors/warnings will be highlighted in the response.

Please note, in case of any validation failure - order will not get created. Please wait for 8 seconds before you reject a rest-request for latency.

Async flag in additional object allows users to choose if order need to be generated in real time or in background. For bulk order creation async=true is recommended. Orders data in case of async is provided via webhooks.

The API is a HTTP POST request to: https://www.clickpost.in/api/v3/create-order/ where output format is json.

Listed below are the parameters:

URL parameters:

Parameter Type Description
username character User name provided to you
key character API key provided to you

POST Parameters:

Format: JSON

Compulsory Fields:

Pickup information
Parameter Type Description
pickup_name character maximum length of 100 characters
pickup_phone integer 10/11 digit phone number
pickup_pincode integer 6 digit pincode
pickup_address character maximum length of 500 characters
pickup_time character (ISO Format: example 2015-12-10T12:00:00Z)
pickup_city character pickup city name, maximum length 200 characters
pickup_state character pickup state name, maximum length 200 characters
pickup_country character pickup country name, maximum length 100 characters i. email: email id to be sent to courier partner for this shipment
vendor_code character (optional) vendor code of pickup location. If this field is not provided, Clickpost will generate vendor code for the pickup location
Drop Information
Parameter Type Description
drop_name character maximum length of 100 characters
drop_address character maximum length of 500 characters
drop_phone integer 10/11 digit phone number
drop_pincode integer 6 digit pincode
drop_city character drop city name, maximum length 200 characters
drop_state character drop state name, maximum length 200 characters
drop_country character drop country name, maximum length 200 characters
drop_email character (optional) email of the customer
Return Information
Parameter Type Description
name character maximum length of 100 characters
address character maximum length of 500 characters
phone integer 10/11 digit phone number
pincode integer 6 digit pincode
city character drop city name, maximum length 200 characters
state character drop state name, maximum length 200 characters
country character drop country name, maximum length 200 characters
email character (optional) email of the customer
Shipment details
Parameter Type Description
items List Json list with multiple item objects in it. Each item object should have
price double price of the item
description character Item description
sku character SKU unit name of item
quantity Integer number of item pieces
invoice_value decimal/float/integer value
invoice_number character string of length 50 characters
invoice_date character (Format: YYYY-MM-DD, example: 2015-12-25 for 25th December 2015)
reference_number character reference number to tag the order with your order id.
length integer in cm
breadth integer in cm
height integer in cm
weight integer grams
tin character TIN number of seller (Now GST No)
images character comma separated images of the item
GST Information
Parameter Type Description
enterprise_gstin string GST No of enterprise shipping the shipment
seller_gstin string GST No of seller sending the shipment (will be different from above for marketplaces)
taxable_value double taxable amount for GST (generally invoice_value of shipment)
ewaybill_serial_number string ewaybill for the shipment (optional)
is_seller_registered_under_gst boolean True / False, depending on whether you are registered for GST
place_of_supply string place of supply of service/product (https://cleartax.in/s/gst-state-code-jurisdiction)
gst_discount double discount given under gst, if any (optional)
hsn_code string HSN code for the product shipped (You may search for HSN https://cleartax.in/s/gst-hsn-lookup)
gst_total_tax double total GST applicable for the shipment
sgst_tax_rate integer tax percent applicable for sgst for the shipment (optional)
sgst_amount double amount applicable for sgst for the shipment (optional)
igst_tax_rate integer tax percent applicable for igst for the shipment (optional)
igst_amount double amount applicable for igst for the shipment (optional)
cgst_tax_rate integer tax percent applicable for cgst for the shipment (optional)
cgst_amount double amount applicable for cgst for the shipment (optional)
consignee_gstin string GST No of consignee (compulsory for B2B shipments)
invoice_reference string invoice number for the shipment
Order type:
Parameter Type Description
order_type character COD/PREPAID/EXCHANGE
cod_value double if order_type = COD, cod_value should be greater than 0, if order_type = PREPAID, cod_value should be equal to 0
Courier Partner:
Parameter Type Description
courier_partner integer ID of courier partner for which the order is to be placed.
account_code character (optional) in case you have multiple accounts for a courier partner, code of account saved in clickpost is to be passed in additional object

List of courier partners is present at: http://track.clickpost.in/courier_partner

additional object:
Parameter Type Description
label boolean true or false based upon if label need to be generated
return_info object return info object information if needed
awb_number character awb number if available
delivery_type character FORWARD or RVP
rvp_reason character rvp reason if order is for reverse pickup
priority character “NORMAL” or any other priority for order
async boolean for real time orders false and true if order need to generated in background
gst_number character gst number for tax purposes
Compulsory fields for RVP order creation:
Parameter Type Description
rvp_reason character stating the reason for Reverse Pickup
delivery_type character For Reverse Pickup, the value of this field should be “RVP”
Optional field for NuvoEx RVP (Doorstep QC):
Parameter Type Description
qc_type character pass “doorstep” if you want reverse pickup to be done as doorstep quality check as leave it blank
image_urls character add this field in items array for each item. value will be comma seperated url strings without spaces.
cat character category of product for qc questions to be asked at doorstep. To be passed in items array for each item object
sub_cat character sub category of product for qc questions to be asked at doorstep. To be passed in items array for each item object
Optional field for Bluedart (Critical / Time defined delivery service):
Parameter Type Description
service_type character If you are using Critical shipment service, Time Defined delivery Service (10:30 am or 12 noon next day), Please pass this field with values:
  1. C: Critical Shipment
  2. T: Time defined delivery on or before 10:30
  3. N: Time defined delivery on or before 12

Response Explanation:

Response Object has two parts:

  1. meta: stores information about the API, success or failure
    1. “success”: true/false, tells whether the order was created or not
    2. “message”: SUCCESS in case order was created successfully, else returns error
    3. “status”:
      • 200 if the order is created successfully,
      • 400 if there is a bad request encountered: errors will be present in “message”
  2. result:
    1. reference_number: reference number provided in the post data
    2. waybill: waybill generated by courier partner for the shipment
    3. label: AWS link of the label generated for the shipment (Not generated for RVP shipments) Additional fields for Bluedart:
    4. DestinationLocation: 3 digit destination location code needed by Bluedart on shipping label
    5. DestinationArea: 3 digit destination area code needed by Bluedart on shipping label

Order Creation Multi Model API

URL to hit:

https://www.clickpost.in/api/v3/create-order/?username=<user-name>&key=<api-key>
Headers: {'Content-type': 'application/json'}

(Username/key needs to be replaced with the username/key provided to you)

Example: POST Body

{
    "pickup_info": {
        "email": "mrigendrasinha@gmail.com",
        "pickup_name": "Test Pickup Name",
        "pickup_phone": "8080808080",
        "pickup_address": "No.5, Pycroft Garden Road, Mohammed Sathak Trust, 5th Floor, Nungambakkam",
        "pickup_pincode": "110016",
        "pickup_city": "DELHI",
        "pickup_state": "TAMILNADU",
        "pickup_country": "IN",
        "pickup_time": "2017-11-15T09:25:00.000Z",
        "tin": "33030721658"
    },
    "drop_info": {
        "drop_name": "Test Drop Name",
        "drop_phone": "8080808080",
        "drop_address": "No.5, Pycroft Garden Road, Mohammed Sathak Trust, 5th Floor, Nungambakkam",
        "drop_pincode": "223045",
        "drop_city": "BANGLORE",
        "drop_state": "TAMILNADU",
        "drop_country": "IN"
    },
    "shipment_details": {
        "courier_partner": 5,
        "height": 1,
        "length": 1,
        "breadth": 1,
        "weight": 10,
        "reference_number": "RE1234",
        "order_type": "PREPAID",
        "cod_value": 0,
        "items": [{
            "price": 1000,
            "description": "dfdsfsd",
            "sku": "asasa",
            "quantity": 1,
            "weight": 1
        }],
        "invoice_number": "INV123",
        "invoice_value": 1000,
        "invoice_date": "2017-11-11"
    },
    "gst_info": {
        "seller_gstin": "1234",
        "taxable_value": 100,
        "ewaybill_serial_number": "2345677",
        "is_seller_registered_under_gst": false,
        "sgst_tax_rate": 100,
        "place_of_supply": "DELHI",
        "gst_discount": 0,
        "hsn_code": "1234",
        "sgst_amount": 100,
        "enterprise_gstin": "13",
        "gst_total_tax": 100,
        "igst_amount": 100,
        "cgst_amount": 200,
        "gst_tax_base": 200,
        "consignee_gstin": "1233",
        "igst_tax_rate": 100,
        "invoice_reference": "1234",
        "cgst_tax_rate": 100
    },
    "additional": {
        "data_validation": true,
        "label": true,
        "multi_modal": {
            "last_mile_courier_partner": 5,
            "last_mile_pickup_time": "2017-11-15 2:56 PM",
            "last_mile_order_type": "PREPAID",
            "transit_info": {
                "transit_city": "CHANDIGARH",
                "transit_state": "CHANDIGARH",
                "transit_phone": "8080808080",
                "transit_name": "Mr.Arun",
                "transit_pincode": "160017",
                "transit_address": "229A, 2nd Floor, Elante Mall, Industrial Area,Phase-1",
                "transit_country": "IN",
                "transit_email": "a@a.com"
            }
        }
    }
}

Response

{
    "order_id": 76703,
    "meta": {
        "status": 200,
        "success": true,
        "message": "Order Placed Successfully"
    },
    "result": {
        "reference_number": "RE1234",
        "DestinationArea": "CAR",
        "waybill": "69573426016",
        "label1": "https://pyck-res-bucket.s3.amazonaws.com:443/bluedart/2017-11-30/69573426016.pdf",
        "waybill1": "69573426016",
        "label": "https://pyck-res-bucket.s3.amazonaws.com:443/bluedart/2017-11-30/69573426016.pdf",
        "DestinationLocation": "CMM"
    },
    "tracking_id": 3475042
}

The create order Multi Model API allows uploading the package details (manifest information) into the courier partner’s system for multi hop shipment (2 courier company do the delivery of shipment) and returns a label generated by them. You can create single order; errors/warnings will be highlighted in the response.

Please note, in case of any validation failure - order will not get created. Please wait for 8 seconds before you reject a rest-request for latency.

The API is a HTTP POST request to: https://www.clickpost.in/api/v3/create-order/ where output format is json.

Listed below are the parameters:

URL parameters:

Parameter Type Description
Username character User name provided to you
key character API key provided to you

POST Parameters:

Format: JSON

Compulsory Fields:

Pickup information
Parameter Type Description
pickup_name character maximum length of 100 characters
pickup_phone integer 10/11 digit phone number
pickup_pincode integer 6 digit pincode
pickup_address character maximum length of 500 characters
pickup_time character (ISO Format: example 2015-12-10T12:00:00Z)
pickup_city character pickup city name, maximum length 200 characters
pickup_state character pickup state name, maximum length 200 characters
pickup_country character pickup country name, maximum length 100 characters i. email: email id to be sent to courier partner for this shipment
vendor_code character (optional) vendor code of pickup location. If this field is not provided, Clickpost will generate vendor code for the pickup location
Drop Information
Parameter Type Description
drop_name character maximum length of 100 characters
drop_address character maximum length of 500 characters
drop_phone integer 10/11 digit phone number
drop_pincode integer 6 digit pincode
drop_city character drop city name, maximum length 200 characters
drop_state character drop state name, maximum length 200 characters
drop_country character drop country name, maximum length 200 characters
drop_email character (optional) email of the customer
Return Information
Parameter Type Description
name character maximum length of 100 characters
address character maximum length of 500 characters
phone integer 10/11 digit phone number
pincode integer 6 digit pincode
city character drop city name, maximum length 200 characters
state character drop state name, maximum length 200 characters
country character drop country name, maximum length 200 characters
email character (optional) email of the customer
Shipment details
Parameter Type Description
items List Json list with multiple item objects in it. Each item object should have
price double price of the item
description character Item description
sku character SKU unit name of item
quantity Integer number of item pieces
invoice_value decimal/float/integer value
invoice_number character string of length 50 characters
invoice_date character (Format: YYYY-MM-DD, example: 2015-12-25 for 25th December 2015)
reference_number character reference number to tag the order with your order id.
length integer in cm
breadth integer in cm
height integer in cm
weight integer grams
tin character TIN number of seller (Now GST No)
GST Information
Parameter Type Description
enterprise_gstin string GST No of enterprise shipping the shipment
seller_gstin string GST No of seller sending the shipment (will be different from above for marketplaces)
taxable_value double taxable amount for GST (generally invoice_value of shipment)
ewaybill_serial_number string ewaybill for the shipment (optional)
is_seller_registered_under_gst boolean True / False, depending on whether you are registered for GST
place_of_supply string place of supply of service/product (https://cleartax.in/s/gst-state-code-jurisdiction)
gst_discount double discount given under gst, if any (optional)
hsn_code string HSN code for the product shipped (You may search for HSN https://cleartax.in/s/gst-hsn-lookup)
gst_total_tax double total GST applicable for the shipment
sgst_tax_rate integer tax percent applicable for sgst for the shipment (optional)
sgst_amount double amount applicable for sgst for the shipment (optional)
igst_tax_rate integer tax percent applicable for igst for the shipment (optional)
igst_amount double amount applicable for igst for the shipment (optional)
cgst_tax_rate integer tax percent applicable for cgst for the shipment (optional)
cgst_amount double amount applicable for cgst for the shipment (optional)
consignee_gstin string GST No of consignee (compulsory for B2B shipments)
invoice_reference string invoice number for the shipment
Order type:
Parameter Type Description
order_type character COD/PREPAID
cod_value: if order_type = COD double cod_value should be greater than 0
cod_value: if order_type = PREPAID double cod_value should be equal to 0
Courier Partner:
Parameter Type Description
courier_partner integer ID of courier partner for which the order is to be placed.

List of courier partners is present at: http://track.clickpost.in/courier_partner

Compulsory fields in additional object:
Parameter Type Description
label boolean true or false based upon if label need to be generated
rvp_reason character rvp reason if order is for reverse pickup
priority character “NORMAL” or any other priority for order
return_info object return info object information if needed
awb_number character awb number if available
delivery_type character FORWARD or any other order type
async boolean for real time orders false and true if order need to generated in background
gst_number character gst number for tax purposes
Transit address detail need to be passed in additional object:
Parameter Type Description
last_mile_courier_partner int courier company id provided by us
last_mile_pickup_time timestamp pick up time for in transit hop (for last mile courier company)
last_mile_order_type character order type cod or prepaid for last mile
transit_city character transit city from where last mile pick the order for delivery
transit_state character transit state from where last mile pick the order for delivery
transit_phone int transit phone no
transit_name character person name from whol last mile picks the order
transit_pincode int pin code of location for last mile to pick
transit_address character address for last mile courier company to pick the order
transit_country character country code for the address
transit_email character email id for reference to pick order for last mile
Compulsory fields for RVP order creation:
Parameter Type Description
rvp_reason character stating the reason for Reverse Pickup
delivery_type character For Reverse Pickup, the value of this field should be “RVP”
Optional field for NuvoEx RVP (Doorstep QC):
Parameter Type Description
qc_type character pass “doorstep” if you want reverse pickup to be done as doorstep quality check as leave it blank
image_urls character add this field in items array for each item. value will be comma seperated url strings without spaces.
cat character category of product for qc questions to be asked at doorstep. To be passed in items array for each item object
sub_cat character sub category of product for qc questions to be asked at doorstep. To be passed in items array for each item object
Optional field for Bluedart (Critical / Time defined delivery service):
Parameter Type Description
service_type character If you are using Critical shipment service, Time Defined delivery Service (10:30 am or 12 noon next day), Please pass this field with values:
  1. C: Critical Shipment
  2. T: Time defined delivery on or before 10:30
  3. N: Time defined delivery on or before 12

Response Explanation:

Response Object has two parts:

  1. meta: stores information about the API, success or failure
    1. “success”: true/false, tells whether the order was created or not
    2. “message”: SUCCESS in case order was created successfully, else returns error
    3. “status”:
      • 200 if the order is created successfully,
      • 400 if there is a bad request encountered: errors will be present in “message”
  2. result:
    1. reference_number: reference number provided in the post data
    2. waybill: waybill generated by courier partner for the shipment
    3. label: AWS link of the label generated for the shipment (Not generated for RVP shipments) Additional fields for Bluedart:
    4. DestinationLocation: 3 digit destination location code needed by Bluedart on shipping label
    5. DestinationArea: 3 digit destination area code needed by Bluedart on shipping label
    6. waybill1: another waybill generated by courier partner for the shipment
    7. label1: Another AWS link of the label generated for the shipment (Not generated for RVP shipments)

Order Creation B2B API

URL to hit:

https://www.clickpost.in/api/v1/create-order/?username=<user-name>&key=<api-key>
Headers: {'Content-type': 'application/json'}

(Username/key needs to be replaced with the username/key provided to you)

Example: POST Body

{
    "breadth": 10,
    "drop_name": "Rahul",
    "order_type": "PREPAID",
    "invoice_date": "2015-12-27",
    "priority": "NORMAL",
    "pickup_pincode": "110008",
    "drop_city": "DELHI",
    "reference_number": "ad123",
    "drop_address": "L-19B, third Floor Malviya Nagar, New Delhi",
    "courier_partner": 1,
    "gst_info": {
        "is_seller_registered_under_gst": false,
        "place_of_supply": "DELHI",
        "invoice_reference": "1234",
        "gst_tax_base": 200,
        "hsn_code": "1234",
        "gst_discount": 0,
        "sgst_tax_rate": 100,
        "igst_amount": 100,
        "taxable_value": 100,
        "sgst_amount": 100,
        "seller_gstin": "1234",
        "gst_total_tax": 100,
        "ewaybill_serial_number": "2345677",
        "consignee_gstin ": "1233",
        "enterprise_gstin": "13",
        "igst_tax_rate": 100,
        "cgst_amount": 200,
        "cgst_tax_rate": 100
    },
    "tin": "120349483",
    "email": "founders@clickpost.in",
    "return_info": {
        "state": "DELHI",
        "country": "IN",
        "city": "DELHI",
        "phone": 8080808080,
        "name": "Deepanshu",
        "pincode": "110019",
        "address": "Test Address top floor Nehru Place New Delhi "
    },
    "pickup_phone": "8080808080",
    "drop_state": "DELHI",
    "pickup_time": "2017-11-23T12:00:00Z",
    "pickup_state": "Haryana",
    "drop_pincode": "110017",
    "drop_country": "IN",
    "weight": 100,
    "length": 10,
    "invoice_value": 1000,
    "height": 10,
    "drop_phone": "8080808080",
    "pickup_name": "Deepanshu",
    "awb_number": "553889122",
    "data_validation": false,
    "pickup_country": "IN",
    "invoice_number": "INV-234/3",
    "pickup_address": "A-228 top floor near XYZ, Gurgaon",
    "pickup_city": "Gurgaon",
    "cod_value": 0,
    "shipment_type": "MPS",
    "items": [{
        "length": 10,
        "breadth": 15,
        "sku": "XYZ1",
        "price": 200,
        "height": 17,
        "weight": 100,
        "description": "bottle",
        "quantity": 1
    }]
}

Response

{
  "meta": {
    "message": "Order Placed Successfully",
    "status": 200,
    "success": true
  },
  "result": {
    "reference_number": "ASDF1234",
    "waybill": "785578015860",
    "label": "https://pyck-res-bucket.s3.amazonaws.com:443/fedex/2017-02-11/785578015860.pdf"
  }
}

The create order B2B API allows uploading the package details (manifest information) for multi piece shipment into the courier partner’s system and returns a label generated by them. You can create single order; errors/warnings will be highlighted in the response.

Details for multiple shipments needs to passed in items array during object creation. This array is treated as multiple shipments if shipment_type is MPS.

Please note, in case of any validation failure - order will not get created. Please wait for 8 seconds before you reject a rest-request for latency.

The API is a HTTP POST request to: https://www.clickpost.in/api/v1/create-order/ where output format is json.

Listed below are the parameters:

URL parameters:

Parameter Type Description
Username character User name provided to you
key character API key provided to you

POST Parameters:

Format: JSON

Compulsory Fields:

Pickup information
Parameter Type Description
pickup_name character maximum length of 100 characters
pickup_phone integer 10/11 digit phone number
pickup_pincode integer 6 digit pincode
pickup_address character maximum length of 500 characters
pickup_time character (ISO Format: example 2015-12-10T12:00:00Z)
pickup_city character pickup city name, maximum length 200 characters
pickup_state character pickup state name, maximum length 200 characters
pickup_country character pickup country name, maximum length 100 characters i. email: email id to be sent to courier partner for this shipment
vendor_code character (optional) vendor code of pickup location. If this field is not provided, Clickpost will generate vendor code for the pickup location
Drop Information
Parameter Type Description
drop_name character maximum length of 100 characters
drop_address character maximum length of 500 characters
drop_phone integer 10/11 digit phone number
drop_pincode integer 6 digit pincode
drop_city character drop city name, maximum length 200 characters
drop_state character drop state name, maximum length 200 characters
drop_country character drop country name, maximum length 200 characters
drop_email character (optional) email of the customer
Return Information
Parameter Type Description
name character maximum length of 100 characters
address character maximum length of 500 characters
phone integer 10/11 digit phone number
pincode integer 6 digit pincode
city character drop city name, maximum length 200 characters
state character drop state name, maximum length 200 characters
country character drop country name, maximum length 200 characters
email character (optional) email of the customer
Shipment details
Parameter Type Description
items List Json list with multiple item objects in it. Each item object should have
price double price of the item
description character Item description
sku character SKU unit name of item
quantity Integer number of item pieces
invoice_value decimal/float/integer value
invoice_number character string of length 50 characters
invoice_date character (Format: YYYY-MM-DD, example: 2015-12-25 for 25th December 2015)
reference_number character reference number to tag the order with your order id.
length integer in cm
breadth integer in cm
height integer in cm
weight integer grams
tin character TIN number of seller
shipment_type character MPS (Compulsory)
GST Information
Parameter Type Description
enterprise_gstin string GST No of enterprise shipping the shipment
seller_gstin string GST No of seller sending the shipment (will be different from above for marketplaces)
taxable_value double taxable amount for GST (generally invoice_value of shipment)
ewaybill_serial_number string ewaybill for the shipment (optional)
is_seller_registered_under_gst boolean True / False, depending on whether you are registered for GST
place_of_supply string place of supply of service/product (https://cleartax.in/s/gst-state-code-jurisdiction)
gst_discount double discount given under gst, if any (optional)
hsn_code string HSN code for the product shipped (You may search for HSN https://cleartax.in/s/gst-hsn-lookup)
gst_total_tax double total GST applicable for the shipment
sgst_tax_rate integer tax percent applicable for sgst for the shipment (optional)
sgst_amount double amount applicable for sgst for the shipment (optional)
igst_tax_rate integer tax percent applicable for igst for the shipment (optional)
igst_amount double amount applicable for igst for the shipment (optional)
cgst_tax_rate integer tax percent applicable for cgst for the shipment (optional)
cgst_amount double amount applicable for cgst for the shipment (optional)
consignee_gstin string GST No of consignee (compulsory for B2B shipments)
invoice_reference string invoice number for the shipment
Order type:
Parameter Type Description
order_type character COD/PREPAID
cod_value: if order_type = COD double cod_value should be greater than 0
cod_value: if order_type = PREPAID double cod_value should be equal to 0
Courier Partner:
Parameter Type Description
courier_partner integer ID of courier partner for which the order is to be placed.

List of courier partners is present at: http://track.clickpost.in/courier_partner

Compulsory fields for RVP order creation:
Parameter Type Description
rvp_reason character stating the reason for Reverse Pickup
delivery_type character For Reverse Pickup, the value of this field should be “RVP”
Optional field for NuvoEx RVP (Doorstep QC):
Parameter Type Description
qc_type character pass “doorstep” if you want reverse pickup to be done as doorstep quality check as leave it blank
image_urls character add this field in items array for each item. value will be comma seperated url strings without spaces.
cat character category of product for qc questions to be asked at doorstep. To be passed in items array for each item object
sub_cat character sub category of product for qc questions to be asked at doorstep. To be passed in items array for each item object
Optional field for Bluedart (Critical / Time defined delivery service):
Parameter Type Description
service_type character If you are using Critical shipment service, Time Defined delivery Service (10:30 am or 12 noon next day), Please pass this field with values:
  1. C: Critical Shipment
  2. T: Time defined delivery on or before 10:30
  3. N: Time defined delivery on or before 12

Response Explanation:

Response Object has two parts:

  1. meta: stores information about the API, success or failure
    1. “success”: true/false, tells whether the order was created or not
    2. “message”: SUCCESS in case order was created successfully, else returns error
    3. “status”:
      • 200 if the order is created successfully,
      • 400 if there is a bad request encountered: errors will be present in “message”
  2. result:
    1. reference_number: reference number provided in the post data
    2. waybill: waybill generated by courier partner for the shipment
    3. label: AWS link of the label generated for the shipment (Not generated for RVP shipments) Additional fields for Bluedart:
    4. DestinationLocation: 3 digit destination location code needed by Bluedart on shipping label
    5. DestinationArea: 3 digit destination area code needed by Bluedart on shipping label

Track Order

Register for Tracking Service

POST request. URL:

https://www.clickpost.in/api/v1/register-service/
Headers: {'Content-type': 'application/json'}

Payload

{
  "key":"---Your Clickpost API KEY--",
  "service_id":2
}

Response

{
  "message": "SUCCESS",
  "status_code": 200,
  "success": true
}

Fields Explanation:

Parameter Type Description
key (required) character this is the API Key provided to you
service_id (required) Integer this is the Integer id of service for which you want to register

Service ID

ID Use
1 For placing orders on courier partner
2 For Tracking Shipments on Clickpost
3 For using Clickpost Recommendation Engine

Register an AWB for tracking

POST request. URL:

https://www.clickpost.in/api/v2/tracking/awb-register/
Headers: {'Content-type': 'application/json'}

Sample Payload

{
  "waybill": "ABCDRESDEFGHIJKL1257679",
  "cp_id": 1,
  "key": "42d42a34-ae09-4693-b20c-ae2624218a329",
  "account_code": "Fedex Domestic",

  "consumer_details": {
          "name": "Prashant Gupta",
          "phone": "8080808080",
          "email": "support@clickpost.in"
  },
  "shipment_info": {
          "item": "Shirt",
          "order_type": "COD",
          "invoice_value": 1000,
          "reference_number": "123XYZ",
          "length": 10,
          "height": 10,
          "weight": 10,
          "breadth": 10,
          "drop_pin_code": "110019",
          "pickup_pin_code": "110017",
          "delivery_type": "FORWARD",
          "cod_amount": 1000.10,
          "drop_address": "Roots hacker Home, R 28, Second Floor, Nehru Enclace, Opposite Nehru Place, New Delhi 110019",
          "additional": {
                    "items": [
                        {
                            "sku": "XYZ1",
                            "description": "item1",
                            "quantity": 1,
                            "additional": {
                                "price": 200,
                                "length": 10,
                                "height": 10,
                                "breadth": 10,
                                "weight": 100
                            }
                        }
                    ]
                  }
  },
  "additional": {
    "order_date": "2017-02-14T18:00:00+05:30",
    "ship_date": "2017-02-14T23:00:00+05:30"
  }
}

Response

{
    "meta": {
        "message": "SUCCESS",
        "status": 200,
        "success": true
    },
    "result": {
            "consumer_details": {
            "id": 1
        },
            "shipment_info": {
            "id": 1
        },
        "tracking_id": 1188264
    }
}

Fields Explanation

Compulsory:

Parameter Type Description
key (required) character this is the API Key
waybill (required) character this is/are comma separated waybill numbers for which the status is required
cp_id (required) integer courier_partner_id as specified on page 1 of this documentation
account_code (optional) string account code in case you have multiple accounts for same courier partner

Optional:

consumer_details(optional): In case you to send notifications to your customers via mail / sms, please pass information in this object:

Parameter Type Description
name character (250 chars) end customer name, who will receive the shipment, this will be used to personalize the SMS / email sent to the customer
phone_number 10/11 characters customer phone number on which SMS is to be sent.
email character (150 chars) Email address of the customer, on which email is to be sent.

shipment_info (optional): shipment information for rich analytics on your data:

Parameter Type Description
item character (500 chars) name of item sent to the customer
order_type character either COD or PREPAID
invoice_value float shipment invoice value
reference_number character (len: 100) order_id or reference number to be shared with end customer
length integer in cm
breadth integer in cm
height integer in cm
weight integer in grams
drop_pincode character 6 digit pincode of drop location
pickup_pincode character 6 digit pincode of pickup location
delivery_type character either FORWARD / RVP
cod_amount float field COD value to be collected from customer, float field
drop_address character (500 chars) drop address of the shipment
additional object optional field which can have additional information related to items like description, images for return management solution (easier for end customer to select which product to return)

additional (optional): extra information about shipment used to power tracking page:

Parameter Type Description
order_date character timestamp when the order was placed
ship_date character timestamp when order was ready to ship

Tracking AWB Using Polling

URL

https://www.clickpost.in/api/v2/track-order/?username=testuser&key=2e9b19ac-8e1f- 41ac-a35b-4cd23f41ae17&waybill=3515341&cp_id=10

Headers: {'Content-type': 'application/json'}

Response

{
    "meta": {
        "status": 200,
        "message": "SUCCESS",
        "success": true
    },
    "result": {
        "69590558973": {
            "latest_status": {
                "location": "TOLICHOWKI E-TAIL CENTRE",
                "clickpost_status_code": 8,
                "timestamp": "2018-03-16 18:56:00",
                "clickpost_status_description": "Delivered",
                "status": "SHIPMENT DELIVERED",
                "remark": "SHIPMENT DELIVERED"
            },
            "scans": [
                {
                    "location": "TOLICHOWKI E-TAIL CENTRE",
                    "clickpost_status_code": 8,
                    "timestamp": "2018-03-16 18:56:00",
                    "checkpoint_id": 112650092,
                    "clickpost_status_description": "Delivered",
                    "status": "SHIPMENT DELIVERED",
                    "tracking_id": 8241453,
                    "remark": "SHIPMENT DELIVERED"
                },
                {
                    "location": "TOLICHOWKI E-TAIL CENTRE",
                    "clickpost_status_code": 6,
                    "timestamp": "2018-03-16 13:11:00",
                    "checkpoint_id": 112584864,
                    "clickpost_status_description": "OutForDelivery",
                    "status": "SHIPMENT OUT FOR DELIVERY",
                    "tracking_id": 8241453,
                    "remark": "SHIPMENT OUT FOR DELIVERY"
                },
                {
                    "location": "TOLICHOWKI E-TAIL CENTRE",
                    "clickpost_status_code": 5,
                    "timestamp": "2018-03-16 11:37:00",
                    "checkpoint_id": 112584868,
                    "clickpost_status_description": "InTransit",
                    "status": "SHIPMENT ARRIVED",
                    "tracking_id": 8241453,
                    "remark": "SHIPMENT ARRIVED"
                },
                {
                    "location": "TOLICHOWKI E-TAIL CENTRE",
                    "clickpost_status_code": 5,
                    "timestamp": "2018-03-16 11:22:00",
                    "checkpoint_id": 112584871,
                    "clickpost_status_description": "InTransit",
                    "status": "SHIPMENT IN TRANSIT",
                    "tracking_id": 8241453,
                    "remark": "SHIPMENT IN TRANSIT"
                },
                {
                    "location": "HYDERABAD HUB",
                    "clickpost_status_code": 5,
                    "timestamp": "2018-03-16 10:47:00",
                    "checkpoint_id": 112584879,
                    "clickpost_status_description": "InTransit",
                    "status": "SHIPMENT FURTHER CONNECTED",
                    "tracking_id": 8241453,
                    "remark": "SHIPMENT FURTHER CONNECTED"
                },
                {
                    "location": "HYDERABAD HUB",
                    "clickpost_status_code": 5,
                    "timestamp": "2018-03-16 07:59:00",
                    "checkpoint_id": 112401887,
                    "clickpost_status_description": "InTransit",
                    "status": "SHIPMENT ARRIVED AT HUB",
                    "tracking_id": 8241453,
                    "remark": "SHIPMENT ARRIVED AT HUB"
                },
                {
                    "location": "MUMBAI ETAIL WAREHOU",
                    "clickpost_status_code": 5,
                    "timestamp": "2018-03-16 06:05:00",
                    "checkpoint_id": 112401888,
                    "clickpost_status_description": "InTransit",
                    "status": "SHIPMENT FURTHER CONNECTED",
                    "tracking_id": 8241453,
                    "remark": "SHIPMENT FURTHER CONNECTED"
                },
                {
                    "location": "MUMBAI ETAIL WAREHOU",
                    "clickpost_status_code": 5,
                    "timestamp": "2018-03-15 23:48:00",
                    "checkpoint_id": 112292967,
                    "clickpost_status_description": "InTransit",
                    "status": "SHIPMENT ARRIVED AT HUB",
                    "tracking_id": 8241453,
                    "remark": "SHIPMENT ARRIVED AT HUB"
                },
                {
                    "location": "MUMBAI ETAIL CENTRE",
                    "clickpost_status_code": 5,
                    "timestamp": "2018-03-15 21:32:00",
                    "checkpoint_id": 112292968,
                    "clickpost_status_description": "InTransit",
                    "status": "SHIPMENT FURTHER CONNECTED",
                    "tracking_id": 8241453,
                    "remark": "SHIPMENT FURTHER CONNECTED"
                },
                {
                    "location": "MUMBAI ETAIL CENTRE",
                    "clickpost_status_code": 5,
                    "timestamp": "2018-03-15 18:52:00",
                    "checkpoint_id": 112292969,
                    "clickpost_status_description": "InTransit",
                    "status": "SHIPMENT ARRIVED",
                    "tracking_id": 8241453,
                    "remark": "SHIPMENT ARRIVED"
                },
                {
                    "location": "SEEPZ",
                    "clickpost_status_code": 4,
                    "timestamp": "2018-03-15 18:01:00",
                    "checkpoint_id": 112217310,
                    "clickpost_status_description": "PickedUp",
                    "status": "SHIPMENT PICKED UP",
                    "tracking_id": 8241453,
                    "remark": "SHIPMENT PICKED UP"
                }
            ],
            "valid": true
        }
    }
}

Package tracker API retrieves the historic statuses and the current status of the package.

The API is a HTTP GET request to: https://www.clickpost.in/api/v2/track-order/

where output is json

Listed below are the parameters:

Parameter Type Description
key (required) character this is the API Key
username (required) character user name, provided to you
waybill (required) character this is/are comma separated waybill numbers for which the status is required
cp_id (required) integer courier_partner_id as specified on page 1 of this documentation

Response Explanation:

  1. “meta” stores information about the API, success or failure
    • success: true/false, true if the API worked fine, else false
    • message: SUCCESS if everything is fine, else the error message c. status: 200, if the API data was fine, 400 in case of a bad request
  2. “result” is an array of records. Each record holds information of comma-separated waybill entered in the request parameter.
  3. Each record has following objects:
    • “valid”: (true / false) in case a wrong AWB / AWB which is not yet registered on Clickpost; is entered to track a shipment, “valid” field will be false. If the AWB is correct, “valid” will be true
    • “waybill”: AWB provided in the API. Is the key of each object. The value is a dictionary storing information about shipment:
      1. scans: Stores all scans that happened for shipment. Has following keys:
        • status: status of the shipment at that time
        • remarks: remark given by courier partner
      2. location: location of shipment at the time of the scan
      3. timestamp: date/time in ISO format when the scan was done
      4. clickpost_status_code: clickpost generated status code for particular status. Clickpost has mapped various statuses of different courier companies into few status codes, which helps customers understand and take action on statuses in preemptive manner. (Explained on last page of this document)
      5. clickpost_status_description: description of clickpost_status_code (Specified on last page of this document)
    • lateststatus: Stores information about the latest status of shipment, has following fields:
      1. status: status of the shipment at that time
      2. remarks: remark given by courier partner
      3. location: location of shipment at the time of the scan
      4. timestamp: date/time in ISO format when the scan was done
      5. clickpost_status_code: clickpost generated status code for particular status. Clickpost has mapped various statuses of different courier companies into few status codes, which helps customers understand and take action on statuses in preemptive manner (Explained on last page of this document)
      6. clickpost_status_description: description of clickpost_status_code (Specified on last page of this document)

Tracking Waybills Using Webhooks

Register for Webhooks:

It’s a POST request. (PUT in case you want to update existing webhook url)

https://www.clickpost.in/api/v1/tracking/register-webhook/

Webhook Registration URL

URL: https://www.clickpost.in/api/v1/tracking/register-webhook/
Headers: {'Content-type': 'application/json'}

Webhook Registration Example

{
     "service_id": 2,
     "key": "xxxxxxxxxxxx---Your API KEY---xxxxxxxxxxxxxxxxxxx",
     "webhook_url": "xxxxxxx---- Your Webhook URL---xxxxxxxx"
}

Fields Explanation:

  1. “service_id” is the service identifier for which you want to register the webhook. Right now, Clickpost provides webhook only for tracking service, which has service_id = 2
  2. “key”: API key provided to you
  3. “webhook_url” is the url on which data will be posted on your server

Webhook Registration Response

{
     "message": "SUCCESS",
     "webhook_key": "7e7cc4c4-273d-49ce-90f1-ecc2b69b4e6c",
     "success": true,
     "status_code": 200
}

Response Explanation:

  1. “message”: SUCCESS implies the request has been placed successfully. Else message will hold error message
  2. “webhook_key”: security key that Clickpost will send with every request it will post on your server. This key will be sent in headers as: webhook_key: webhook_key_as_in_registration_response
  3. “success” : true if the request has been placed successfully false other wise
  4. “status_codes” :
Status Code Description
200 Everything is fine
301 Invalid API key
302 AWB already exists
305 Already registered Webhook for this AWB
306 Not authorized to use this service

Webhook data POST on Client Server:

Every time courier partner updates tracking of the shipment, We will post data to your server using the url you registered while registering for webhooks.

Webhook Payload Header

{
    "Content-Type": "application/json",
    "webhook_key": "webhook_key_given_during_webhooks_register"
}

Webhook Payload


{
  "waybill": "P0109276342",
  "clickpost_status_code": 6,
  "cp_id": 14,
  "clickpost_status_description": "OutForDelivery",
  "status": "O",
  "location": "VASAI, MUMBAI",
  "timestamp": "2017-08-02T13:23:02Z",
  "remark": "Out For Delivery",
  "additional": {
    "latest_status": {
      "clickpost_status_code": 6,
      "location": "VASAI, MUMBAI",
      "status": "O",
      "clickpost_status_description": "OutForDelivery",
      "timestamp": "2017-08-02T13:23:02Z",
      "remark": "Out For Delivery"
    }
  }
}

NDR(Non delivery report) details in Webhook, send when the status_code = 9 (Failed Delivery)

{
  "status": "When forward shipment is not accepted by end customer",
  "remark": "Failed Delivery",
  "waybill": "XYZABC",
  "location": "Bengaluru_Koramangala_Dc (Karnataka)",
  "timestamp": "2016-07-12T17:12:36.710",
  "clickpost_status_code": 9,
  "clickpost_status_description": "FailedDelivery",
  "cp_id": 1,

  "additional": {
    "latest_status": {
      "clickpost_status_code": 9,
      "location": "Bengaluru_Koramangala_Dc (Karnataka)",
      "status": "When forward shipment is not accepted by end customer",
      "clickpost_status_description": "FailedDelivery",
      "timestamp": "2016-07-12T17:12:36.710",
      "remark": "Failed Delivery"
    },
    "ndr_status_code": 1,
    "ndr_status_description": "Customer Unavailable"
  }
}

NuvoEx Doorstep QC check webhook

{
  "status": "Shipment picked up",
  "remark": "Picked up",
  "waybill": "XYZABC",
  "location": "Bengaluru_Koramangala_Dc (Karnataka)",
  "timestamp": "2016-07-12T17:12:36.710",
  "clickpost_status_code": 4,
  "clickpost_status_description": "PickedUp",
  "cp_id": 7,
  "additional": {
    "latest_status": {
      "status": "Shipment picked up",
      "remark": "Picked up",
      "location": "Bengaluru_Koramangala_Dc (Karnataka)",
      "timestamp": "2016-07-12T17:12:36.710",
      "clickpost_status_code": 4,
      "clickpost_status_description": "PickedUp"
    },
    "dsqc": {
      "breadth": null,
      "expected_amount": 0,
      "receiver": "GGN HUB",
      "weight": null,
      "package_price": null,
      "consignee": "GGN HUB",
      "pincode": 1177,
      "creation_date": "2017-07-27T00:01:00",
      "qc_type": "0",
      "sign_img": "https://media-nuvo.s3.amazonaws.com/AWB/images/SBL35560229_na_SIG__pid_8901110.png?Signature=1JOmLgoBraoGVIr%2BBP0vW7FOQ0s%3D&Expires=1532682077&AWSAccessKeyId=AKIAJKYQRPL5EOZJMFFQ12",
      "phone_2": "",
      "customer_name": "Prashant Gupta",
      "on_update": "2017-07-27T14:30:42.747",
      "city": "Surat",
      "pickupdate": "07/27/2017 5:01 p.m.",
      "invoice_no": null,
      "order_id_barcode": "http://media-nuvo.s3.amazonaws.com/Barcode/AWB/100790852-640.png?Signature=6eNY0BlHttRLh%2BXQ%2Fbky%2F9IW%2BG8%3D&Expires=1532599621&AWSAccessKeyId=AKIAJKYQRPL5EOZJMFFQ12",
      "expected_date": null,
      "area": null,
      "destination": "Delhi NCR",
      "qr_code": "1012547131",
      "priority": "N",
      "volumetric_weight": 0,
      "crp_id": "",
      "ptm_otp": null,
      "phone_1": "9099118426",
      "package_sku": null,
      "status": "Bag Created",
      "category": "REV",
      "reason_code": "",
      "vendor": 509427,
      "description": "Floral Chloey Cold Shoulder Top,Sky Errand Dress",
      "order_id": "100790852-640",
      "pod_link": "",
      "barcode": null,
      "is_active": true,
      "client_weight": "0.1",
      "image_urls": "",
      "origin_branch": 10,
      "last_update_date": "07/27/2017 6:48 p.m.",
      "remarks": "Reverse Pickup",
      "qty": null,
      "awb": "35560229",
      "product_img": "https://media-nuvo.s3.amazonaws.com/AWB/images/SBL35560229_IN1634MTODREBLU-518-16_SHI_pid_4108613.png?Signature=1o9Om%2FwaOxf7V8jv1GbntJfcPGc%3D&Expires=1532682080&AWSAccessKeyId=AKIAJKYQRPL5EOZJMFFQ12",
      "qc_details": {
        "image_data": {
          "IN1634MTODREBLU-518-16": [
            "https://media-nuvo.s3.amazonaws.com/AWB/images/SBL35560229_IN1634MTODREBLU-518-16_SHI_pid_6674516.png?Signature=XOOeGFhosPDeu4tUhmFl%2FmWbqSE%3D&Expires=1532682079&AWSAccessKeyId=AKIAJKYQRPL5EOZJMFFQ12",
            "https://media-nuvo.s3.amazonaws.com/AWB/images/SBL35560229_IN1634MTODREBLU-518-16_SHI_pid_4108613.png?Signature=1o9Om%2FwaOxf7V8jv1GbntJfcPGc%3D&Expires=1532682080&AWSAccessKeyId=AKIAJKYQRPL5EOZJMFFQ12"
          ],
          "IN1702MTOTOPFLR-195-16": [
            "https://media-nuvo.s3.amazonaws.com/AWB/images/SBL35560229_IN1702MTOTOPFLR-195-16_SHI_pid_5099882.png?Signature=hxRLaVodTvkg0AubXB4V5a10F3o%3D&Expires=1532682078&AWSAccessKeyId=AKIAJKYQRPL5EOZJMFFQ12",
            "https://media-nuvo.s3.amazonaws.com/AWB/images/SBL35560229_IN1702MTOTOPFLR-195-16_SHI_pid_8242019.png?Signature=c7j1j1MblBFwGU8J2rHE8R%2B%2BWts%3D&Expires=1532682079&AWSAccessKeyId=AKIAJKYQRPL5EOZJMFFQ12"
          ]
        },
        "data": [{
            "item": "IN1634MTODREBLU-518-16",
            "config": [{
                "answer": "yes",
                "question": "Is the SKU code matching?"
              },
              {
                "answer": "yes",
                "question": "Is MRP tag Available?"
              },
              {
                "answer": "no",
                "question": "Is the item defective/Damage?"
              },
              {
                "answer": "yes",
                "question": "Are the product images matching"
              }
            ]
          },
          {
            "item": "IN1702MTOTOPFLR-195-16",
            "config": [{
                "answer": "yes",
                "question": "Is the SKU code matching?"
              },
              {
                "answer": "yes",
                "question": "Is MRP tag Available?"
              },
              {
                "answer": "no",
                "question": "Is the item defective/Damage?"
              },
              {
                "answer": "yes",
                "question": "Are the product images matching"
              }
            ]
          }
        ],
        "remark": "ok",
        "qc_status": "pass"
      },
      "reason_for_return": "Customer initiated reverse pickup.",
      "dto_center": null,
      "destination_branch": 43,
      "qc_result": true,
      "height": null,
      "qc_fail_reason": {},
      "length": null,
      "qc_type_new": "doorstep",
      "address_1": "Prashant , 7-D arnav-B building,  city light road , Surat , Gujarat, IN",
      "address_2": null,
      "slot": null,
      "package_value": null,
      "delivery_date": ""
    }
  }
}

Payload Explanation:

  1. waybill: AWB number for which data is posted.
  2. status: status of the shipment at that time
  3. remarks: remark given by courier partner
  4. location: location of shipment at the time of the scan
  5. timestamp: date/time in IST format when the scan was done
  6. clickpost_status_code: clickpost generated status code for particular status. Clickpost has mapped various statuses of different courier companies into few status codes, which helps customers understand and take action on statuses in preemptive manner. (Explained in next section)
  7. clickpost_status_description: description of clickpost_status_code (Specified on next page)

Important Notes and special data in Webhooks (Examples are present on the right):

  1. Webhooks do not guarantee the order of data send to Client servers. latest_status indicates the latest status for the shipment at the time when the webhook is sent. This is sent with all webhooks
  2. In case of NuvoEx Reverse Pickup: doorstep Quality Check order, additional has dsqc object at the time of pickup cancelled (clickpost_status_code = 10) and pickedup (clickpost_status_code = 4)
  3. In case of Failed Delivery, Clickpost unified NDR status code and NDR status description is sent in additional

NDR Status Codes

ndr_status_code ndr_status_description
0 “Unknown Exception”
1 “Customer Unavailable”
2 “Rejected by Customer”
3 “Delivery Rescheduled”
4 “No Attempt”
5 “Customer Unreachable”
6 “Address Issue”
7 “Payment Issue”
8 “Out Of Delivery Area”
9 “Order Already Cancelled”
10 “Self Collect”
11 “Shipment Seized By Customer”

Clickpost recommends that the mapping of NDR be done strictly on ndr_status_code and not on ndr_status_description


Testing Webhook

You can test the webhooks by making a POST request on the following URL:

https://www.clickpost.in/api/v1/test_webhook?key=<YOUR_API_KEY>

Where test_url is your server URL where you want to test the webhook data.

This will send sample payload as specified in test_data with Headers on the server mentioned in test_url.

Test Webhook URL

https://www.clickpost.in/api/v1/test_webhook?key=<YOUR_API_KEY>

Test Webhook Payload

{
  "test_url": "http://www.clickpost.in/",
  "test_data": {
    "status": "When forward shipment is not accepted by end customer",
    "remark": "Failed Delivery",
    "waybill": "XYZABC",
    "location": "Bengaluru_Koramangala_Dc (Karnataka)",
    "timestamp": "2016-07-12T17:12:36.710",
    "clickpost_status_code": 9,
    "clickpost_status_description": "FailedDelivery",
    "cp_id": 1,

    "additional": {
      "latest_status": {
        "clickpost_status_code": 9,
        "location": "Bengaluru_Koramangala_Dc (Karnataka)",
        "status": "When forward shipment is not accepted by end customer",
        "clickpost_status_description": "FailedDelivery",
        "timestamp": "2016-07-12T17:12:36.710",
        "remark": "Failed Delivery"
      },
      "ndr_status_code": 1,
      "ndr_status_description": "Customer Unavailable"
    }
  }
}


Cancel Shipment API

URL to hit:

https://www.clickpost.in/api/v1/cancel-order/?username=test&key=42d42a34-ae09-4693- b20c-ae2624&waybill=782715732348&cp_id=8

Headers: {'Content-type': 'application/json'}

(Username/key needs to be replaced with the username/key provided to you) Response:

Example: POST Body (Cancel Order)

{
"meta": {
    "message": "8159:Shipment Delete was requested for a tracking
number already in a deleted state.",
    "success": false,
    "status": 400
  }
}

Cancel API allows you to cancel a shipment for which the order has been created.

The API is a HTTP GET request to: https://www.clickpost.in/api/v1/cancel-order/ where output is json

Listed below are the parameters:

URL parameters:

  1. username: User name provided to you.
  2. key: API key provided to you.
  3. waybill: waybill, which needs to be cancelled
  4. cp_id: Courier Partner ID of the courier from which shipment was dispatched. List: http://track.clickpost.in/courier_partner

Response Explanation:

Response will have meta tag which explains about the status of the shipment:

  1. message: SUCCESS in case the Shipment is deleted successfully, else the error message provided by courier partner.
  2. success: true if order is deleted successfully, else false
  3. status: 200 if API works fine, 400 in case of bad request

Pincode Serviceability API

URL to hit

https://www.clickpost.in/api/v1/serviceability_api/?username=test&key=42d42a34-ae09-4693-%20b20c-ae2624

(username and key needs to be replaced with the key provided to you)

Example(POST Body)

[
    {
        "pickup_pincode": "110017",
        "drop_pincode": "110019",
        "optional": {
            "breadth": 10,
            "height": 10,
            "length": 10,
            "weight": 10,
            "invoice_value": 1245,
            "cp_id": 1
        }
    }
]

Response

{
    "meta": {
        "success": true,
        "status": 200,
        "message": "SUCCESS"
    },
    "result": [
        {
            "serviceable": {
                "PREPAID": true,
                "COD": true
            },
            "comitted_sla": 3
        }
    ]
}

Serviceability api checks if pickup and drop pincodes are serviceabile or not. It accepts the shipment dimension fields as additional parameters. Courier company id can be passed to check the serviceability for a specific courier company.

It’s a POST request as follows

URL: https://www.clickpost.in/api/v1/serviceability_api/`

Headers: {‘Content-type’: 'application/json’}

URL Parameters:

Parameter Type Description
key character API key provided to you
username character username provided to you

POST Parameters:

Format: JSON

Compulsory Fields

Payload is a list of json objects each of which have following fields:

Parameter Type Description
pickup_pincode integer pincode of pickup address
drop_pincode integer pincode of drop address

Optional Fields

Parameter Type Description
invoice_value double invoice value of the shipment
order_type character COD/PREPAID
weight integer weight of the shipment
length integer length of the shipment
breadth integer breadth of the shipment
height integer height of the shipment
cp_id integer clickpost courier comapny id

Response explanation:

Response object has two parts:

  1. meta: stores information about the API, success or failure
    • success: true/false, tells whether the order was created or not
    • message: SUCCESS in case request was successfully processed by clickpost, else returns error message.
    • status:
      1. 200 if the order is created successfully,
      2. 400 if there is a bad request encountered: errors will be present in “message”
  2. result:
    • serviceable: JSON object which stores following two fields:
      • COD: Values: true: if the pincode is COD serviceable else false
      • PREPAID: Values: true: if the pincode is COD serviceable else false
    • commited_sla: average commited SLA by courier partner (based on your contract with courier partner) for the shipment if dispatched today. (integer field)

Expected Date of Delivery API

URL to hit

https://www.clickpost.in//api/v1/predicted_sla_api/?username=test&key=42d42a34-ae09-4693-%20b20c-ae2624

(username and key needs to be replaced with the key provided to you)

Example(POST Body with courier partner provided)

[
    {
        "pickup_pincode": "600040",
        "drop_pincode": "421504",
        "optional" : {
            "cp_id" :5
        }
    }
]

Response

{
    "meta": {
        "status": 200,
        "success": true,
        "message": "SUCCESS"
    },
    "result": [
        {
            "predicted_sla_min": 1,
            "min_sla_cp_id": 5,
            "predicted_sla_max": 1,
            "all_map": {
                "5": [
                    1,
                    1
                ]
            }
        }
    ]
}

Example(POST Body across all courier partners)

[
    {
        "pickup_pincode": "600040",
        "drop_pincode": "421504"
    }
]

Response

{
    "meta": {
        "status": 200,
        "success": true,
        "message": "SUCCESS"
    },
    "result": [
        {
            "predicted_sla_min": 1,
            "min_sla_cp_id": 5,
            "predicted_sla_max": 1,
            "all_map": {
                "3": [
                    2,
                    3
                ],
                "4": [
                    3,
                    6
                ],
                "5": [
                    1,
                    1
                ],
                "6": [
                    1,
                    1
                ],
                "14": [
                    2,
                    3
                ],
                "15": [
                    1,
                    1
                ],
                "1001": [
                    1,
                    1
                ]
            }
        }
    ]
}

The expected date of delivery API computes the minimum/maximum time range, a shipment lifecycle may take between the pickup and drop pincode using our predictive machine learning algorithm. By default, it computes the range for all courier companies available and gives the courier partner id which might deliver the shipment fastest. Optional courier comapny id can be passed to see the range for a specific courier partner; errors/warnings will be highlighted in the response.

It’s a POST request as follows

URL: https://www.clickpost.in/api/v1/predicted_sla_api/

Headers: {‘Content-type’: 'application/json’}

URL Parameters:

Parameter Type Description
key character API key provided to you
username character username provided to you

POST Parameters:

Format: JSON

Compulsory Fields

Payload is a list of json objects each of which have following fields:

Parameter Type Description
pickup_pincode integer pincode of pickup address
drop_pincode integer pincode of drop address

Optional Fields

Parameter Type Description
cp_id integer courier partner id

List of courier partners is present at: http://track.clickpost.in/courier_partner

Response explanation:

Response object has two parts:

  1. meta: stores information about the API, success or failure
    • success: true/false, tells whether the request was processed successfully by Clickpost
    • message: SUCCESS in case request was successfully processed by Clickpost, else returns error message.
    • status:
      1. 200 if the request is processed successfully,
      2. 400 if there is a bad request encountered: errors will be present in “message”
  2. result:
    • predicted_sla_min: minimum sla in days predicted by Clickpost between the given pin codes
    • predicted_sla_max: maximum sla in days predicted by Clickpost between the given pin codes
    • min_sla_cp_id: courier partner id corresponding to the smallest sla of shipment between the pin codes given
    • all_map: contains [min, max] values for all courier partners serviced by Clickpost

Pickup Request API

URL to hit:

https://www.clickpost.in/api/v1/create-pickup/?username=test&key=42d42a34-ae09-4693- b20c-ae
Headers: {'Content-type': 'application/json'}

(Username/key needs to be replaced with the username/key provided to you) POST Body:

Example: POST Body (Pickup Request)

{
  "pickup_date": "2016-04-02T12:00:00Z",
  "courier_partner": 1,
  "items": "laptop",
  "pickup_pincode": "110017",
  "pickup_email": "founders@clickpost.in",
  "pickup_phone": "8376035546",
  "pickup_name": "Test-User",
  "pickup_city": "Delhi",
  "pickup_state": "DELHI",
  "pickup_address": "B-222/2 savitri nagar new delhi -10"
}

The Pickup Request API allows you to place pickup request for courier partners and obtain confirmation for the same.

Please note, in case of any validation failure - order will not get created.

The API is a HTTP POST request to: https://www.clickpost.in/api/v1/create-pickup/ where output format is json.

Listed below are the parameters:

URL parameters:

Parameter Type Description
username character user name provided to you
key character API key provided to you

POST Parameters:

Format: JSON

Compulsory Fields:

Parameter Type Description
pickup_date character ISO datetime field example: 2015-03-31T12:00:00Z
courier_partner integer ID of courier partner for which the pickup request needs to be placed. List at : http://track.clickpost.in/courier_partner
items character description of item that needs to be placed. Max length: 200 chars
pickup_address character Address of pickup location
pickup_name character Contact person for the pickup
pickup_email character email contact of the pickup location
pickup_pincode integer pincode of pickup location
pickup_phone integer contact number of pickup location, 10/11 digit number
pickup_city character name of pickup city
pickup_state character name of pickup state

Response

{
  "meta": {
    "message": "SUCCESS",
    "success": true,
    "status": 200
  },
  "result": {
    "location": "DELKL",
    "confirmation_number": "6" 
  }
}

Response Explanation:

Response will have meta tag which explains about the status of the API and result which provides pickup details. In meta tag:

  1. message: SUCCESS if the pickup request is placed successfully, error message otherwise
  2. success: true if pickup request is placed successfully, else false
  3. status: 200 if pickup request is placed successfully, 400 in case of bad request

In result tag:

  1. location: ID of pickup location shared by courier partner
  2. confirmation_number: pickup confirmation number

Result tag will be present in request only if the meta tag contains success : true.

Tracking Page / Widget

To integrate with your website:

  1. Place widget script in your webpage.
  2. Place widget HTML code in your webpage.

Note: It’s better to move widget script to as low in the web page as possible.

Tracking Page / Widget is designed to provide exhaustive tracking to end user.

The widget/page has following features:

  1. End to end shipment tracking. Incase you want the tracking page to show Order Placed and Ready to Ship milestone as well, please pass order_date and ship_date in AWB-register API.
  2. Failed delivery feedback from customer: During a failed delivery by courier partner, customer can enter his input/concern over a form which will be shared with you as a report daily or same can be fetched via API (Customer Feedback API)
  3. In case you want customer to request a delivery preference any time before an attempt for delivery is made, please contact our team to enable the feature. Feedback of the same will be available as for point 2.
  4. Design language of the page is customisable as per your website theme. Our team can help you in designing the page.

JS to be included:

<script type="text/javascript" src="http://track.clickpost.in/clickpost-widget-1.0.3.js"></script>

Tracking widget using AWB number and Courier Partner ID

Fields Explanation:

Parameter Type Description
id string Your Waybill number
data-cpId string Your Courier Partner Id

<div id="1234567890" class="tracking-widget" data-cpId="11"></div>

Tracking widget using Reference Number (Order ID)

Fields Explanation:

Parameter Type Description
id string Your order reference number
data-username string username provided to you
data-key string API Key provided to you

<div id="1234567890" class="tracking-widget" data-key="123-456-7890" data-username="xyz"></div>

Note: No need to add more than one script for multiple tracking widgets in a page.

Customer Feedback API

URL to hit

https://www.clickpost.in/api/v1/ndr_user_feedback/?username=test&key=42d42a34-ae09-4693-%20b20c-ae2624&start_date=1509529561&end_date=1512121581

(username and key needs to be replaced with the key provided to you)

Example - GET Request

https://www.clickpost.in/api/v1/ndr_user_feedback/?username=test&key=42d42a34-ae09-4693-%20b20c-ae2624&start_date=1509529561&end_date=1512121581

Response

{
    "result": [{
            "created_at": "2018-01-17T12:28:53.316389Z",
            "awb": "C0100122291",
            "preferred_time": null,
            "landmark": null,
            "clickpost_status_code": 28,
            "clickpost_status_description": "Awb Registered",
            "comment": "Please deliver the product on Saturday,Before that I won't be at my address",
            "phone": null,
            "preferred_date": null,
            "address": null
    }],
    "meta": {
        "meta": {
            "message": "Success",
            "success": true,
            "status": 200
        }
    }
}

This api gives the list of feedback submitted through clickpost tracking page from start date to end date; errors/warnings will be highlighted in the response.

It’s a GET request as follows

URL: https://www.clickpost.in//api/v1/ndr_user_feedback/

Headers: {‘Content-type’: 'application/json’}

URL Parameters:

Parameter Type Description
key character API key provided to you
username character username provided to you

GET Parameters:

Format: JSON

Compulsory Fields

Parameter Type Description
start_date long UTC epoch start time
start_date long UTC epoch end time

Response explanation:

Response object has two parts:

  1. meta: stores information about the API, success or failure
    • success: true/false, tells whether the request was processed successfully by Clickpost
    • message: SUCCESS in case request was successfully processed by Clickpost, else returns error message.
    • status:
      1. 200 if the request is processed successfully,
      2. 400 if there is a bad request encountered: errors will be present in “message”
  2. result:
    • address: New Address change by end user
    • comment: comment/description of change by end user
    • preferred_time: Preferred time of delivery
    • preferred_date: prefered date of delivery
    • landmark: landmark for the address
    • created_at: timestamp when the user made request for this change
    • awb: awb number for which change is requested
    • phone: new phone number for delivery
    • clickpost_status_code: shipment status code when customer entered the feedback
    • clickpost_status_description: shipment status description when customer entered the feedback

NDR Action Update API

URL to hit

https://www.clickpost.in/api/v1/ndr/update/?username=test&key=42d42a34-ae09-4693-%20b20c-ae2624&cp_id=4

(username and key needs to be replaced with the key provided to you)

Example - POST Request

[       
        {
            "waybill": "1823821",
            "act": "DEFER_DLV",
            "action_data": {
                "deferred_date": "2017-12-28"
            }
        },
            {
                "waybill": "3278213",
                "act": "EDIT_DETAILS",
                "action_data": {
                    "name": "name1",
                    "add": "add1",
                    "phone": "2132341412"
                }
            },
            {
                "waybill": "278382",
                "act": "RE-ATTEMPT"
            },
            {
                "waybill": "1278728",
                "act": "RE-ATTEMPT"
            }
        ]

Response

{
    "result": {
        "cp_response": "UPL10575891229462827496"
    },
    "meta": {
        "message": "Success",
        "success": true,
        "status": 200
    }
}

This api instructs the courier company to take action on a awb. Only three actions supported (DEFER_DLV, EDIT_DETAILS, RE-ATTEMPT); errors/warnings will be highlighted in the response.

It’s a POST request as follows

Headers: {‘Content-type’: 'application/json’}

URL Parameters:

Parameter Type Description
key character API key provided to you
username character username provided to you
cp_id integer courier company id provided by clickpost

List of courier partners is present at: http://track.clickpost.in/courier_partner

POST Parameters:

Format: JSON

Compulsory Fields

Parameter Type Description
waybill stiring awb number for ndr action update
act long action to take (DEFER_DLV, EDIT_DETAILS, RE-ATTEMPT)

Optional Fields

Parameter Type Description
action_data->deferred_date character [DEFER_DLV] Deferred date for reattempt in (YYYY-MM-DD) format
action_data->name character [EDIT_DETAILS] Name of person to handover the shipment
action_data->add character [EDIT_DETAILS] Address where shipment need to be delivered
action_data->phone character [RE-ATTEMPT] Phone no of the persion to contact for delivery
NO_DATA NO_DATA [RE-ATTEMPT] No extra data is required

Response explanation:

Response object has two parts:

  1. meta: stores information about the API, success or failure
    • success: true/false, tells whether the request was processed successfully by Clickpost
    • message: SUCCESS in case request was successfully processed by Clickpost, else returns error message.
    • status:
      1. 200 if the request is processed successfully,
      2. 400 if there is a bad request encountered: errors will be present in “message”
  2. result:
    • cp_response: courier company reference number for the action requested

Tracking Status Codes

clickpost_status_code clickpost_status_description Meaning
1 ORDER_PLACED ‘Order Has Been Placed / Manifested on Courier Partner’
2 PICKUP_PENDING 'Pickup Pending’
3 PICKUP_CANCELLED 'Pickup Cancelled’
4 PICKED_UP 'Pickup Has Been Done’
5 INTRANSIT 'In Transit’
6 OUT_FOR_DELIVERY 'Shipment Out For Delivery’
7 NOT_SERVICEABLE 'Area For Delivery Is Not Servicable’
8 DELIVERED 'Shipment Delivered’
9 FAILED_DELIVERY 'Delivery Failed’
10 CANCELLED_ORDER 'Order Has Been Cancelled’
11 RTO_REQUESTED 'Rto For Shipment has been Requested’
12 RTO 'Marked As Return’
13 RTO_OUT_FOR_DELIVERY 'Shipment Is Out For Delivery For RTO’
14 RTO_DELIVERED 'RTO Delivered’
15 RTO_FAILED 'RTO Failed’
16 LOST 'Shipment is Lost’
17 DAMAGED 'Shipment is damaged’
18 SHIPMENT_DELAYED 'Shipment Is Delayed Or Misroute’
19 CONTACT_CUSTOMER_CARE 'Contact To The Customer Care’
20 SHIPMENT_HELD 'Shipment Is being held’
21 RTO_INTRANSIT 'RTO In Transit’
25 OUT_FOR_PICKUP 'Shipment Out For Pickup’ (Important in Marketplace / RVP pickups)
26 RTO_CONTACT_CUSTOMER_CARE 'RTO Contact Customer Care’
27 RTO_SHIPMENT_DELAY 'RTO Shipment Delayed’
28 Awb Registered 'AWB registered on Clickpost’

It is strongly recommended to use the clickpost_status_code to apply any logic on unified statuses.

Error Codes

The Clickpost API uses the following error codes:

Server Response Code Meaning
200 Success
400 Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
405 Method Not Allowed
406 Not Acceptable
429 Too Many Requests
500 Internal Server Error
503 Service Unavailable
504 Server unable to serve the request, please retry
Clickpost Service Error Code Meaning
301 Authentication Failed: Invalid Token or API Key
302 Invalid Courier Partner Id with Field cp_id
303 waybill already registered
304 Already Registered For Service
306 You are not Registered To Use this service, Please Register
316 You Dont Have Credentials For The Courier Partner
320 This service is not subscribed by you
324 You Are Using Invalid Credential For Courier Partner, Please Update
325 Status You Are Trying to update is invalid for our systems, Contact to tech@clickpost.in
326 Invalid Tracking Id
328 Invalid POST data
330 waybill does not exist
351 No account exist
352 Multiple Account exist
353 Inactive account
354 Unhandled CP error
355 Vendor code not found
422 Invalid Entity
Order Creation Error Code Meaning
307 You have entered invalid Order Type
308 You have entered invalid Order priority
309 Invalid Delivery Type
310 RVP reason is missing
311 Invalid Courier Partner For RVP
312 Items Data is missing from order details
313 Invalid Format of items for Order data
314 Invalid Format Of Order Data
315 Invalid Cod Value
319 Error In Order Placing To Courier Partner
321 Awb Number Does not exist in system for courier partner
322 Internal Server Error In Courier Partners Server, Try Again
323 You have Already placed this order
Clickpost Webhook Error Code Meaning
305 Webhook already Registered for the user
327 Webhook not registered for the user
Order Cancellation Error Code Meaning
600 Order already cancelled
350 Order Cancellation Error from Courier Partner Server