Search
Operator avatar
Written by Operator
Updated over a week ago

Search

HTTP POST RESPONSE (JSON)

Query Parameter

Description

date

The job date. Format: YYYY-MM-DD e.g. 2019-05-14. Optional.

do

The D.O. #. This field must be unique for the date. Optional.

type

Either “Collection” or “Delivery”. Default: “Delivery”. Optional.

page

Page number, for use if the number of data returned is huge. Optional

SAMPLE REQUEST JSON #1 - Search by D.O. #, Date and Type

{
  "q": {
    "do": "DO123",
    "date": "2019-05-01",
    "type": "Delivery"
  },
  "page": 1
}

SAMPLE REQUEST JSON #2 - Search for jobs in a certain date

{
  "q": {
    "date": "2019-05-01"
  },
  "page": 1
}

SAMPLE REQUEST JSON #5 - Search for jobs by D.O. #

{
  "q": {
    "do": "DO123"
  },
  "page": 1
}

SAMPLE RESPONSE JSON #1 - Search by D.O. # and Date

{
  "info": {
    "status": "ok"
  },
  "jobs": [
    {
      "created_at": "2019-05-01T06:30:59.007+8:00",
      "updated_at": "2019-05-01T23:00:30.037+8:00",
      "do": "DO123",
      "date": "2019-05-01",
      "address": "63 Ubi Avenue 1 Singapore 408937",
      "delivery_time": "09:00 AM - 12:00 PM",
      "deliver_to": "John Tan",
      "phone": "+6591234567",
      "notify_email": "john.tan@example.com",
      "notify_url": "http://www.example.com/notify.php",
      "assign_to": "GT1234H",
      "instructions": "Call customer upon arrival.",
      "zone": "East",
      "reason": "",
      "note": "Recipient commented that delivery is very prompt.",
      "received_by": "John",
      "image": 1,
      "view_image_url": "https://app.detrack.com/deliveries/photo/52cbaf87f92ea105a4000115.jpg",
      "status": "Delivered",
      "time": "2019-05-01T09:30:45+08:00",
      "pod_lat": 1.32502083807714,
      "pod_lng": 103.89377927122,
      "pod_address": "63 Ubi Avenue 1, Singapore 408937",
      "items": [
        {
          "sku": "T0101",
          "desc": "Test Item #01",
          "qty": 1,
          "reject": 0,
          "reason": ""
        },
        {
          "sku": "T0102",
          "desc": "Test Item #02",
          "qty": 5,
          "reject": 0,
          "reason": ""
        },
        {
          "sku": "T0103",
          "desc": "Test Item #03",
          "qty": 10,
          "reject": 0,
          "reason": ""
        }
      ],
      "milestones": [
        {
          "status": "out_for_delivery",
          "assign_to": "iPhone",
          "pod_date_time": "2019-05-01T01:13:38.475+08:00",
          "reason": "",
          "handled_by": "",
          "note": "",
          "pod_lat": "",
          "pod_lng": "",
          "pod_address": "",
          "arr_lat": "",
          "arr_lng": "",
          "arr_add": "",
          "arr_at": "",
          "sno": "",
          "signed_at": "",
          "p1_at": "",
          "p2_at": "",
          "p3_at": "",
          "p4_at": "",
          "p5_at": "",
          "paid": ""
        },
        {
          "status": "completed",
          "assign_to": "iPhone",
          "pod_date_time": "2019-05-01T00:03:49.301+08:00",
          "reason": "",
          "handled_by": "G",
          "note": "",
          "pod_lat": 1.33525188546752,
          "pod_lng": 103.913678890191,
          "pod_address": "",
          "arr_lat": "",
          "arr_lng": "",
          "arr_add": "",
          "arr_at": "",
          "sno": "",
          "signed_at": "",
          "p1_at": "",
          "p2_at": "",
          "p3_at": "",
          "p4_at": "",
          "p5_at": "",
          "paid": ""
        }
      ]
    }
  ],
  "total_count": 1,
  "total_pages": 1,
  "current_page": 1,
  "prev_page": null,
  "next_page": null
}

Did this answer your question?