DTDC FIRST MILE API ORDER UPLOAD WS Ver 2.0
DTDC FIRST MILE API ORDER UPLOAD WS Ver 2.0
● Introduction.........................................................................…..03
● Process flow/Validation............................................................03
This document describes how The Customer can send the pickup request to DTDC by DTDC Web
services .
Customer needs to send the individual pickup request to DTDC Web Service, Processing of that
request and update back to customer about his request by DTDC.
About API
● Customers will submit individual pickup requests to DTDC by Calling DTDC Web Service. DTDC Will
share the Web Service details to Customer.
● On every pickup request, DTDC will respond back with a success flag and Relevant detail .
● Json details has been shared in this document under Technical details section
This service is implemented through HTTPRequest. The customer is responsible for making
the HTTPRequest to the specified URL as mentioned in this document. The customer is responsible
for implementing the capability of calling the HTTPRequest in the specified format and get the
DTDC Web Service Response in Json format, mentioned in this document.
https://dtdcapi.shipsy.io/api/customer/integration/consignment/softdata
There is a limit of 20 consignments per API request, however, multiple parallel requests are allowed.
Consignments: An array of consignment objects, required
Following is the description, its data type, whether required or not and possible example for every
key of consignment,
Description Data Type Required Key Remarks
If load_type
is
Declared value of Number or
declared_value NON-DOCU Eg: “2800” or 2800
consignment String
MENT, then
it is required
Invoice Number of
invoice_number String Optional Eg: “C3447827878470”
Consignment
Invoice Date of
invoice_date String Optional Eg: “25 Jul 2018”
Consignment
Consignment
consignment_typ
Type(‘REVERSE’ for String Optional
e
reverse shipments)
Address Object Origin and Destination:
Following is the description, its data type, whether required or not and possible example for every
key of Address,
Required
Pincode details of the
in Origin
Consignor (in case of
pincode String and Eg: “122002”
origin) or Consignee
Destinatio
(in case of destination)
n
Required
Name of consignor (in
in Origin
case of origin) or
name String and Eg: “Nikhil”
Consignee (in case of
Destinatio
destination)
n
Required
Phone number of
in Origin
Consignor (in case of
phone String and Eg: “8586999698”
origin) or Consignee
Destinatio
(in case of destination)
n
Required
Address details of the
in Origin
address_lin Consignor (in case of
String and Eg: “Carlton Estate”
e_1 origin) or Consignee
Destinatio
(in case of destination)
n
Following is the description, its data type, whether required or not and possible example for every
key of Address for the Return address details and only applicable when RTO address is different
from the origin address in that case customer need to mention the return address of the RTO’d
shipment, so RTO will be initiated on return address field.
Required
Pincode details of the
in Origin
Consignor (in case of
pincode String and Eg: “122002”
origin) or Consignee
Destinatio
(in case of destination)
n
Required
Name of consignor (in
in Origin
case of origin) or
name String and Eg: “Nikhil”
Consignee (in case of
Destinatio
destination)
n
Required
Phone number of
in Origin
Consignor (in case of
phone String and Eg: “8586999698”
origin) or Consignee
Destinatio
(in case of destination)
n
Required
Address details of the
in Origin
address_lin Consignor (in case of
String and Eg: “Carlton Estate”
e_1 origin) or Consignee
Destinatio
(in case of destination)
n
Following is the description, its data type, whether required or not and possible example for every
key of Address for the Exceptional Return address details and only applicable when Central
processing center RTO address is different from the origin address and Return address, in that case
customer need to mention the exceptional return address of the RTO’d shipment, so RTO will be
initiated on Exceptional return address field.
Phone number of
Required in
Consignor (in case of Eg:
phone String Origin and
origin) or Consignee “8586999698”
Destination
(in case of destination)
Eg:
Alt Phone String Required
“8586999698”
Piece Details Object:
Following is the description, its data type, whether required or not and possible example for every
key of Address,
Required in
declared_v Declared value of String or
pieces_details for Eg: “15000”
alue Consignment Piece Number
NON-DOCUMENT
Weight of Required in
String or
weight consignment piece pieces_details for Eg: “1.5” or 1.5
Number
(kg) NON-DOCUMENT
Height of Required in
String or
height consignment piece pieces_details for Eg: “1.5” or 1.5
Number
(cm) NON-DOCUMENT
Length of Required in
String or
length consignment piece pieces_details for Eg: “1.5” or 1.5
Number
(cm) NON-DOCUMENT
Width of Required in
String or
width consignment piece pieces_details for Eg: “1.5” or 1.5
Number
(cm) NON-DOCUMENT
Json Source code For DOC shipment
{
"consignments": [
{
"customer_code": "GL112",
"reference_number": "",
"service_type_id": "PRIORITY",
"load_type": "DOCUMENT",
"description": "Notebook",
"cod_favor_of": "Ram Manohar",
"cod_collection_mode": "Cheque",
"consignment_type": "Forward",
"dimension_unit": "",
"length": "",
"width": "",
"height": "",
"weight_unit": "kg",
"weight": "0.25",
"declared_value": "",
"cod_amount": "100",
"num_pieces": "002",
"customer_reference_number": "XF878723",
"is_risk_surcharge_applicable": true,
"origin_details": {
"name": "Shipsy",
"phone": "9971149561",
"alternate_phone": "9876543210",
"address_line_1": "B-23 Sushant Lok I",
"address_line_2": "Opp. Bestech Centre Point Mall",
"pincode": "400063",
"city": "Mumbai",
"state": "Maharashtra"
},
"destination_details": {
"name": "Shipsy",
"phone": "9971149561",
"alternate_phone": "9876543210",
"address_line_1": "B-23 Sushant Lok I",
"address_line_2": "Opp. Bestech Centre Point Mall",
"pincode": "400063",
"city": "Mumbai",
"state": "Maharahstra"
},
"pieces_detail": [
{ "description": "Notebook",
"declared_value": "100",
"weight": "0.5",
"height": "5",
"length": "5",
"width": "5"
}
] } ]}
Dummy Curl Request to call api
?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "http://demodashboardapi.shipsy.in/api/customer/integration/consignment/softdata",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{ Insert Json source code here }",
CURLOPT_HTTPHEADER => array(
"Authorization: Basic aGltZ3VwOg==",
"Postman-Token: c096d7ba-830d-440a-9de4-10425e62e52f",
"api-key: x5zn!w740gwZOJNzHt5hF$!r9uGzz!n8",
"cache-control: no-cache",
"customerId: 259",
"organisation-id: 1"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
Response Codes
400 There is some validation error in the overall request format. In this
case, complete request is rejected
{
"reference_number": "E12345678001"
},
{
"reference_number": "E12345678002"
}
]
},
{
"success": true,
"reference_number": "E87654321"
},
{
"success": true,
"reference_number": "E87654400"
}
]
}
Below is the sample response for a request in which two consignments, ‘SHIPSYTEST1’ and
‘SHIPSYTEST2’ are sent
{
"status": "OK",
"data": [
{
"success": false,
"message": "Service type not found",
"reason": "SERVICE_TYPE_NOT_FOUND",
"reference_number": "SHIPSYTEST1",
"should_retry": false
},
{
"success": true,
"reference_number": "SHIPSYTEST2"
},
{
"reason": "Invalid Declared Price",
"success": false,
"message": "Invalid Declared Price",
"should_retry": false
}
]
}
There is an “error” key, which has the error object. Error object contains
● “message”: Error description
● “reason”: Error code
There is an “error” key, which has the error object. Error object contains
● “message”: Error description
● “reason”: Error code