Create delivery package

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
  }
}

Params

FieldsDescription
valueSome description
cashSome description
latSome description
lngSome description
address_nameSome description
phone_numberSome description
customer_nameSome description
appointed_atSome description
instructionSome description
xSome description
ySome description
zSome description
weightSome description

Request Pickup

POST /v1/packages/request_pickup
{
   "package_ids": [635431, 635432],
   "schedule_at": "2021-05-10"
}

JSON Response

{
  "data": {
    "success": true
  }
}

Params

FieldsDescription
package_ids (*)Package ID in Array
schedule_atSchedule Pickup

Update delivery package

POST /v1/packages/{id}
{
  "address_name": "Wat Phnom Penh",
  "lat": 11.5760445,
  "lng": 104.9208625,
  "instruction": "Ring the bell when you arrive"
}

JSON Response

{
  "data": {
    "success": true
  }
}

Params

FieldsDescription
valueSome description
cashSome description
latSome description
lngSome description
address_nameSome description
phone_numberSome description
customer_nameSome description
appointed_atSome description
instructionSome description
xSome description
ySome description
zSome description
weightSome description