POST /v1/packages
{
"customer_name": "Sopheak",
"phone_number": "016955505",
"address_name": "Wat Phnom Penh",
"lat": 11.5760445,
"lng": 104.9208625,
"instruction": "Drop at the door. No need to call"
}
JSON Response
It will return the package_id
.
{
"data": {
"package_id": 635431
}
}
Fields | Description |
---|---|
value | Value of the package in USD |
cash | Cash on delivery. The cash that you want us to collect |
lat | Latitude of your customer. It does not need to be exact. Our delivery team will make another call customer to verify if neccessary |
lng | Longitude of your customer. It does not need to be exact. Our delivery team will make another call customer to verify if neccessary |
address_name | Customer address |
phone_number | Customer phone number. It is number that our team contact to when deliver |
customer_name | Customer name |
appointed_at | Appointed time with customer. We try to delivery within this time but it is not guarantee. For example: "2021-01-01 15:00:00" |
instruction | Additional instruction that help us delivery or additional request |
x | Width of package in cm |
y | Height of package in cm |
z | Length of package in cm |
weight | Weight in kg |
sender.lat | (Optional) Specified the sender latitude |
sender.lng | (Optional) Specified the sender longitude |
sender.address_name | (Optional) Sender address name |
sender.phone_number | (Optional) Sender phone number |
sender.name | (Optional) Sender name |
POST /v1/packages
{
"customer_name": "Sopheak",
"phone_number": "016955505",
"address_name": "Wat Phnom Penh",
"lat": 11.5760445,
"lng": 104.9208625,
"instruction": "Drop at the door. No need to call",
"sender": {
"lat": "11.5564",
"lng": "104.9282",
"address_name": "Wat Phnom",
"phone_number": "016000001",
"name": "Random Online Shop"
}
}
Coming Soon
Sometimes, you want to know the fee in advance to display to your customer. You can use the following endpoint. You can use the same parameters as you use for creating the package to get the estimate price.
POST /v1/packages/estimate_price
{
"customer_name": "Sopheak",
"phone_number": "016955505",
"address_name": "Wat Phnom Penh",
"lat": 11.5760445,
"lng": 104.9208625,
"instruction": "Drop at the door. No need to call"
}
JSON Response
{
"data": {
"price": 0.5
}
}