Introduction
API ENDPOINTS
API Explorer available at - ( Powered by Swagger )
Authentication
X-Egg-ApiKey : 00000000-0000-0000-0000-000000000000
X-Egg-UserId : 00000000-0000-0000-0000-000000000000
Authentication are done by simple http header based Authentication. Authenticate using the API by including your secret API key and User Id in the request. If you already don't have them - contact us at tech@chaldal.com to get one.
Your API key and User Id carry many privileges, so be sure to keep them secret! Do not share your secret API keys in publicly accessible areas such GitHub, client-side code, and so forth.
You will need to pass your User Id and API key as http header request to all the API requests. API key as X-Egg-ApiKey and User ID as X-Egg-UserId.
Organization
Get Pickup Points
Definition
GET http://eggtransport.chaldal.com/api/Organization/GetOrgPickupPoints
Get pickup points of your organization.
Example Request
# Make sure to replace `X-Egg-ApiKey` and `X-Egg-UserId` with your API key.
$ curl 'http://eggtransport.chaldal.com/api/Organization/GetOrgPickupPoints' \
-X GET \
--header 'Accept: application/json' \
--header 'X-Egg-ApiKey : 00000000-0000-0000-0000-000000000000' \
--header 'X-Egg-UserId : 00000000-0000-0000-0000-000000000000'
Example Response
[
{
"Address": 707325,
"Identity": "00000000-0000-0000-0000-000000000000",
"FullName": "OrgName",
"StreetAddress": "Banani road 11",
"PhoneNumber": "+8801715500000",
"DeliveryArea": {
"Id": 3,
"Name": "Banani"
},
"CustomerHub": "",
"GeoLocation": {
"Latitude": 23.791809,
"Longitude": 90.413658
},
"ConfidenceLevel": "Level0"
},
]
While creating a parcel use the value of Address and send it as this parameter- MerchantPickupPointAddressId
Parcel
Parcel Object
{
"TrackingRef":"IA1B18000",
"MerchantRef":"S171008002",
"Physique": {
"$Case":"Tangible",
"Dimension": {
"$Case":"Partial",
"MaxDimension":10,
"Volume":1000
},
"Mass":{
"$Case":"Partial",
"Total":1000
},
"RequiresRefrigeration":false
},
"AddressInfo":{
"Address":410000,
"Identity":"00000000-0000-0000-0000-000000000000",
"FullName":"CUSTOMER NAME",
"StreetAddress":"Niketon Gulshan",
"PhoneNumber":"+8801900000000",
"DeliveryArea":{
"Id":24,
"Name":"Niketan"
},
"CustomerHub":"Banani",
"GeoLocation":null,
"ConfidenceLevel":"Level0"
},
"SlotStart":"2017-10-11T11:30:00+06:00",
"SlotEnd":"2017-10-11T15:00:00+06:00",
"CashToCollect":0,
"StockValue":0,
"Weight":"Less Than 1 Kg",
"Status":"Delivered",
"TaskType":"Delivery",
"MerchantHub":"Mirpur"
}
This object represent a parcel. In the API responses its refered as "Task".
| ATTRIBUTES | Description | type |
|---|---|---|
| TrackingRef | The system generated unique tracking key for a parcel | string |
| MerchantRef | Marchant defined reference key. | string |
Search Parcels
Definition
GET http://eggtransport.chaldal.com/api/Task/SearchTasksForMyOrg
Example Request
# Make sure to replace `X-Egg-ApiKey` and `X-Egg-UserId` with your API key.
$ curl 'http://eggtransport.chaldal.com/api/Task/SearchTasksForMyOrg?searchText=&taskType=All&highLevelStatus=All&fromDate=null&toDate=null&pageNum=1&pageSize=20' \
-X GET \
--header 'Accept: application/json' \
--header 'X-Egg-ApiKey : 00000000-0000-0000-0000-000000000000' \
--header 'X-Egg-UserId : 00000000-0000-0000-0000-000000000000'
Example Response
{
Data: [
{
"TrackingRef":"IA1B18000",
"MerchantRef":"S171008002",
"Physique": {
"$Case":"Tangible",
"Dimension": {
"$Case":"Partial",
"MaxDimension":10,
"Volume":1000
},
"Mass":{
"$Case":"Partial",
"Total":1000
},
"RequiresRefrigeration":false
},
"AddressInfo":{
"Address":410000,
"Identity":"00000000-0000-0000-0000-000000000000",
"FullName":"CUSTOMER NAME",
"StreetAddress":"Niketon Gulshan",
"PhoneNumber":"+8801900000000",
"DeliveryArea":{
"Id":24,
"Name":"Niketan"
},
"CustomerHub":"Banani",
"GeoLocation":null,
"ConfidenceLevel":"Level0"
},
"SlotStart":"2017-10-11T11:30:00+06:00",
"SlotEnd":"2017-10-11T15:00:00+06:00",
"CashToCollect":0,
"StockValue":0,
"Weight":"Less Than 1 Kg",
"Status":"Delivered",
"TaskType":"Delivery",
"MerchantHub":"Mirpur"
}
],
TotalCount: 57
}
GET /Task/SearchTasksForMyOrg
Listing and searching parcels are done through this single API endpoint. If you just want to list all latest parcels - keep most of the searching params empty. Otherwise use available query params to filter/search your specific parcel.
URL Parameters
| Parameter | Description | Parameter Type | Data Type |
|---|---|---|---|
| searchText | Search TrackingRef, MerchantRef, associated address PhoneNumber. It will match all of these fields and return if anything. If no search needed pass a empty string |
query | string |
| taskType | Available values are - All, Delivery, PickUp |
query | string |
| fromDate | Self explanatory. Pass null if you want to ignore this field. Example date format - 2017-09-08T00:00:00+06:00. Make sure its URI encoded |
query | date-time |
| toDate | Similar to fromDate |
query | date-time |
| highLevelStatus | Filter by high level status. Available options are - All, Preparing, Delivering, Returning, Completed, Failed |
query | string |
| pageNum | For pagination, Page number | query | integer |
| pageSize | Number of items to show in a single page | query | integer |
Get Parcels
Definition
POST http://eggtransport.chaldal.com/api/Task/GetTasks
Example Request
# Make sure to replace `X-Egg-ApiKey` and `X-Egg-UserId` with your API key.
$ curl 'http://eggtransport.chaldal.com/api/Task/GetTasks' \
-X POST \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'X-Egg-ApiKey : 00000000-0000-0000-0000-000000000000' \
--header 'X-Egg-UserId : 00000000-0000-0000-0000-000000000000' \
-d '["YMMP68CNJ","VHM1W8CNL"]'
Example Response
{
"VHM1W8CNL": {
"TrackingRef": "VHM1W8CNL",
"MerchantRef": "Ombre by Ash-R1J284",
"Physique": {
"$Case": "Tangible",
"Dimension": {
"$Case": "Unavailable"
},
"Mass": {
"$Case": "Unavailable"
},
"RequiresRefrigeration": false
},
"AddressInfo": {
"Address": 415409,
"Identity": "00000000-0000-0000-0000-000000000000",
"FullName": "Ayesha Marzana",
"StreetAddress": "House 60/D .Road 131. Gulshan 1,Vantage Travel Agency-2nd floor.,",
"PhoneNumber": "+8801630167640",
"DeliveryArea": {
"Id": 15,
"Name": "Gulshan"
},
"CustomerHub": "Banani",
"GeoLocation": null,
"ConfidenceLevel": "Level0"
},
"SlotStart": "2017-10-11T11:30:00+06:00",
"SlotEnd": "2017-10-11T15:00:00+06:00",
"CashToCollect": 1310,
"StockValue": 1310,
"Weight": "Unknown",
"Status": "Delivering",
"TaskType": "Delivery",
"MerchantHub": "Kallayanpur"
},
}
POST /Task/GetTasks
Get a specific parcel by providing the parcel tracking reference number.
Parameter
| Parameter | Description | Parameter Type | Data Type |
|---|---|---|---|
| trackingRef | Just pass an array of tracking reference numbers. You can pass multiple tracking numbers. To get only one- just pass a single item inside the array, ex - ['CD043DD83'] | body | Array[string] |
Create Delivery Parcel
Definition
POST http://eggtransport.chaldal.com/api/Task/CreateThirdPartyDeliveryTask
POST /Task/CreateThirdPartyDeliveryTask
Create normal delivery parcel
Sample request body
{
"RefId": "SG-123",
"Physique": {
"$Case": "Tangible",
"RequiresRefrigeration": false,
"Dimension": {
"$Case": "Partial",
"MaxDimension": 10,
"Volume": 1000
},
"Mass": {
"$Case": "Partial",
"Total": 1000
}
},
"Address": {
"$Case": "Freeform",
"StreetAddress": "Malibagh",
"PhoneNumber": "+8801521409468",
"FullName": "Kh. Mushfuque"
},
"CashToCollect": 1000,
"StockValue": 1000,
"Note": "Smart phone holder",
"MerchantPickupPointAddressId": 707447
}
| ATTRIBUTES | Description | type |
|---|---|---|
| RefId | Marchant defined reference key (E.g. - order id) | string |
| Physique | An object that contains Type and dimension of a parcel | Physique |
| AddressInfo | Address object of customer | AddressInfo |
| CashToCollect | Cash amount to be collected from customer | number |
| StockValue | Stock value of the product | number |
| Note | Description of products in the parcel | string |
| MerchantPickupPointAddressId | Address Id of parcel's pickup point | number |
Create Pickup Parcel
Definition
POST http://eggtransport.chaldal.com/api/Task/CreateThirdPartyPickUpTask
POST /Task/CreateThirdPartyPickUpTask
Create pickup parcel
Sample request body
{
"RefId": "TB-12345",
"Physique": {
"$Case": "Tangible",
"RequiresRefrigeration": false,
"Dimension": {
"$Case": "Partial",
"MaxDimension": 10,
"Volume": 1000
},
"Mass": {
"$Case": "Partial",
"Total": 1000
}
},
"Address": {
"$Case": "AddressId",
"Int32": 707452
},
"CashToCollect": 0,
"StockValue": 1200,
"Note": "Table lamp",
"MerchantPickupPointAddressId": 707425
}
Validate CSV File For Bulk Order
Definition
POST http://eggtransport.chaldal.com/api/Task/ValidateTaskImportCsv
POST /Task/ValidateTaskImportCsv
Validates CSV file to place bulk order of multiple parcels.
Sample request body
"
Ref No,Customer Name,Address,Phone Number,Amount to collect,Stock Value,Product Description
MTJ-300132166,Customer Name 1,House #0 - Road # 0 - Dhanmondi - Dhaka-1209 Bangladesh,8801820000000,878,878,Some Product Description
BAN-300595166,Customer Name 2,House #0 - Road # 0 - A-Block - Mirpur-1 - 4th floor - Flat C - Dhaka. Bangladesh,8801710000000,590,590,Some Product Description
MTJ-300425166,Customer Name 3,House #0 - Road # 0 Block A Section 10 Mirpur Bangladesh,8801720000000,1025,1025,Some Product Description
"
CSV file must have the following columns
| Column Title | Description |
|---|---|
| Ref No | Marchant defined reference key (E.g. - order id) |
| Customer Name | Name of the parcel recipient |
| Address | Address of customer |
| Phone Number | Phone number of the parcel recipient |
| Amount to collect | Cash amount that receipient will have to pay |
| Stock Value | Stock value of the product |
| Product Description | Description of products in the parcel |
Place Bulk Order (Delivery Parcels Only)
Definition
POST http://eggtransport.chaldal.com/api/Task/ImportTasksToMyOrg
POST /Task/ImportTasksToMyOrg
Creates multiple delivery parcels using the data of uploaded CSV file.
Sample request body
{
"CSV": "Ref No,Customer Name,Address,Phone Number,Amount to collect,Stock Value,Product Description\nMTJ-300132166,Customer Name 1,House #0 - Road # 0 - Dhanmondi - Dhaka-1209 Bangladesh,+8801820000000,878,878,Some Product Description\nBAN-300595166,Customer Name 2,House #0 - Road # 0 - A-Block - Mirpur-1 - 4th floor - Flat C - Dhaka. Bangladesh,+8801710000000,590,590,Some Product Description",
"MerchantPickupPointAddressId": 707447
}
| ATTRIBUTES | Description | type |
|---|---|---|
| CSV | String Content of CSV file | string |
| MerchantPickupPointAddressId | Address Id of parcel's pickup point | number |
Note: To get MerchantPickupPointAddressId use this API - Get Pickup Points