FORMAT: 1A
HOST: https://app.detrack.com/api/v2

# Detrack API V2

This describes the resources that make up the official Detrack REST API v2. If you have any problems or requests please contact Detrack support.

## Schema

All timestamps return in ISO 8601 format:

`YYYY-MM-DDTHH:MM:SSZ`

## Client Errors

These are the possible error statuses:

+ Status `400` - Bad request. E.g. Malformed JSON.
+ Status `401` - Unauthorized.
+ Status `403` - Forbidden. You do not the permission to make the request.
+ Status `404` - Record not found.
+ Status `422` - Failed to process request because of validation error.
+ Status `429` - Exceeded rate limit.

## API key

When using API key, please set the header X-API-KEY with the key.

X-API-KEY: 9943520c80ee2aaad2cc80c29bdfb298e85feed021ef0328

## Rate Limiting

The rate limit allows up to 60 requests per minute. The server will response with status 429 (too many requests) when rate limit exceeded.

## Group Jobs

## Job (object)

Attributes

+ `type` (string) Detrack Job Type. Must be `Delivery` / `Collection`.
+ `primary_job_status` (string) Primary job status.
+ `open_to_marketplace` (string) Open to marketplace.
+ `marketplace_offer` (string) Marketplace offer.
+ `do_number` (string required) D.O No.
+ `date` (date required) Date.
+ `start_date` (date) Start date.
+ `status` (string) Job Status.
+ `job_release_time` (time) Job release time.
+ `job_time` (string) Job time.
+ `job_received_date` (date) Job received date.
+ `tracking_number` (string) Tracking number.
+ `order_number` (string) Order number.
+ `job_type` (string) Job type.
+ `job_sequence` (string) Job order.
+ `job_fee` (string) Job fee.
+ `address_lat` (string) Address lat.
+ `address_lng` (string) Address lng.
+ `address` (string required) Address.
+ `company_name` (string) Address company.
+ `address_1` (string) Address 1.
+ `address_2` (string) Address 2.
+ `address_3` (string) Address 3.
+ `postal_code` (string) Postal code.
+ `city` (string) City.
+ `state` (string) State.
+ `country` (string) Country.
+ `billing_address` (string) Billing address.
+ `deliver_to_collect_from` (string) Contact first name.
+ `last_name` (string) Contact last name.
+ `phone_number` (string) Contact phone.
+ `sender_phone_number` (string) Sender phone.
+ `fax_number` (string) Fax.
+ `instructions` (string) Instructions.
+ `assign_to` (string) Assign to.
+ `notify_email` (string) Notify email.
+ `webhook_url` (string) Webhook url.
+ `zone` (string) Zone.
+ `customer` (string) Customer.
+ `account_number` (string) Account number.
+ `job_owner` (string) Owner name.
+ `invoice_number` (string) Invoice number.
+ `invoice_amount` (string) Invoice amount.
+ `payment_mode` (string) Payment mode.
+ `payment_amount` (float) Payment amount.
+ `group_id` (string) Id of group that the job belongs to.
+ `group_name` (string) Group name.
+ `vendor_name` (string) Vendor name.
+ `source` (string) Source.
+ `weight` (integer) Weight.
+ `parcel_width` (integer) Parcel width.
+ `parcel_length` (integer) Parcel length.
+ `parcel_height` (integer) Parcel height.
+ `cubic_meter` (float) Cubic meter.
+ `boxes` (integer) Boxes.
+ `cartons` (integer) Cartons.
+ `pieces` (integer) Pieces.
+ `envelopes` (integer) Envelopes.
+ `pallets` (integer) Pallets.
+ `bins` (integer) Bins.
+ `trays` (integer) Trays.
+ `bundles` (integer) Bundles.
+ `rolls` (integer) Rolls.
+ `number_of_shipping_labels` (integer) Labels.
+ `attachment_url` (string) Attachment 1.
+ `carrier` (string) Carrier.
+ `auto_reschedule` (string) Reschedule.
+ `eta_time` (time) Eta time.
+ `depot` (string) Depot.
+ `depot_contact` (string) Depot contact.
+ `department` (string) Department.
+ `sales_person` (string) Sales person.
+ `identification_number` (string) Identification number.
+ `bank_prefix` (string) Bank prefix.
+ `run_number` (string) Run number.
+ `pick_up_from` (string) Pick up from.
+ `pick_up_time` (string) Pick up time.
+ `pick_up_lat` (string) Pick up lat.
+ `pick_up_lng` (string) Pick up lng.
+ `pick_up_address` (string) Pick up address.
+ `pick_up_address_1` (string) Pick up address 1.
+ `pick_up_address_2` (string) Pick up address 2.
+ `pick_up_address_3` (string) Pick up address 3.
+ `pick_up_city` (string) Pick up city.
+ `pick_up_state` (string) Pick up state.
+ `pick_up_country` (string) Pick up country.
+ `pick_up_postal_code` (string) Pick up postal code.
+ `pick_up_zone` (string) Pick up zone.
+ `job_price` (float) Job price.
+ `insurance_price` (float) Insurance price.
+ `insurance_coverage` (string) Insured.
+ `total_price` (float) Total price.
+ `payer_type` (string) Payer type.
+ `remarks` (string) Remarks.
+ `service_type` (string) Service type.
+ `warehouse_address` (string) Warehouse address.
+ `destination_time_window` (string) Destination timeslot.
+ `door` (string) Door.
+ `time_zone` (string) Time zone.
+ `vehicle_type` (string) Vehicle type.
+ `items` (array[Item]) Array of items.
+ `pod_time` (time) POD time for manual update in format HH:MM (13:30).
+ `milestones` (array[Milestone]) Array of milestones.
+ `time_window_from` (string) Completion time window start.
+ `time_window_to` (string) Completion time window end.

Readonly Attributes

+ `id` (string) Job Id.
+ `job_age` (string) Job age.
+ `detrack_number` (string) Detrack number.
+ `tracking_status` (string) Tracking status.
+ `shipper_name` (string) Shipper name.
+ `reason` (string) Reason.
+ `last_reason` (string) Last reason.
+ `received_by_sent_by` (string) Received by.
+ `note` (string) Note.
+ `live_eta` (string) Live eta.
+ `pod_lat` (string) Pod lat.
+ `pod_lng` (string) Pod lng.
+ `pod_address` (string) Pod address.
+ `info_received_at` (time) Info received at.
+ `head_to_pick_up_at` (time) Head to pick up at.
+ `pick_up_at` (time) Pick up at.
+ `scheduled_at` (time) Scheduled at.
+ `at_warehouse_at` (time) At warehouse at.
+ `out_for_delivery_at` (time) Out for delivery at.
+ `head_to_delivery_at` (time) Head to delivery at.
+ `cancelled_at` (time) Cancelled at.
+ `pick_up_failed_count` (time) Pick up failed count.
+ `deliver_failed_count` (time) Deliver failed count.
+ `pick_up_assign_to` (string) Pick up assign to.
+ `pick_up_reason` (string) Pick up reason.
+ `pod_at` (time) Pod at.
+ `texted_at` (time) Texted at.
+ `called_at` (time) Called at.
+ `address_tracked_at` (time) Address tracked at.
+ `arrived_lat` (float) Arrived lat.
+ `arrived_lng` (float) Arrived lng.
+ `arrived_address` (string) Arrived address.
+ `arrived_at` (time) Arrived at.
+ `serial_number` (string) Serial number.
+ `signed_at` (time) Signed at.
+ `photo_1_at` (time) Photo 1 at.
+ `photo_2_at` (time) Photo 2 at.
+ `photo_3_at` (time) Photo 3 at.
+ `photo_4_at` (time) Photo 4 at.
+ `photo_5_at` (time) Photo 5 at.
+ `photo_6_at` (time) Photo 6 at.
+ `photo_7_at` (time) Photo 7 at.
+ `photo_8_at` (time) Photo 8 at.
+ `photo_9_at` (time) Photo 9 at.
+ `photo_10_at` (time) Photo 10 at.
+ `signature_file_url` (string) Signature file URL.
+ `photo_1_file_url` (string) Photo 1 file URL.
+ `photo_2_file_url` (string) Photo 2 file URL.
+ `photo_3_file_url` (string) Photo 3 file URL.
+ `photo_4_file_url` (string) Photo 4 file URL.
+ `photo_5_file_url` (string) Photo 5 file URL.
+ `photo_6_file_url` (string) Photo 6 file URL.
+ `photo_7_file_url` (string) Photo 7 file URL.
+ `photo_8_file_url` (string) Photo 8 file URL.
+ `photo_9_file_url` (string) Photo 9 file URL.
+ `photo_10_file_url` (string) Photo 10 file URL.
+ `actual_weight` (integer) Actual weight.
+ `temperature` (integer) Temperature.
+ `hold_time` (integer) Hold time.
+ `payment_collected` (float) Payment collected.
+ `actual_crates` (integer) Actual crates.
+ `actual_pallets` (integer) Actual pallets.
+ `actual_utilization` (integer) Actual utilization.
+ `attempt` (integer) Attempt.
+ `goods_service_rating` (integer) Goods service rating.
+ `driver_rating` (integer) Driver rating.
+ `customer_feedback` (string) Feedback remarks.
+ `items_count` (integer) Items count.
+ `tracking_link` (string) Link to tracking wiget.

## Job Item (object)

+ `sku` (string) SKU. Required if description is blank.
+ `description` (string) Description. Required if SKU is blank.
+ `purchase_order_number` (string) Purchase order number.
+ `batch_number` (string) Batch number.
+ `expiry_date` (string) Expiry.
+ `comments` (string) Comments.
+ `quantity` (integer) Quantity.
+ `unit_of_measure` (string) Unit of measure.
+ `checked` (boolean) Checked.
+ `actual_quantity` (integer) Actual quantity.
+ `inbound_quantity` (integer) Inbound quantity.
+ `unload_time_estimate` (string) Unload time estimate.
+ `unload_time_actual` (string) Unload time actual.
+ `follow_up_quantity` (integer) Follow up quantity.
+ `follow_up_reason` (string) Follow up reason.
+ `rework_quantity` (integer) Rework quantity.
+ `rework_reason` (string) Rework reason.
+ `weight` (float) Weight.

Readonly Attribute

+ `id` (string) Job item id.
+ `photo_url` (string) Photo URL.
+ `serial_numbers` (array[string]) Serial numbers.

## Milestone (object)

+ `status` (string) Status. Job status.
+ `assign_to` (string) Driver.
+ `reason` (string) Reason for failed job.
+ `pod_at` (time) Time of status change.
+ `created_at` (time) Time of milestone created.
+ `user_name` (string) Name of user.

## List / Create [/dn/jobs{?page}{?limit}{?sort}{?type}{?date}{?assign_to}{?status}{?do_number}{?query}]

### List [GET]

+ Parameters

    + `page`: `2` (number, optional) - Page number.
        + default: `1`

    + `limit`: `50` (number, optional) - Number of records per page. Maximum 100.
        + default: `20`

    + `sort`: `-created_at` (string, optional) - Attribute to be sorted. Add minus `-` for descending order.

    + `date`: `2018-06-08` (date, optional) - Filter jobs by date (YYYY-MM-DD).

    + `type`: `Delivery` (string, optional) - Filter jobs by type (`Delivery` / `Collection`).

    + `assign_to`: `Driver A` (string) - Filter jobs by assign_to.

    + `status`: `completed,completed_partial,failed` (string) - Filter jobs by status. Use comma to seperate multiple statuses.

    + `do_number`: `DO12345` (string) - Filter jobs by DO number.

    + `query`: `DO12345` (string) - Query to search jobs for DO number, address, delivery to, notify email, assign to, tracking number and zone.

+ Request (application/json)

    + Headers

            X-API-KEY: {API_KEY}

+ Response 200 (application/json)

    + Body

            {
                "data": [
                    {
                        "id": "5b22055510c92b1a046ece04",
                        "type": "Delivery",
                        "primary_job_status": "dispatched",
                        "open_to_marketplace": false,
                        "marketplace_offer": null,
                        "do_number": "DO 0",
                        "attempt": 1,
                        "date": "2018-06-14",
                        "start_date": "2018-06-14",
                        "time_window_from": null,
                        "time_window_to": null,
                        "job_age": 1,
                        "job_release_time": null,
                        "job_time": null,
                        "time_window": null,
                        "job_received_date": null,
                        "tracking_number": "T0",
                        "order_number": "ORN12345678",
                        "job_type": null,
                        "job_sequence": null,
                        "job_fee": null,
                        "address_lat": null,
                        "address_lng": null,
                        "address": "Singapore 470140",
                        "company_name": null,
                        "address_1": null,
                        "address_2": null,
                        "address_3": null,
                        "postal_code": "470140",
                        "city": null,
                        "state": null,
                        "country": null,
                        "geocoded_lat": 1.33668219002454,
                        "geocoded_lng": 103.910711702473,
                        "billing_address": null,
                        "deliver_to_collect_from": "James Li",
                        "last_name": null,
                        "phone_number": "65432178",
                        "sender_phone_number": null,
                        "fax_number": "65432179",
                        "instructions": null,
                        "assign_to": null,
                        "notify_email": "test@example.com",
                        "webhook_url": null,
                        "zone": null,
                        "customer": null,
                        "account_number": null,
                        "job_owner": null,
                        "invoice_number": null,
                        "invoice_amount": null,
                        "payment_mode": null,
                        "payment_amount": null,
                        "group_name": null,
                        "vendor_name": null,
                        "shipper_name": null,
                        "source": null,
                        "weight": null,
                        "parcel_width": null,
                        "parcel_length": null,
                        "parcel_height": null,
                        "cubic_meter": null,
                        "boxes": null,
                        "cartons": null,
                        "pieces": null,
                        "envelopes": null,
                        "pallets": null,
                        "bins": null,
                        "trays": null,
                        "bundles": null,
                        "rolls": null,
                        "number_of_shipping_labels": null,
                        "attachment_url": null,
                        "detrack_number": "DET2000001",
                        "status": "dispatched",
                        "tracking_status": "Info received",
                        "reason": null,
                        "last_reason": null,
                        "received_by_sent_by": null,
                        "note": null,
                        "carrier": null,
                        "pod_lat": "",
                        "pod_lng": "",
                        "pod_address": "",
                        "address_tracked_at": null,
                        "arrived_lat": null,
                        "arrived_lng": null,
                        "arrived_address": null,
                        "arrived_at": null,
                        "texted_at": null,
                        "called_at": null,
                        "serial_number": null,
                        "signed_at": null,
                        "photo_1_at": null,
                        "photo_2_at": null,
                        "photo_3_at": null,
                        "photo_4_at": null,
                        "photo_5_at": null,
                        "signature_file_url": null,
                        "photo_1_file_url": null,
                        "photo_2_file_url": null,
                        "photo_3_file_url": null,
                        "photo_4_file_url": null,
                        "photo_5_file_url": null,
                        "actual_weight": null,
                        "temperature": null,
                        "hold_time": null,
                        "payment_collected": null,
                        "auto_reschedule": null,
                        "actual_crates": null,
                        "actual_pallets": null,
                        "actual_utilization": null,
                        "goods_service_rating": null,
                        "driver_rating": null,
                        "customer_feedback": null,
                        "eta_time": null,
                        "live_eta": null,
                        "depot": null,
                        "depot_contact": null,
                        "department": null,
                        "sales_person": null,
                        "identification_number": null,
                        "bank_prefix": null,
                        "run_number": null,
                        "pick_up_from": null,
                        "pick_up_time": null,
                        "pick_up_lat": null,
                        "pick_up_lng": null,
                        "pick_up_address": null,
                        "pick_up_address_1": null,
                        "pick_up_address_2": null,
                        "pick_up_address_3": null,
                        "pick_up_city": null,
                        "pick_up_state": null,
                        "pick_up_country": null,
                        "pick_up_postal_code": null,
                        "pick_up_zone": null,
                        "pick_up_assign_to": null,
                        "pick_up_reason": null,
                        "info_received_at": "2018-06-14T06:04:06.017Z",
                        "pick_up_at": null,
                        "scheduled_at": null,
                        "at_warehouse_at": null,
                        "out_for_delivery_at": null,
                        "head_to_pick_up_at": null,
                        "head_to_delivery_at": null,
                        "cancelled_at": null,
                        "pod_at": null,
                        "pick_up_failed_count": null,
                        "deliver_failed_count": null,
                        "job_price": null,
                        "insurance_price": null,
                        "insurance_coverage": false,
                        "total_price": null,
                        "payer_type": null,
                        "remarks": null,
                        "items_count": 2,
                        "service_type": null,
                        "warehouse_address": null,
                        "destination_time_window": null,
                        "door": null,
                        "time_zone": null,
                        "vehicle_type": null,
                        "created_at": "2018-06-14T06:04:06.017Z",
                        "items": [{
                            "id": "5b22055510c92b1a046ece05",
                            "sku": "12345678",
                            "purchase_order_number": null,
                            "batch_number": null,
                            "expiry_date": null,
                            "description": null,
                            "comments": null,
                            "quantity": 10,
                            "unit_of_measure": null,
                            "checked": false,
                            "actual_quantity": null,
                            "inbound_quantity": null,
                            "unload_time_estimate": null,
                            "unload_time_actual": null,
                            "follow_up_quantity": null,
                            "follow_up_reason": null,
                            "rework_quantity": null,
                            "rework_reason": null,
                            "reject_quantity": 0,
                            "reject_reason": null,
                            "weight": null,
                            "serial_numbers": [],
                            "photo_url": null
                        }, {
                            "id": "5b22055510c92b1a046ece06",
                            "sku": "12387654",
                            "purchase_order_number": null,
                            "batch_number": null,
                            "expiry_date": null,
                            "description": null,
                            "comments": null,
                            "quantity": 5,
                            "unit_of_measure": null,
                            "checked": false,
                            "actual_quantity": null,
                            "inbound_quantity": null,
                            "unload_time_estimate": null,
                            "unload_time_actual": null,
                            "follow_up_quantity": null,
                            "follow_up_reason": null,
                            "rework_quantity": null,
                            "rework_reason": null,
                            "reject_quantity": 0,
                            "reject_reason": null,
                            "weight": null,
                            "serial_numbers": [],
                            "photo_url": null
                        }],
                        "milestones": [{
                            "status": "info_recv",
                            "assign_to": null,
                            "reason": null,
                            "pod_at": "2018-06-14T06:04:06.017Z",
                            "created_at": "2018-06-14T06:04:06.017Z",
                            "user_name": "Simon"
                        }]
                    }
                ],
                "links": {
                    "next": "https://app.detrack.com/api/v2/dn/jobs?page=2&limit=10",
                    "prev": null
                }
            }

### Create [POST]

+ Request (application/json)

    + Headers

            X-API-KEY: {API_KEY}

    + Body

            {
                "data": {
                    "type": "Delivery",
                    "primary_job_status": "dispatched",
                    "open_to_marketplace": false,
                    "marketplace_offer": null,
                    "do_number": "DO 0",
                    "attempt": 1,
                    "date": "2018-06-14",
                    "start_date": "2018-06-14",
                    "time_window_from": null,
                    "time_window_to": null,
                    "job_age": 1,
                    "job_release_time": null,
                    "job_time": null,
                    "time_window": null,
                    "job_received_date": null,
                    "tracking_number": "T0",
                    "order_number": "ORN12345678",
                    "job_type": null,
                    "job_sequence": null,
                    "job_fee": null,
                    "address_lat": null,
                    "address_lng": null,
                    "address": "Singapore 470140",
                    "company_name": null,
                    "address_1": null,
                    "address_2": null,
                    "address_3": null,
                    "postal_code": "470140",
                    "city": null,
                    "state": null,
                    "country": null,
                    "geocoded_lat": 1.33668219002454,
                    "geocoded_lng": 103.910711702473,
                    "billing_address": null,
                    "deliver_to_collect_from": "James Li",
                    "last_name": null,
                    "phone_number": "65432178",
                    "sender_phone_number": null,
                    "fax_number": "65432179",
                    "instructions": null,
                    "assign_to": null,
                    "notify_email": "test@example.com",
                    "webhook_url": null,
                    "zone": null,
                    "customer": null,
                    "account_number": null,
                    "job_owner": null,
                    "invoice_number": null,
                    "invoice_amount": null,
                    "payment_mode": null,
                    "payment_amount": null,
                    "group_name": null,
                    "vendor_name": null,
                    "shipper_name": null,
                    "source": null,
                    "weight": null,
                    "parcel_width": null,
                    "parcel_length": null,
                    "parcel_height": null,
                    "cubic_meter": null,
                    "boxes": null,
                    "cartons": null,
                    "pieces": null,
                    "envelopes": null,
                    "pallets": null,
                    "bins": null,
                    "trays": null,
                    "bundles": null,
                    "rolls": null,
                    "number_of_shipping_labels": null,
                    "attachment_url": null,
                    "detrack_number": "DET2000001",
                    "status": "dispatched",
                    "tracking_status": "Info received",
                    "reason": null,
                    "last_reason": null,
                    "received_by_sent_by": null,
                    "note": null,
                    "carrier": null,
                    "pod_lat": "",
                    "pod_lng": "",
                    "pod_address": "",
                    "address_tracked_at": null,
                    "arrived_lat": null,
                    "arrived_lng": null,
                    "arrived_address": null,
                    "arrived_at": null,
                    "texted_at": null,
                    "called_at": null,
                    "serial_number": null,
                    "signed_at": null,
                    "photo_1_at": null,
                    "photo_2_at": null,
                    "photo_3_at": null,
                    "photo_4_at": null,
                    "photo_5_at": null,
                    "signature_file_url": null,
                    "photo_1_file_url": null,
                    "photo_2_file_url": null,
                    "photo_3_file_url": null,
                    "photo_4_file_url": null,
                    "photo_5_file_url": null,
                    "actual_weight": null,
                    "temperature": null,
                    "hold_time": null,
                    "payment_collected": null,
                    "auto_reschedule": null,
                    "actual_crates": null,
                    "actual_pallets": null,
                    "actual_utilization": null,
                    "goods_service_rating": null,
                    "driver_rating": null,
                    "customer_feedback": null,
                    "eta_time": null,
                    "live_eta": null,
                    "depot": null,
                    "depot_contact": null,
                    "department": null,
                    "sales_person": null,
                    "identification_number": null,
                    "bank_prefix": null,
                    "run_number": null,
                    "pick_up_from": null,
                    "pick_up_time": null,
                    "pick_up_lat": null,
                    "pick_up_lng": null,
                    "pick_up_address": null,
                    "pick_up_address_1": null,
                    "pick_up_address_2": null,
                    "pick_up_address_3": null,
                    "pick_up_city": null,
                    "pick_up_state": null,
                    "pick_up_country": null,
                    "pick_up_postal_code": null,
                    "pick_up_zone": null,
                    "pick_up_assign_to": null,
                    "pick_up_reason": null,
                    "info_received_at": "2018-06-14T06:04:06.017Z",
                    "pick_up_at": null,
                    "scheduled_at": null,
                    "at_warehouse_at": null,
                    "out_for_delivery_at": null,
                    "head_to_pick_up_at": null,
                    "head_to_delivery_at": null,
                    "cancelled_at": null,
                    "pod_at": null,
                    "pick_up_failed_count": null,
                    "deliver_failed_count": null,
                    "job_price": null,
                    "insurance_price": null,
                    "insurance_coverage": false,
                    "total_price": null,
                    "payer_type": null,
                    "remarks": null,
                    "items_count": 2,
                    "service_type": null,
                    "warehouse_address": null,
                    "destination_time_window": null,
                    "door": null,
                    "time_zone": null,
                    "vehicle_type": null,
                    "created_at": "2018-06-14T06:04:06.017Z",
                    "items": [{
                        "id": "5b22055510c92b1a046ece05",
                        "sku": "12345678",
                        "purchase_order_number": null,
                        "batch_number": null,
                        "expiry_date": null,
                        "description": null,
                        "comments": null,
                        "quantity": 10,
                        "unit_of_measure": null,
                        "checked": false,
                        "actual_quantity": null,
                        "inbound_quantity": null,
                        "unload_time_estimate": null,
                        "unload_time_actual": null,
                        "follow_up_quantity": null,
                        "follow_up_reason": null,
                        "rework_quantity": null,
                        "rework_reason": null,
                        "reject_quantity": 0,
                        "reject_reason": null,
                        "weight": null,
                        "serial_numbers": [],
                        "photo_url": null
                    }, {
                        "id": "5b22055510c92b1a046ece06",
                        "sku": "12387654",
                        "purchase_order_number": null,
                        "batch_number": null,
                        "expiry_date": null,
                        "description": null,
                        "comments": null,
                        "quantity": 5,
                        "unit_of_measure": null,
                        "checked": false,
                        "actual_quantity": null,
                        "inbound_quantity": null,
                        "unload_time_estimate": null,
                        "unload_time_actual": null,
                        "follow_up_quantity": null,
                        "follow_up_reason": null,
                        "rework_quantity": null,
                        "rework_reason": null,
                        "reject_quantity": 0,
                        "reject_reason": null,
                        "weight": null,
                        "serial_numbers": [],
                        "photo_url": null
                    }]
                }
            }

+ Response 201 (application/json)

    + Headers

            Location: https://app.detrack.com/api/v2/dn/jobs/{do_number}

    + Body

            {
                "data": {
                    "id": "5b22055510c92b1a046ece04",
                    "type": "Delivery",
                    "primary_job_status": "dispatched",
                    "open_to_marketplace": false,
                    "marketplace_offer": null,
                    "do_number": "DO 0",
                    "attempt": 1,
                    "date": "2018-06-14",
                    "start_date": "2018-06-14",
                    "time_window_from": null,
                    "time_window_to": null,
                    "job_age": 1,
                    "job_release_time": null,
                    "job_time": null,
                    "time_window": null,
                    "job_received_date": null,
                    "tracking_number": "T0",
                    "order_number": "ORN12345678",
                    "job_type": null,
                    "job_sequence": null,
                    "job_fee": null,
                    "address_lat": null,
                    "address_lng": null,
                    "address": "Singapore 470140",
                    "company_name": null,
                    "address_1": null,
                    "address_2": null,
                    "address_3": null,
                    "postal_code": "470140",
                    "city": null,
                    "state": null,
                    "country": null,
                    "geocoded_lat": 1.33668219002454,
                    "geocoded_lng": 103.910711702473,
                    "billing_address": null,
                    "deliver_to_collect_from": "James Li",
                    "last_name": null,
                    "phone_number": "65432178",
                    "sender_phone_number": null,
                    "fax_number": "65432179",
                    "instructions": null,
                    "assign_to": null,
                    "notify_email": "test@example.com",
                    "webhook_url": null,
                    "zone": null,
                    "customer": null,
                    "account_number": null,
                    "job_owner": null,
                    "invoice_number": null,
                    "invoice_amount": null,
                    "payment_mode": null,
                    "payment_amount": null,
                    "group_name": null,
                    "vendor_name": null,
                    "shipper_name": null,
                    "source": null,
                    "weight": null,
                    "parcel_width": null,
                    "parcel_length": null,
                    "parcel_height": null,
                    "cubic_meter": null,
                    "boxes": null,
                    "cartons": null,
                    "pieces": null,
                    "envelopes": null,
                    "pallets": null,
                    "bins": null,
                    "trays": null,
                    "bundles": null,
                    "rolls": null,
                    "number_of_shipping_labels": null,
                    "attachment_url": null,
                    "detrack_number": "DET2000001",
                    "status": "dispatched",
                    "tracking_status": "Info received",
                    "reason": null,
                    "last_reason": null,
                    "received_by_sent_by": null,
                    "note": null,
                    "carrier": null,
                    "pod_lat": "",
                    "pod_lng": "",
                    "pod_address": "",
                    "address_tracked_at": null,
                    "arrived_lat": null,
                    "arrived_lng": null,
                    "arrived_address": null,
                    "arrived_at": null,
                    "texted_at": null,
                    "called_at": null,
                    "serial_number": null,
                    "signed_at": null,
                    "photo_1_at": null,
                    "photo_2_at": null,
                    "photo_3_at": null,
                    "photo_4_at": null,
                    "photo_5_at": null,
                    "signature_file_url": null,
                    "photo_1_file_url": null,
                    "photo_2_file_url": null,
                    "photo_3_file_url": null,
                    "photo_4_file_url": null,
                    "photo_5_file_url": null,
                    "actual_weight": null,
                    "temperature": null,
                    "hold_time": null,
                    "payment_collected": null,
                    "auto_reschedule": null,
                    "actual_crates": null,
                    "actual_pallets": null,
                    "actual_utilization": null,
                    "goods_service_rating": null,
                    "driver_rating": null,
                    "customer_feedback": null,
                    "eta_time": null,
                    "live_eta": null,
                    "depot": null,
                    "depot_contact": null,
                    "department": null,
                    "sales_person": null,
                    "identification_number": null,
                    "bank_prefix": null,
                    "run_number": null,
                    "pick_up_from": null,
                    "pick_up_time": null,
                    "pick_up_lat": null,
                    "pick_up_lng": null,
                    "pick_up_address": null,
                    "pick_up_address_1": null,
                    "pick_up_address_2": null,
                    "pick_up_address_3": null,
                    "pick_up_city": null,
                    "pick_up_state": null,
                    "pick_up_country": null,
                    "pick_up_postal_code": null,
                    "pick_up_zone": null,
                    "pick_up_assign_to": null,
                    "pick_up_reason": null,
                    "info_received_at": "2018-06-14T06:04:06.017Z",
                    "pick_up_at": null,
                    "scheduled_at": null,
                    "at_warehouse_at": null,
                    "out_for_delivery_at": null,
                    "head_to_pick_up_at": null,
                    "head_to_delivery_at": null,
                    "cancelled_at": null,
                    "pod_at": null,
                    "pick_up_failed_count": null,
                    "deliver_failed_count": null,
                    "job_price": null,
                    "insurance_price": null,
                    "insurance_coverage": false,
                    "total_price": null,
                    "payer_type": null,
                    "remarks": null,
                    "items_count": 2,
                    "service_type": null,
                    "warehouse_address": null,
                    "destination_time_window": null,
                    "door": null,
                    "time_zone": null,
                    "vehicle_type": null,
                    "created_at": "2018-06-14T06:04:06.017Z",
                    "items": [{
                        "id": "5b22055510c92b1a046ece05",
                        "sku": "12345678",
                        "purchase_order_number": null,
                        "batch_number": null,
                        "expiry_date": null,
                        "description": null,
                        "comments": null,
                        "quantity": 10,
                        "unit_of_measure": null,
                        "checked": false,
                        "actual_quantity": null,
                        "inbound_quantity": null,
                        "unload_time_estimate": null,
                        "unload_time_actual": null,
                        "follow_up_quantity": null,
                        "follow_up_reason": null,
                        "rework_quantity": null,
                        "rework_reason": null,
                        "reject_quantity": 0,
                        "reject_reason": null,
                        "weight": null,
                        "serial_numbers": [],
                        "photo_url": null
                    }, {
                        "id": "5b22055510c92b1a046ece06",
                        "sku": "12387654",
                        "purchase_order_number": null,
                        "batch_number": null,
                        "expiry_date": null,
                        "description": null,
                        "comments": null,
                        "quantity": 5,
                        "unit_of_measure": null,
                        "checked": false,
                        "actual_quantity": null,
                        "inbound_quantity": null,
                        "unload_time_estimate": null,
                        "unload_time_actual": null,
                        "follow_up_quantity": null,
                        "follow_up_reason": null,
                        "rework_quantity": null,
                        "rework_reason": null,
                        "reject_quantity": 0,
                        "reject_reason": null,
                        "weight": null,
                        "serial_numbers": [],
                        "photo_url": null
                    }],
                    "milestones": [{
                        "status": "info_recv",
                        "assign_to": null,
                        "reason": null,
                        "pod_at": "2018-06-14T06:04:06.017Z",
                        "created_at": "2018-06-14T06:04:06.017Z",
                        "user_name": "Simon"
                    }]

                }
            }

## Batch Create [/dn/jobs/bulk]

Create up to 100 jobs per request.

### Create [POST]

+ Request (application/json)

    + Headers

            X-API-KEY: {API_KEY}

    + Body

            {
                "data": [
                  {
                    "type": "Delivery",
                    "do_number": "DO 0",
                    "date": "2018-06-14",
                    "tracking_number": "T0",
                    "order_number": "ORN12345678",
                    "address": "Singapore 470140",
                    "deliver_to_collect_from": "James Li",
                    "phone_number": "65432178",
                    "fax_number": "65432179",
                    "notify_email": "test@email.com",
                    "items": [{
                        "sku": "12345678",
                        "description": "iPad",
                        "quantity": 10
                    }, {
                        "sku": "12345688",
                        "description": "iPhone",
                        "quantity": 10
                    }]
                  },
                  {
                    "type": "Delivery",
                    "do_number": "DO 1",
                    "date": "2018-06-14",
                    "tracking_number": "T0",
                    "order_number": "ORN12345688",
                    "address": "Singapore 470150",
                    "deliver_to_collect_from": "Simon Loh",
                    "phone_number": "65432178",
                    "fax_number": "65432179",
                    "notify_email": "simon@test.com",
                    "items": [{
                        "sku": "12345678",
                        "description": "iPad",
                        "quantity": 10
                    }, {
                        "sku": "12345688",
                        "description": "iPhone",
                        "quantity": 10
                    }]
                  }
                ]
            }

+ Response 200 (application/json)

    + Body

            {
                "data": [
                  {
                    "id": "5b28c8e810c92b1fe0f9571a",
                    "type": "Delivery",
                    "do_number": "DO 0",
                    "date": "2018-06-14",
                    "tracking_number": "T0",
                    "order_number": "ORN12345678",
                    "address": "Singapore 470140",
                    "deliver_to_collect_from": "James Li",
                    "phone_number": "65432178",
                    "fax_number": "65432179",
                    "notify_email": "test@email.com",
                    "items": [{
                        "id": "5b28c8e810c92b1fe0f9571e",
                        "sku": "12345678",
                        "description": "iPad",
                        "quantity": 10
                    }, {
                        "id": "5b28c8e810c92b1fe0f9571f",
                        "sku": "12345688",
                        "description": "iPhone",
                        "quantity": 10
                    }]
                  },
                  {
                    "id": "5b28c8e810c92b1fe0f9571b",
                    "type": "Delivery",
                    "do_number": "DO 1",
                    "date": "2018-06-14",
                    "tracking_number": "T0",
                    "order_number": "ORN12345688",
                    "address": "Singapore 470150",
                    "deliver_to_collect_from": "Simon Loh",
                    "phone_number": "65432178",
                    "fax_number": "65432179",
                    "notify_email": "simon@test.com",
                    "items": [{
                        "id": "5b28c8e810c92b1fe0f9571c",
                        "sku": "12345678",
                        "description": "iPad",
                        "quantity": 10
                    }, {
                        "id": "5b28c8e810c92b1fe0f9571d",
                        "sku": "12345688",
                        "description": "iPhone",
                        "quantity": 10
                    }]
                  }
                ]
            }

+ Response 422 (application/json)

    + Body

            {
                "code": "validation_failed",
                "message": "Validation failed",
                "data": [
                  {
                    "id": "5b28c8e810c92b1fe0f9571a",
                    "type": "Delivery",
                    "do_number": "DO 0",
                    "date": "2018-06-14",
                    "tracking_number": "T0",
                    "order_number": "ORN12345678",
                    "address": "Singapore 470140",
                    "deliver_to_collect_from": "James Li",
                    "phone_number": "65432178",
                    "fax_number": "65432179",
                    "notify_email": "test@email.com",
                    "items": [{
                        "id": "5b28c8e810c92b1fe0f9571e",
                        "sku": "12345678",
                        "description": "iPad",
                        "quantity": 10
                    }, {
                        "id": "5b28c8e810c92b1fe0f9571f",
                        "sku": "12345688",
                        "description": "iPhone",
                        "quantity": 10
                    }]
                  }
                ],
                errors: [
                  {
                    "id": "5b28c8e810c92b1fe0f9571b",
                    "type": "Delivery",
                    "do_number": "",
                    "date": "2018-06-14",
                    "tracking_number": "T0",
                    "order_number": "ORN12345688",
                    "address": "Singapore 470150",
                    "deliver_to_collect_from": "Simon Loh",
                    "phone_number": "65432178",
                    "fax_number": "65432179",
                    "notify_email": "simon@test.com",
                    "items": [{
                        "id": "5b28c8e810c92b1fe0f9571c",
                        "sku": "12345678",
                        "description": "iPad",
                        "quantity": 10
                    }, {
                        "id": "5b28c8e810c92b1fe0f9571d",
                        "sku": "12345688",
                        "description": "iPhone",
                        "quantity": 10
                    }],
                    errors: [
                      { field: 'do_number', codes: ['cannot be blank']}
                    ]
                  }
                ]
            }


## Batch Update / Delete [/dn/jobs]

Update / Delete up to 100 jobs per request.

## Update (object)

+ `do_number` (string required) - D.O No.
+ `date` (date, optional) - Date.
+ `type` (string, optional) - Detrack Job Type. Must be `Delivery` / `Collection`.
+ `data` (object) - Job object with fields and values to be updated.
+ `overwrite` (boolean, optional) - Set to `true` if you would like to overwrite completed jobs.

## Delete (object)

+ `do_number` (string required) D.O No.
+ `date` (date, optional) Date.
+ `type` (string, optional) Detrack Job Type. Must be `Delivery` or `Collection`.

### Update [PUT]

+ Request (application/json)

    + Headers

            X-API-KEY: {API_KEY}

    + Body

            {
                "data": [
                    {
                        "do_number": "5b22055510c92b1a046ece05",
                        "type": "Delivery",
                        "overwrite": true,
                        "data": { "job_sequence": 1 }
                    },
                    {
                        "do_number": "5b22055510c92b1a046ece06",
                        "date": "2020-08-20",
                        "type": "Delivery",
                        "data": { "job_sequence": 2 }
                    },
                    {
                        "do_number": "5b22055510c92b1a046ece07",
                        "type": "Delivery",
                        "data": { "job_sequence": 3 }
                    }
                ]
            }

+ Response 200 (application/json)

    + Body

            {
                "data": [
                    {
                        "do_number": "5b22055510c92b1a046ece05",
                        "date": null,
                        "type": "Delivery",
                        "ok": true
                    },
                    {
                        "do_number": "5b22055510c92b1a046ece06",
                        "date": "2020-08-20",
                        "type": "Delivery",
                        "ok": true
                    },
                    {
                        "do_number": "5b22055510c92b1a046ece07",
                        "date": null,
                        "type": "Delivery",
                        "ok": true
                    }
                ]
            }

+ Response 422 (application/json)

    + Body

            {
                "data": {
                    "data": [
                        {
                            "do_number": "5b22055510c92b1a046ece05",
                            "date": null,
                            "type": "Delivery",
                            "ok": true
                        },
                        {
                            "do_number": "5b22055510c92b1a046ece06",
                            "date": null,
                            "type": "Delivery",
                            "ok": true
                        },
                        {
                            "do_number": "5b22055510c92b1a046ece07",
                            "date": null,
                            "type": "Delivery",
                            "ok": false
                        }
                    ]
                },
                "code": "validation_failed",
                "message": "Validation failed",
                "errors": [{
                    "do_number": "5b22055510c92b1a046ece07",
                    "date": null,
                    "type": "Delivery",
                    "field": "job_sequence",
                    "codes": ["not_a_number"]
                }]

            }


### Delete [DELETE]

+ Request (application/json)

    + Headers

            X-API-KEY: {API_KEY}

    + Body

            {
                "data": [
                    {
                        "do_number": "5b22055510c92b1a046ece05",
                        "date": "2019-03-08",
                        "type": "Delivery"
                    },
                    {
                        "do_number": "5b22055510c92b1a046ece06"
                        "date": "2019-03-08",
                        "type": "Delivery"
                    },
                    {
                        "do_number": "5b22055510c92b1a046ece07"
                        "date": "2019-03-08",
                        "type": "Delivery"
                    }
                ]
            }

+ Response 200 (application/json)

    + Body

            {
                "data": [
                    {
                        "do_number": "5b22055510c92b1a046ece05",
                        "date": "2019-03-08",
                        "type": "Delivery",
                        "ok": true
                    },
                    {
                        "do_number": "5b22055510c92b1a046ece06",
                        "date": "2019-03-08",
                        "type": null,
                        "ok": true
                    },
                    {
                        "do_number": "5b22055510c92b1a046ece07",
                        "date": "2019-03-08",
                        "type": null,
                        "ok": true
                    }
                ]
            }

+ Response 422 (application/json)

    + Body

            {
                "data": [
                    {
                        "do_number": "5b22055510c92b1a046ece05",
                        "date": "2019-03-08",
                        "type": "Delivery",
                        "ok": true
                    },
                    {
                        "do_number": "5b22055510c92b1a046ece06",
                        "date": "2019-03-08",
                        "type": null,
                        "ok": true
                    },
                    {
                        "do_number": "5b22055510c92b1a046ece07",
                        "date": "2019-03-08",
                        "type": null,
                        "ok": false
                    }
                ],
                "code": "deletion_failed",
                "message": "Deletion failed",
                "errors": [{
                    "do_number": "5b22055510c92b1a046ece07",
                    "date": "2019-03-08",
                    "type": null,
                    "codes": ["undeletable"]
                }]
            }

## Batch Export [/dn/jobs/bulk/export]

This is for exporting of shipping labels or pod in batches by providing a list of DO number in the query object and an optional date.
It will response with an URL for checking the progress of the export. . Limited to 1000 jobs per request.

## Export (object)

+ `query` (object required) - Query object.
+ `document` (string, required) - Document Type. Must be `shipping-labels` / `pod`. Defaults to `pod`.

## Query (object)

+ `do_numbers` (array[String] required) - Array of D.O nos.
+ `date` (date optional) - Job date.
+ `type` (string optional) - Filter the export by type. Must be `Delivery` / `Collection`. If blank, both delivery and collection will be exported.

### Export [POST]

+ Request (application/json)

    + Headers

            X-API-KEY: {API_KEY}

    + Body

            {
                "data": {
                    "query": {
                        "do_numbers": [
                            "123456",
                            "654321"
                        ],
                        "date": "2022-02-22"
                    },
                    "document": "shipping-labels"
                }

            }

+ Response 200 (application/json)

    + Body

            {
                "data": {
                    "status_url": "https://app.detrack.com/api/v2/dn/jobs/export/status/5b22033310c92b1a086ece03"
                }
            }

## Get Export Status [/dn/jobs/export/status/{id}]

This is for checking the progress of the batch export. It will provide a download URL once exporting has completed. You may then use the download URL to download the exported file.

### Get Status [GET]

+ Parameters

    + id: `5b22033310c92b1a086ece03` (string, required) - Id of export.

+ Request (application/json)

    + Headers

            X-API-KEY: {API_KEY}

+ Response 200 (application/json)

    + Body

            {
                "data": {
                    "status": "completed",
                    "download_url": "https://detrack-exports.s3.dualstack.us-west-2.amazonaws.com/eb38494bd8a30498e76c890f/shipping-labels.pdf?response-content-disposition=attachment%3Bfilename%3Dshipping-labels.pdf&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJMOL6O2EG6TY2XCA%2F20220223%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20220223T004851Z&X-Amz-Expires=900&X-Amz-SignedHeaders=host&X-Amz-Signature=5778549def8fd9c2ed45b9bf75618c69c2b856683b2a9ad3fa3bb5e3df387d96"
                }
            }

## Retrieve Job by DO [/dn/jobs/show/{?do_number}{?date}{?type}]

### Retrieve [GET]

+ Parameters

    + do_number: `12345678` (string, required) - Job DO number to be retrieved.
    + date: `2021-04-09` (string, optional) - Date of job.
    + type: `Delivery` (string, optional) - Detrack Job Type to be retrieved. Must be `Delivery` or `Collection`.

+ Request (application/json)

    + Headers

            X-API-KEY: {API_KEY}

+ Response 200 (application/json)

    + Body

            {
                "data": {
                    "id": "5b22055510c92b1a046ece04",
                    "type": "Delivery",
                    "primary_job_status": "dispatched",
                    "open_to_marketplace": false,
                    "marketplace_offer": null,
                    "do_number": "DO 0",
                    "attempt": 1,
                    "date": "2018-06-14",
                    "start_date": "2018-06-14",
                    "time_window_from": null,
                    "time_window_to": null,
                    "job_age": 1,
                    "job_release_time": null,
                    "job_time": null,
                    "time_window": null,
                    "job_received_date": null,
                    "tracking_number": "T0",
                    "order_number": "ORN12345678",
                    "job_type": null,
                    "job_sequence": null,
                    "job_fee": null,
                    "address_lat": null,
                    "address_lng": null,
                    "address": "Singapore 470140",
                    "company_name": null,
                    "address_1": null,
                    "address_2": null,
                    "address_3": null,
                    "postal_code": "470140",
                    "city": null,
                    "state": null,
                    "country": null,
                    "geocoded_lat": 1.33668219002454,
                    "geocoded_lng": 103.910711702473,
                    "billing_address": null,
                    "deliver_to_collect_from": "James Li",
                    "last_name": null,
                    "phone_number": "65432178",
                    "sender_phone_number": null,
                    "fax_number": "65432179",
                    "instructions": null,
                    "assign_to": null,
                    "notify_email": "test@example.com",
                    "webhook_url": null,
                    "zone": null,
                    "customer": null,
                    "account_number": null,
                    "job_owner": null,
                    "invoice_number": null,
                    "invoice_amount": null,
                    "payment_mode": null,
                    "payment_amount": null,
                    "group_name": null,
                    "vendor_name": null,
                    "shipper_name": null,
                    "source": null,
                    "weight": null,
                    "parcel_width": null,
                    "parcel_length": null,
                    "parcel_height": null,
                    "cubic_meter": null,
                    "boxes": null,
                    "cartons": null,
                    "pieces": null,
                    "envelopes": null,
                    "pallets": null,
                    "bins": null,
                    "trays": null,
                    "bundles": null,
                    "rolls": null,
                    "number_of_shipping_labels": null,
                    "attachment_url": null,
                    "detrack_number": "DET2000001",
                    "status": "dispatched",
                    "tracking_status": "Info received",
                    "reason": null,
                    "last_reason": null,
                    "received_by_sent_by": null,
                    "note": null,
                    "carrier": null,
                    "pod_lat": "",
                    "pod_lng": "",
                    "pod_address": "",
                    "address_tracked_at": null,
                    "arrived_lat": null,
                    "arrived_lng": null,
                    "arrived_address": null,
                    "arrived_at": null,
                    "texted_at": null,
                    "called_at": null,
                    "serial_number": null,
                    "signed_at": null,
                    "photo_1_at": null,
                    "photo_2_at": null,
                    "photo_3_at": null,
                    "photo_4_at": null,
                    "photo_5_at": null,
                    "signature_file_url": null,
                    "photo_1_file_url": null,
                    "photo_2_file_url": null,
                    "photo_3_file_url": null,
                    "photo_4_file_url": null,
                    "photo_5_file_url": null,
                    "actual_weight": null,
                    "temperature": null,
                    "hold_time": null,
                    "payment_collected": null,
                    "auto_reschedule": null,
                    "actual_crates": null,
                    "actual_pallets": null,
                    "actual_utilization": null,
                    "goods_service_rating": null,
                    "driver_rating": null,
                    "customer_feedback": null,
                    "eta_time": null,
                    "live_eta": null,
                    "depot": null,
                    "depot_contact": null,
                    "department": null,
                    "sales_person": null,
                    "identification_number": null,
                    "bank_prefix": null,
                    "run_number": null,
                    "pick_up_from": null,
                    "pick_up_time": null,
                    "pick_up_lat": null,
                    "pick_up_lng": null,
                    "pick_up_address": null,
                    "pick_up_address_1": null,
                    "pick_up_address_2": null,
                    "pick_up_address_3": null,
                    "pick_up_city": null,
                    "pick_up_state": null,
                    "pick_up_country": null,
                    "pick_up_postal_code": null,
                    "pick_up_zone": null,
                    "pick_up_assign_to": null,
                    "pick_up_reason": null,
                    "info_received_at": "2018-06-14T06:04:06.017Z",
                    "pick_up_at": null,
                    "scheduled_at": null,
                    "at_warehouse_at": null,
                    "out_for_delivery_at": null,
                    "head_to_pick_up_at": null,
                    "head_to_delivery_at": null,
                    "cancelled_at": null,
                    "pod_at": null,
                    "pick_up_failed_count": null,
                    "deliver_failed_count": null,
                    "job_price": null,
                    "insurance_price": null,
                    "insurance_coverage": false,
                    "total_price": null,
                    "payer_type": null,
                    "remarks": null,
                    "items_count": 2,
                    "service_type": null,
                    "warehouse_address": null,
                    "destination_time_window": null,
                    "door": null,
                    "time_zone": null,
                    "vehicle_type": null,
                    "created_at": "2018-06-14T06:04:06.017Z",
                    "items": [{
                        "id": "5b22055510c92b1a046ece05",
                        "sku": "12345678",
                        "purchase_order_number": null,
                        "batch_number": null,
                        "expiry_date": null,
                        "description": null,
                        "comments": null,
                        "quantity": 10,
                        "unit_of_measure": null,
                        "checked": false,
                        "actual_quantity": null,
                        "inbound_quantity": null,
                        "unload_time_estimate": null,
                        "unload_time_actual": null,
                        "follow_up_quantity": null,
                        "follow_up_reason": null,
                        "rework_quantity": null,
                        "rework_reason": null,
                        "reject_quantity": 0,
                        "reject_reason": null,
                        "weight": null,
                        "serial_numbers": [],
                        "photo_url": null
                    }, {
                        "id": "5b22055510c92b1a046ece06",
                        "sku": "12387654",
                        "purchase_order_number": null,
                        "batch_number": null,
                        "expiry_date": null,
                        "description": null,
                        "comments": null,
                        "quantity": 5,
                        "unit_of_measure": null,
                        "checked": false,
                        "actual_quantity": null,
                        "inbound_quantity": null,
                        "unload_time_estimate": null,
                        "unload_time_actual": null,
                        "follow_up_quantity": null,
                        "follow_up_reason": null,
                        "rework_quantity": null,
                        "rework_reason": null,
                        "reject_quantity": 0,
                        "reject_reason": null,
                        "weight": null,
                        "serial_numbers": [],
                        "photo_url": null
                    }],
                    "milestones": [{
                        "status": "info_recv",
                        "assign_to": null,
                        "reason": null,
                        "pod_at": "2018-06-14T06:04:06.017Z",
                        "created_at": "2018-06-14T06:04:06.017Z",
                        "user_name": "Simon"
                    }]
                }
            }

## Update Job by DO [/dn/jobs/update]

## Update (object)

+ `do_number` (string required) - D.O No.
+ `date` (date, optional) - Date.
+ `type` (string, optional) - Detrack Job Type. Must be `Delivery` / `Collection`.
+ `data` (object) - Job object with fields and values to be updated.

### Update [PUT]

+ Request (application/json)

    + Headers

            X-API-KEY: {API_KEY}

    + Body

            {
                "do_number": "12345678",
                "date": "2021-04-09",
                "type": "Delivery",
                "data": {
                    "type": "Delivery",
                    "primary_job_status": "dispatched",
                    "open_to_marketplace": false,
                    "marketplace_offer": null,
                    "do_number": "DO 0",
                    "attempt": 1,
                    "date": "2018-06-14",
                    "start_date": "2018-06-14",
                    "job_age": 1,
                    "job_release_time": null,
                    "job_time": null,
                    "time_window": null,
                    "job_received_date": null,
                    "tracking_number": "T0",
                    "order_number": "ORN12345678",
                    "job_type": null,
                    "job_sequence": null,
                    "job_fee": null,
                    "address_lat": null,
                    "address_lng": null,
                    "address": "Singapore 470140",
                    "company_name": null,
                    "address_1": null,
                    "address_2": null,
                    "address_3": null,
                    "postal_code": "470140",
                    "city": null,
                    "state": null,
                    "country": null,
                    "billing_address": null,
                    "deliver_to_collect_from": "James Li",
                    "last_name": null,
                    "phone_number": "65432178",
                    "sender_phone_number": null,
                    "fax_number": "65432179",
                    "instructions": null,
                    "assign_to": null,
                    "notify_email": "test@example.com",
                    "webhook_url": null,
                    "zone": null,
                    "customer": null,
                    "account_number": null,
                    "job_owner": null,
                    "invoice_number": null,
                    "invoice_amount": null,
                    "payment_mode": null,
                    "payment_amount": null,
                    "group_name": null,
                    "vendor_name": null,
                    "shipper_name": null,
                    "source": null,
                    "weight": null,
                    "parcel_width": null,
                    "parcel_length": null,
                    "parcel_height": null,
                    "cubic_meter": null,
                    "boxes": null,
                    "cartons": null,
                    "pieces": null,
                    "envelopes": null,
                    "pallets": null,
                    "bins": null,
                    "trays": null,
                    "bundles": null,
                    "rolls": null,
                    "number_of_shipping_labels": null,
                    "attachment_url": null,
                    "detrack_number": "DET2000001",
                    "status": "dispatched",
                    "tracking_status": "Info received",
                    "reason": null,
                    "last_reason": null,
                    "received_by_sent_by": null,
                    "note": null,
                    "carrier": null,
                    "pod_lat": "",
                    "pod_lng": "",
                    "pod_address": "",
                    "address_tracked_at": null,
                    "arrived_lat": null,
                    "arrived_lng": null,
                    "arrived_address": null,
                    "arrived_at": null,
                    "texted_at": null,
                    "called_at": null,
                    "serial_number": null,
                    "signed_at": null,
                    "photo_1_at": null,
                    "photo_2_at": null,
                    "photo_3_at": null,
                    "photo_4_at": null,
                    "photo_5_at": null,
                    "signature_file_url": null,
                    "photo_1_file_url": null,
                    "photo_2_file_url": null,
                    "photo_3_file_url": null,
                    "photo_4_file_url": null,
                    "photo_5_file_url": null,
                    "actual_weight": null,
                    "temperature": null,
                    "hold_time": null,
                    "payment_collected": null,
                    "auto_reschedule": null,
                    "actual_crates": null,
                    "actual_pallets": null,
                    "actual_utilization": null,
                    "goods_service_rating": null,
                    "driver_rating": null,
                    "customer_feedback": null,
                    "eta_time": null,
                    "live_eta": null,
                    "depot": null,
                    "depot_contact": null,
                    "department": null,
                    "sales_person": null,
                    "identification_number": null,
                    "bank_prefix": null,
                    "run_number": null,
                    "pick_up_from": null,
                    "pick_up_time": null,
                    "pick_up_lat": null,
                    "pick_up_lng": null,
                    "pick_up_address": null,
                    "pick_up_address_1": null,
                    "pick_up_address_2": null,
                    "pick_up_address_3": null,
                    "pick_up_city": null,
                    "pick_up_state": null,
                    "pick_up_country": null,
                    "pick_up_postal_code": null,
                    "pick_up_zone": null,
                    "pick_up_assign_to": null,
                    "pick_up_reason": null,
                    "info_received_at": "2018-06-14T06:04:06.017Z",
                    "pick_up_at": null,
                    "scheduled_at": null,
                    "at_warehouse_at": null,
                    "out_for_delivery_at": null,
                    "head_to_pick_up_at": null,
                    "head_to_delivery_at": null,
                    "cancelled_at": null,
                    "pod_at": null,
                    "pick_up_failed_count": null,
                    "deliver_failed_count": null,
                    "job_price": null,
                    "insurance_price": null,
                    "insurance_coverage": false,
                    "total_price": null,
                    "payer_type": null,
                    "remarks": null,
                    "items_count": 2,
                    "service_type": null,
                    "warehouse_address": null,
                    "destination_time_window": null,
                    "door": null,
                    "time_zone": null,
                    "vehicle_type": null,
                    "created_at": "2018-06-14T06:04:06.017Z",
                    "items": [{
                        "sku": "12345678",
                        "purchase_order_number": null,
                        "batch_number": null,
                        "expiry_date": null,
                        "description": null,
                        "comments": null,
                        "quantity": 10,
                        "unit_of_measure": null,
                        "checked": false,
                        "actual_quantity": null,
                        "inbound_quantity": null,
                        "unload_time_estimate": null,
                        "unload_time_actual": null,
                        "follow_up_quantity": null,
                        "follow_up_reason": null,
                        "rework_quantity": null,
                        "rework_reason": null,
                        "reject_quantity": 0,
                        "reject_reason": null,
                        "weight": null,
                        "serial_numbers": [],
                        "photo_url": null
                    }, {
                        "sku": "12387654",
                        "purchase_order_number": null,
                        "batch_number": null,
                        "expiry_date": null,
                        "description": null,
                        "comments": null,
                        "quantity": 5,
                        "unit_of_measure": null,
                        "checked": false,
                        "actual_quantity": null,
                        "inbound_quantity": null,
                        "unload_time_estimate": null,
                        "unload_time_actual": null,
                        "follow_up_quantity": null,
                        "follow_up_reason": null,
                        "rework_quantity": null,
                        "rework_reason": null,
                        "reject_quantity": 0,
                        "reject_reason": null,
                        "weight": null,
                        "serial_numbers": [],
                        "photo_url": null
                    }]
                }
            }

+ Response 200 (application/json)

    + Body

            {
                "data": {
                    "id": "5b22055510c92b1a046ece04",
                    "type": "Delivery",
                    "primary_job_status": "dispatched",
                    "open_to_marketplace": false,
                    "marketplace_offer": null,
                    "do_number": "DO 0",
                    "attempt": 1,
                    "date": "2018-06-14",
                    "start_date": "2018-06-14",
                    "job_age": 1,
                    "job_release_time": null,
                    "job_time": null,
                    "time_window": null,
                    "job_received_date": null,
                    "tracking_number": "T0",
                    "order_number": "ORN12345678",
                    "job_type": null,
                    "job_sequence": null,
                    "job_fee": null,
                    "address_lat": null,
                    "address_lng": null,
                    "address": "Singapore 470140",
                    "company_name": null,
                    "address_1": null,
                    "address_2": null,
                    "address_3": null,
                    "postal_code": "470140",
                    "city": null,
                    "state": null,
                    "country": null,
                    "geocoded_lat": 1.33668219002454,
                    "geocoded_lng": 103.910711702473,
                    "billing_address": null,
                    "deliver_to_collect_from": "James Li",
                    "last_name": null,
                    "phone_number": "65432178",
                    "sender_phone_number": null,
                    "fax_number": "65432179",
                    "instructions": null,
                    "assign_to": null,
                    "notify_email": "test@example.com",
                    "webhook_url": null,
                    "zone": null,
                    "customer": null,
                    "account_number": null,
                    "job_owner": null,
                    "invoice_number": null,
                    "invoice_amount": null,
                    "payment_mode": null,
                    "payment_amount": null,
                    "group_name": null,
                    "vendor_name": null,
                    "shipper_name": null,
                    "source": null,
                    "weight": null,
                    "parcel_width": null,
                    "parcel_length": null,
                    "parcel_height": null,
                    "cubic_meter": null,
                    "boxes": null,
                    "cartons": null,
                    "pieces": null,
                    "envelopes": null,
                    "pallets": null,
                    "bins": null,
                    "trays": null,
                    "bundles": null,
                    "rolls": null,
                    "number_of_shipping_labels": null,
                    "attachment_url": null,
                    "detrack_number": "DET2000001",
                    "status": "dispatched",
                    "tracking_status": "Info received",
                    "reason": null,
                    "last_reason": null,
                    "received_by_sent_by": null,
                    "note": null,
                    "carrier": null,
                    "pod_lat": "",
                    "pod_lng": "",
                    "pod_address": "",
                    "address_tracked_at": null,
                    "arrived_lat": null,
                    "arrived_lng": null,
                    "arrived_address": null,
                    "arrived_at": null,
                    "texted_at": null,
                    "called_at": null,
                    "serial_number": null,
                    "signed_at": null,
                    "photo_1_at": null,
                    "photo_2_at": null,
                    "photo_3_at": null,
                    "photo_4_at": null,
                    "photo_5_at": null,
                    "signature_file_url": null,
                    "photo_1_file_url": null,
                    "photo_2_file_url": null,
                    "photo_3_file_url": null,
                    "photo_4_file_url": null,
                    "photo_5_file_url": null,
                    "actual_weight": null,
                    "temperature": null,
                    "hold_time": null,
                    "payment_collected": null,
                    "auto_reschedule": null,
                    "actual_crates": null,
                    "actual_pallets": null,
                    "actual_utilization": null,
                    "goods_service_rating": null,
                    "driver_rating": null,
                    "customer_feedback": null,
                    "eta_time": null,
                    "live_eta": null,
                    "depot": null,
                    "depot_contact": null,
                    "department": null,
                    "sales_person": null,
                    "identification_number": null,
                    "bank_prefix": null,
                    "run_number": null,
                    "pick_up_from": null,
                    "pick_up_time": null,
                    "pick_up_lat": null,
                    "pick_up_lng": null,
                    "pick_up_address": null,
                    "pick_up_address_1": null,
                    "pick_up_address_2": null,
                    "pick_up_address_3": null,
                    "pick_up_city": null,
                    "pick_up_state": null,
                    "pick_up_country": null,
                    "pick_up_postal_code": null,
                    "pick_up_zone": null,
                    "pick_up_assign_to": null,
                    "pick_up_reason": null,
                    "info_received_at": "2018-06-14T06:04:06.017Z",
                    "pick_up_at": null,
                    "scheduled_at": null,
                    "at_warehouse_at": null,
                    "out_for_delivery_at": null,
                    "head_to_pick_up_at": null,
                    "head_to_delivery_at": null,
                    "cancelled_at": null,
                    "pod_at": null,
                    "pick_up_failed_count": null,
                    "deliver_failed_count": null,
                    "job_price": null,
                    "insurance_price": null,
                    "insurance_coverage": false,
                    "total_price": null,
                    "payer_type": null,
                    "remarks": null,
                    "items_count": 2,
                    "service_type": null,
                    "warehouse_address": null,
                    "destination_time_window": null,
                    "door": null,
                    "time_zone": null,
                    "vehicle_type": null,
                    "created_at": "2018-06-14T06:04:06.017Z",
                    "items": [{
                        "id": "5b22055510c92b1a046ece05",
                        "sku": "12345678",
                        "purchase_order_number": null,
                        "batch_number": null,
                        "expiry_date": null,
                        "description": null,
                        "comments": null,
                        "quantity": 10,
                        "unit_of_measure": null,
                        "checked": false,
                        "actual_quantity": null,
                        "inbound_quantity": null,
                        "unload_time_estimate": null,
                        "unload_time_actual": null,
                        "follow_up_quantity": null,
                        "follow_up_reason": null,
                        "rework_quantity": null,
                        "rework_reason": null,
                        "reject_quantity": 0,
                        "reject_reason": null,
                        "weight": null,
                        "serial_numbers": [],
                        "photo_url": null
                    }, {
                        "id": "5b22055510c92b1a046ece06",
                        "sku": "12387654",
                        "purchase_order_number": null,
                        "batch_number": null,
                        "expiry_date": null,
                        "description": null,
                        "comments": null,
                        "quantity": 5,
                        "unit_of_measure": null,
                        "checked": false,
                        "actual_quantity": null,
                        "inbound_quantity": null,
                        "unload_time_estimate": null,
                        "unload_time_actual": null,
                        "follow_up_quantity": null,
                        "follow_up_reason": null,
                        "rework_quantity": null,
                        "rework_reason": null,
                        "reject_quantity": 0,
                        "reject_reason": null,
                        "weight": null,
                        "serial_numbers": [],
                        "photo_url": null
                    }],
                    "milestones": [{
                        "status": "info_recv",
                        "assign_to": null,
                        "reason": null,
                        "pod_at": "2018-06-14T06:04:06.017Z",
                        "created_at": "2018-06-14T06:04:06.017Z",
                        "user_name": "Simon"
                    }]
                }
            }

## Delete Job By DO [/dn/jobs/delete{?do_number}{?date}{?type}]

### Delete [DELETE]

+ Parameters

    + do_number: `12345678` (string, required) - Job DO number to be retrieved.
    + date: `2021-04-09` (string, optional) - Date of job.
    + type: `Delivery` (string, optional) - Detrack Job Type to be retrieved. Must be `Delivery` or `Collection`.

+ Request (application/json)

    + Headers

            X-API-KEY: {API_KEY}

+ Response 204 (application/json)


## Retrieve / Update / Delete by DO [/dn/jobs/{do_number}{?type}]

### Retrieve [GET]

+ Parameters

    + type: `Delivery` (string, optional) - Detrack Job Type to be retrieved. Must be `Delivery` or `Collection`.

+ Request (application/json)

    + Headers

            X-API-KEY: {API_KEY}

+ Response 200 (application/json)

    + Body

            {
                "data": {
                    "id": "5b22055510c92b1a046ece04",
                    "type": "Delivery",
                    "primary_job_status": "dispatched",
                    "open_to_marketplace": false,
                    "marketplace_offer": null,
                    "do_number": "DO 0",
                    "attempt": 1,
                    "date": "2018-06-14",
                    "start_date": "2018-06-14",
                    "job_age": 1,
                    "job_release_time": null,
                    "job_time": null,
                    "time_window": null,
                    "job_received_date": null,
                    "tracking_number": "T0",
                    "order_number": "ORN12345678",
                    "job_type": null,
                    "job_sequence": null,
                    "job_fee": null,
                    "address_lat": null,
                    "address_lng": null,
                    "address": "Singapore 470140",
                    "company_name": null,
                    "address_1": null,
                    "address_2": null,
                    "address_3": null,
                    "postal_code": "470140",
                    "city": null,
                    "state": null,
                    "country": null,
                    "geocoded_lat": 1.33668219002454,
                    "geocoded_lng": 103.910711702473,
                    "billing_address": null,
                    "deliver_to_collect_from": "James Li",
                    "last_name": null,
                    "phone_number": "65432178",
                    "sender_phone_number": null,
                    "fax_number": "65432179",
                    "instructions": null,
                    "assign_to": null,
                    "notify_email": "test@example.com",
                    "webhook_url": null,
                    "zone": null,
                    "customer": null,
                    "account_number": null,
                    "job_owner": null,
                    "invoice_number": null,
                    "invoice_amount": null,
                    "payment_mode": null,
                    "payment_amount": null,
                    "group_name": null,
                    "vendor_name": null,
                    "shipper_name": null,
                    "source": null,
                    "weight": null,
                    "parcel_width": null,
                    "parcel_length": null,
                    "parcel_height": null,
                    "cubic_meter": null,
                    "boxes": null,
                    "cartons": null,
                    "pieces": null,
                    "envelopes": null,
                    "pallets": null,
                    "bins": null,
                    "trays": null,
                    "bundles": null,
                    "rolls": null,
                    "number_of_shipping_labels": null,
                    "attachment_url": null,
                    "detrack_number": "DET2000001",
                    "status": "dispatched",
                    "tracking_status": "Info received",
                    "reason": null,
                    "last_reason": null,
                    "received_by_sent_by": null,
                    "note": null,
                    "carrier": null,
                    "pod_lat": "",
                    "pod_lng": "",
                    "pod_address": "",
                    "address_tracked_at": null,
                    "arrived_lat": null,
                    "arrived_lng": null,
                    "arrived_address": null,
                    "arrived_at": null,
                    "texted_at": null,
                    "called_at": null,
                    "serial_number": null,
                    "signed_at": null,
                    "photo_1_at": null,
                    "photo_2_at": null,
                    "photo_3_at": null,
                    "photo_4_at": null,
                    "photo_5_at": null,
                    "signature_file_url": null,
                    "photo_1_file_url": null,
                    "photo_2_file_url": null,
                    "photo_3_file_url": null,
                    "photo_4_file_url": null,
                    "photo_5_file_url": null,
                    "actual_weight": null,
                    "temperature": null,
                    "hold_time": null,
                    "payment_collected": null,
                    "auto_reschedule": null,
                    "actual_crates": null,
                    "actual_pallets": null,
                    "actual_utilization": null,
                    "goods_service_rating": null,
                    "driver_rating": null,
                    "customer_feedback": null,
                    "eta_time": null,
                    "live_eta": null,
                    "depot": null,
                    "depot_contact": null,
                    "department": null,
                    "sales_person": null,
                    "identification_number": null,
                    "bank_prefix": null,
                    "run_number": null,
                    "pick_up_from": null,
                    "pick_up_time": null,
                    "pick_up_lat": null,
                    "pick_up_lng": null,
                    "pick_up_address": null,
                    "pick_up_address_1": null,
                    "pick_up_address_2": null,
                    "pick_up_address_3": null,
                    "pick_up_city": null,
                    "pick_up_state": null,
                    "pick_up_country": null,
                    "pick_up_postal_code": null,
                    "pick_up_zone": null,
                    "pick_up_assign_to": null,
                    "pick_up_reason": null,
                    "info_received_at": "2018-06-14T06:04:06.017Z",
                    "pick_up_at": null,
                    "scheduled_at": null,
                    "at_warehouse_at": null,
                    "out_for_delivery_at": null,
                    "head_to_pick_up_at": null,
                    "head_to_delivery_at": null,
                    "cancelled_at": null,
                    "pod_at": null,
                    "pick_up_failed_count": null,
                    "deliver_failed_count": null,
                    "job_price": null,
                    "insurance_price": null,
                    "insurance_coverage": false,
                    "total_price": null,
                    "payer_type": null,
                    "remarks": null,
                    "items_count": 2,
                    "service_type": null,
                    "warehouse_address": null,
                    "destination_time_window": null,
                    "door": null,
                    "time_zone": null,
                    "vehicle_type": null,
                    "created_at": "2018-06-14T06:04:06.017Z",
                    "items": [{
                        "id": "5b22055510c92b1a046ece05",
                        "sku": "12345678",
                        "purchase_order_number": null,
                        "batch_number": null,
                        "expiry_date": null,
                        "description": null,
                        "comments": null,
                        "quantity": 10,
                        "unit_of_measure": null,
                        "checked": false,
                        "actual_quantity": null,
                        "inbound_quantity": null,
                        "unload_time_estimate": null,
                        "unload_time_actual": null,
                        "follow_up_quantity": null,
                        "follow_up_reason": null,
                        "rework_quantity": null,
                        "rework_reason": null,
                        "reject_quantity": 0,
                        "reject_reason": null,
                        "weight": null,
                        "serial_numbers": [],
                        "photo_url": null
                    }, {
                        "id": "5b22055510c92b1a046ece06",
                        "sku": "12387654",
                        "purchase_order_number": null,
                        "batch_number": null,
                        "expiry_date": null,
                        "description": null,
                        "comments": null,
                        "quantity": 5,
                        "unit_of_measure": null,
                        "checked": false,
                        "actual_quantity": null,
                        "inbound_quantity": null,
                        "unload_time_estimate": null,
                        "unload_time_actual": null,
                        "follow_up_quantity": null,
                        "follow_up_reason": null,
                        "rework_quantity": null,
                        "rework_reason": null,
                        "reject_quantity": 0,
                        "reject_reason": null,
                        "weight": null,
                        "serial_numbers": [],
                        "photo_url": null
                    }],
                    "milestones": [{
                        "status": "info_recv",
                        "assign_to": null,
                        "reason": null,
                        "pod_at": "2018-06-14T06:04:06.017Z",
                        "created_at": "2018-06-14T06:04:06.017Z",
                        "user_name": "Simon"
                    }]
                }
            }

### Update [PUT]

+ Parameters

    + type: `Delivery` (string, optional) - Detrack Job Type to be updated. Must be `Delivery` or `Collection`.

+ Request (application/json)

    + Headers

            X-API-KEY: {API_KEY}

    + Body

            {
                "data": {
                    "type": "Delivery",
                    "primary_job_status": "dispatched",
                    "open_to_marketplace": false,
                    "marketplace_offer": null,
                    "do_number": "DO 0",
                    "attempt": 1,
                    "date": "2018-06-14",
                    "start_date": "2018-06-14",
                    "job_age": 1,
                    "job_release_time": null,
                    "job_time": null,
                    "time_window": null,
                    "job_received_date": null,
                    "tracking_number": "T0",
                    "order_number": "ORN12345678",
                    "job_type": null,
                    "job_sequence": null,
                    "job_fee": null,
                    "address_lat": null,
                    "address_lng": null,
                    "address": "Singapore 470140",
                    "company_name": null,
                    "address_1": null,
                    "address_2": null,
                    "address_3": null,
                    "postal_code": "470140",
                    "city": null,
                    "state": null,
                    "country": null,
                    "billing_address": null,
                    "deliver_to_collect_from": "James Li",
                    "last_name": null,
                    "phone_number": "65432178",
                    "sender_phone_number": null,
                    "fax_number": "65432179",
                    "instructions": null,
                    "assign_to": null,
                    "notify_email": "test@example.com",
                    "webhook_url": null,
                    "zone": null,
                    "customer": null,
                    "account_number": null,
                    "job_owner": null,
                    "invoice_number": null,
                    "invoice_amount": null,
                    "payment_mode": null,
                    "payment_amount": null,
                    "group_name": null,
                    "vendor_name": null,
                    "shipper_name": null,
                    "source": null,
                    "weight": null,
                    "parcel_width": null,
                    "parcel_length": null,
                    "parcel_height": null,
                    "cubic_meter": null,
                    "boxes": null,
                    "cartons": null,
                    "pieces": null,
                    "envelopes": null,
                    "pallets": null,
                    "bins": null,
                    "trays": null,
                    "bundles": null,
                    "rolls": null,
                    "number_of_shipping_labels": null,
                    "attachment_url": null,
                    "detrack_number": "DET2000001",
                    "status": "dispatched",
                    "tracking_status": "Info received",
                    "reason": null,
                    "last_reason": null,
                    "received_by_sent_by": null,
                    "note": null,
                    "carrier": null,
                    "pod_lat": "",
                    "pod_lng": "",
                    "pod_address": "",
                    "address_tracked_at": null,
                    "arrived_lat": null,
                    "arrived_lng": null,
                    "arrived_address": null,
                    "arrived_at": null,
                    "texted_at": null,
                    "called_at": null,
                    "serial_number": null,
                    "signed_at": null,
                    "photo_1_at": null,
                    "photo_2_at": null,
                    "photo_3_at": null,
                    "photo_4_at": null,
                    "photo_5_at": null,
                    "signature_file_url": null,
                    "photo_1_file_url": null,
                    "photo_2_file_url": null,
                    "photo_3_file_url": null,
                    "photo_4_file_url": null,
                    "photo_5_file_url": null,
                    "actual_weight": null,
                    "temperature": null,
                    "hold_time": null,
                    "payment_collected": null,
                    "auto_reschedule": null,
                    "actual_crates": null,
                    "actual_pallets": null,
                    "actual_utilization": null,
                    "goods_service_rating": null,
                    "driver_rating": null,
                    "customer_feedback": null,
                    "eta_time": null,
                    "live_eta": null,
                    "depot": null,
                    "depot_contact": null,
                    "department": null,
                    "sales_person": null,
                    "identification_number": null,
                    "bank_prefix": null,
                    "run_number": null,
                    "pick_up_from": null,
                    "pick_up_time": null,
                    "pick_up_lat": null,
                    "pick_up_lng": null,
                    "pick_up_address": null,
                    "pick_up_address_1": null,
                    "pick_up_address_2": null,
                    "pick_up_address_3": null,
                    "pick_up_city": null,
                    "pick_up_state": null,
                    "pick_up_country": null,
                    "pick_up_postal_code": null,
                    "pick_up_zone": null,
                    "pick_up_assign_to": null,
                    "pick_up_reason": null,
                    "info_received_at": "2018-06-14T06:04:06.017Z",
                    "pick_up_at": null,
                    "scheduled_at": null,
                    "at_warehouse_at": null,
                    "out_for_delivery_at": null,
                    "head_to_pick_up_at": null,
                    "head_to_delivery_at": null,
                    "cancelled_at": null,
                    "pod_at": null,
                    "pick_up_failed_count": null,
                    "deliver_failed_count": null,
                    "job_price": null,
                    "insurance_price": null,
                    "insurance_coverage": false,
                    "total_price": null,
                    "payer_type": null,
                    "remarks": null,
                    "items_count": 2,
                    "service_type": null,
                    "warehouse_address": null,
                    "destination_time_window": null,
                    "door": null,
                    "time_zone": null,
                    "vehicle_type": null,
                    "created_at": "2018-06-14T06:04:06.017Z",
                    "items": [{
                        "sku": "12345678",
                        "purchase_order_number": null,
                        "batch_number": null,
                        "expiry_date": null,
                        "description": null,
                        "comments": null,
                        "quantity": 10,
                        "unit_of_measure": null,
                        "checked": false,
                        "actual_quantity": null,
                        "inbound_quantity": null,
                        "unload_time_estimate": null,
                        "unload_time_actual": null,
                        "follow_up_quantity": null,
                        "follow_up_reason": null,
                        "rework_quantity": null,
                        "rework_reason": null,
                        "reject_quantity": 0,
                        "reject_reason": null,
                        "weight": null,
                        "serial_numbers": [],
                        "photo_url": null
                    }, {
                        "sku": "12387654",
                        "purchase_order_number": null,
                        "batch_number": null,
                        "expiry_date": null,
                        "description": null,
                        "comments": null,
                        "quantity": 5,
                        "unit_of_measure": null,
                        "checked": false,
                        "actual_quantity": null,
                        "inbound_quantity": null,
                        "unload_time_estimate": null,
                        "unload_time_actual": null,
                        "follow_up_quantity": null,
                        "follow_up_reason": null,
                        "rework_quantity": null,
                        "rework_reason": null,
                        "reject_quantity": 0,
                        "reject_reason": null,
                        "weight": null,
                        "serial_numbers": [],
                        "photo_url": null
                    }]
                }
            }

+ Response 200 (application/json)

    + Body

            {
                "data": {
                    "id": "5b22055510c92b1a046ece04",
                    "type": "Delivery",
                    "primary_job_status": "dispatched",
                    "open_to_marketplace": false,
                    "marketplace_offer": null,
                    "do_number": "DO 0",
                    "attempt": 1,
                    "date": "2018-06-14",
                    "start_date": "2018-06-14",
                    "job_age": 1,
                    "job_release_time": null,
                    "job_time": null,
                    "time_window": null,
                    "job_received_date": null,
                    "tracking_number": "T0",
                    "order_number": "ORN12345678",
                    "job_type": null,
                    "job_sequence": null,
                    "job_fee": null,
                    "address_lat": null,
                    "address_lng": null,
                    "address": "Singapore 470140",
                    "company_name": null,
                    "address_1": null,
                    "address_2": null,
                    "address_3": null,
                    "postal_code": "470140",
                    "city": null,
                    "state": null,
                    "country": null,
                    "geocoded_lat": 1.33668219002454,
                    "geocoded_lng": 103.910711702473,
                    "billing_address": null,
                    "deliver_to_collect_from": "James Li",
                    "last_name": null,
                    "phone_number": "65432178",
                    "sender_phone_number": null,
                    "fax_number": "65432179",
                    "instructions": null,
                    "assign_to": null,
                    "notify_email": "test@example.com",
                    "webhook_url": null,
                    "zone": null,
                    "customer": null,
                    "account_number": null,
                    "job_owner": null,
                    "invoice_number": null,
                    "invoice_amount": null,
                    "payment_mode": null,
                    "payment_amount": null,
                    "group_name": null,
                    "vendor_name": null,
                    "shipper_name": null,
                    "source": null,
                    "weight": null,
                    "parcel_width": null,
                    "parcel_length": null,
                    "parcel_height": null,
                    "cubic_meter": null,
                    "boxes": null,
                    "cartons": null,
                    "pieces": null,
                    "envelopes": null,
                    "pallets": null,
                    "bins": null,
                    "trays": null,
                    "bundles": null,
                    "rolls": null,
                    "number_of_shipping_labels": null,
                    "attachment_url": null,
                    "detrack_number": "DET2000001",
                    "status": "dispatched",
                    "tracking_status": "Info received",
                    "reason": null,
                    "last_reason": null,
                    "received_by_sent_by": null,
                    "note": null,
                    "carrier": null,
                    "pod_lat": "",
                    "pod_lng": "",
                    "pod_address": "",
                    "address_tracked_at": null,
                    "arrived_lat": null,
                    "arrived_lng": null,
                    "arrived_address": null,
                    "arrived_at": null,
                    "texted_at": null,
                    "called_at": null,
                    "serial_number": null,
                    "signed_at": null,
                    "photo_1_at": null,
                    "photo_2_at": null,
                    "photo_3_at": null,
                    "photo_4_at": null,
                    "photo_5_at": null,
                    "signature_file_url": null,
                    "photo_1_file_url": null,
                    "photo_2_file_url": null,
                    "photo_3_file_url": null,
                    "photo_4_file_url": null,
                    "photo_5_file_url": null,
                    "actual_weight": null,
                    "temperature": null,
                    "hold_time": null,
                    "payment_collected": null,
                    "auto_reschedule": null,
                    "actual_crates": null,
                    "actual_pallets": null,
                    "actual_utilization": null,
                    "goods_service_rating": null,
                    "driver_rating": null,
                    "customer_feedback": null,
                    "eta_time": null,
                    "live_eta": null,
                    "depot": null,
                    "depot_contact": null,
                    "department": null,
                    "sales_person": null,
                    "identification_number": null,
                    "bank_prefix": null,
                    "run_number": null,
                    "pick_up_from": null,
                    "pick_up_time": null,
                    "pick_up_lat": null,
                    "pick_up_lng": null,
                    "pick_up_address": null,
                    "pick_up_address_1": null,
                    "pick_up_address_2": null,
                    "pick_up_address_3": null,
                    "pick_up_city": null,
                    "pick_up_state": null,
                    "pick_up_country": null,
                    "pick_up_postal_code": null,
                    "pick_up_zone": null,
                    "pick_up_assign_to": null,
                    "pick_up_reason": null,
                    "info_received_at": "2018-06-14T06:04:06.017Z",
                    "pick_up_at": null,
                    "scheduled_at": null,
                    "at_warehouse_at": null,
                    "out_for_delivery_at": null,
                    "head_to_pick_up_at": null,
                    "head_to_delivery_at": null,
                    "cancelled_at": null,
                    "pod_at": null,
                    "pick_up_failed_count": null,
                    "deliver_failed_count": null,
                    "job_price": null,
                    "insurance_price": null,
                    "insurance_coverage": false,
                    "total_price": null,
                    "payer_type": null,
                    "remarks": null,
                    "items_count": 2,
                    "service_type": null,
                    "warehouse_address": null,
                    "destination_time_window": null,
                    "door": null,
                    "time_zone": null,
                    "vehicle_type": null,
                    "created_at": "2018-06-14T06:04:06.017Z",
                    "items": [{
                        "id": "5b22055510c92b1a046ece05",
                        "sku": "12345678",
                        "purchase_order_number": null,
                        "batch_number": null,
                        "expiry_date": null,
                        "description": null,
                        "comments": null,
                        "quantity": 10,
                        "unit_of_measure": null,
                        "checked": false,
                        "actual_quantity": null,
                        "inbound_quantity": null,
                        "unload_time_estimate": null,
                        "unload_time_actual": null,
                        "follow_up_quantity": null,
                        "follow_up_reason": null,
                        "rework_quantity": null,
                        "rework_reason": null,
                        "reject_quantity": 0,
                        "reject_reason": null,
                        "weight": null,
                        "serial_numbers": [],
                        "photo_url": null
                    }, {
                        "id": "5b22055510c92b1a046ece06",
                        "sku": "12387654",
                        "purchase_order_number": null,
                        "batch_number": null,
                        "expiry_date": null,
                        "description": null,
                        "comments": null,
                        "quantity": 5,
                        "unit_of_measure": null,
                        "checked": false,
                        "actual_quantity": null,
                        "inbound_quantity": null,
                        "unload_time_estimate": null,
                        "unload_time_actual": null,
                        "follow_up_quantity": null,
                        "follow_up_reason": null,
                        "rework_quantity": null,
                        "rework_reason": null,
                        "reject_quantity": 0,
                        "reject_reason": null,
                        "weight": null,
                        "serial_numbers": [],
                        "photo_url": null
                    }],
                    "milestones": [{
                        "status": "info_recv",
                        "assign_to": null,
                        "reason": null,
                        "pod_at": "2018-06-14T06:04:06.017Z",
                        "created_at": "2018-06-14T06:04:06.017Z",
                        "user_name": "Simon"
                    }]
                }
            }

### Delete [DELETE]

+ Parameters

    + type: `Delivery` (string, optional) - Detrack Job Type to be deleted. Must be `Delivery` or `Collection`.

+ Request (application/json)

    + Headers

            X-API-KEY: {API_KEY}

+ Response 204 (application/json)

## Retrieve / Update / Delete by DO and Date [/dn/jobs/{do_number}/{date}{?type}]

### Retrieve [GET]

+ Parameters

    + type: `Delivery` (string, optional) - Detrack Job Type to be retrieved. Must be `Delivery` or `Collection`.

+ Request (application/json)

    + Headers

            X-API-KEY: {API_KEY}

+ Response 200 (application/json)

    + Body

            {
                "data": {
                    "id": "5b22055510c92b1a046ece04",
                    "type": "Delivery",
                    "primary_job_status": "dispatched",
                    "open_to_marketplace": false,
                    "marketplace_offer": null,
                    "do_number": "DO 0",
                    "attempt": 1,
                    "date": "2018-06-14",
                    "start_date": "2018-06-14",
                    "job_age": 1,
                    "job_release_time": null,
                    "job_time": null,
                    "time_window": null,
                    "job_received_date": null,
                    "tracking_number": "T0",
                    "order_number": "ORN12345678",
                    "job_type": null,
                    "job_sequence": null,
                    "job_fee": null,
                    "address_lat": null,
                    "address_lng": null,
                    "address": "Singapore 470140",
                    "company_name": null,
                    "address_1": null,
                    "address_2": null,
                    "address_3": null,
                    "postal_code": "470140",
                    "city": null,
                    "state": null,
                    "country": null,
                    "geocoded_lat": 1.33668219002454,
                    "geocoded_lng": 103.910711702473,
                    "billing_address": null,
                    "deliver_to_collect_from": "James Li",
                    "last_name": null,
                    "phone_number": "65432178",
                    "sender_phone_number": null,
                    "fax_number": "65432179",
                    "instructions": null,
                    "assign_to": null,
                    "notify_email": "test@example.com",
                    "webhook_url": null,
                    "zone": null,
                    "customer": null,
                    "account_number": null,
                    "job_owner": null,
                    "invoice_number": null,
                    "invoice_amount": null,
                    "payment_mode": null,
                    "payment_amount": null,
                    "group_name": null,
                    "vendor_name": null,
                    "shipper_name": null,
                    "source": null,
                    "weight": null,
                    "parcel_width": null,
                    "parcel_length": null,
                    "parcel_height": null,
                    "cubic_meter": null,
                    "boxes": null,
                    "cartons": null,
                    "pieces": null,
                    "envelopes": null,
                    "pallets": null,
                    "bins": null,
                    "trays": null,
                    "bundles": null,
                    "rolls": null,
                    "number_of_shipping_labels": null,
                    "attachment_url": null,
                    "detrack_number": "DET2000001",
                    "status": "dispatched",
                    "tracking_status": "Info received",
                    "reason": null,
                    "last_reason": null,
                    "received_by_sent_by": null,
                    "note": null,
                    "carrier": null,
                    "pod_lat": "",
                    "pod_lng": "",
                    "pod_address": "",
                    "address_tracked_at": null,
                    "arrived_lat": null,
                    "arrived_lng": null,
                    "arrived_address": null,
                    "arrived_at": null,
                    "texted_at": null,
                    "called_at": null,
                    "serial_number": null,
                    "signed_at": null,
                    "photo_1_at": null,
                    "photo_2_at": null,
                    "photo_3_at": null,
                    "photo_4_at": null,
                    "photo_5_at": null,
                    "signature_file_url": null,
                    "photo_1_file_url": null,
                    "photo_2_file_url": null,
                    "photo_3_file_url": null,
                    "photo_4_file_url": null,
                    "photo_5_file_url": null,
                    "actual_weight": null,
                    "temperature": null,
                    "hold_time": null,
                    "payment_collected": null,
                    "auto_reschedule": null,
                    "actual_crates": null,
                    "actual_pallets": null,
                    "actual_utilization": null,
                    "goods_service_rating": null,
                    "driver_rating": null,
                    "customer_feedback": null,
                    "eta_time": null,
                    "live_eta": null,
                    "depot": null,
                    "depot_contact": null,
                    "department": null,
                    "sales_person": null,
                    "identification_number": null,
                    "bank_prefix": null,
                    "run_number": null,
                    "pick_up_from": null,
                    "pick_up_time": null,
                    "pick_up_lat": null,
                    "pick_up_lng": null,
                    "pick_up_address": null,
                    "pick_up_address_1": null,
                    "pick_up_address_2": null,
                    "pick_up_address_3": null,
                    "pick_up_city": null,
                    "pick_up_state": null,
                    "pick_up_country": null,
                    "pick_up_postal_code": null,
                    "pick_up_zone": null,
                    "pick_up_assign_to": null,
                    "pick_up_reason": null,
                    "info_received_at": "2018-06-14T06:04:06.017Z",
                    "pick_up_at": null,
                    "scheduled_at": null,
                    "at_warehouse_at": null,
                    "out_for_delivery_at": null,
                    "head_to_pick_up_at": null,
                    "head_to_delivery_at": null,
                    "cancelled_at": null,
                    "pod_at": null,
                    "pick_up_failed_count": null,
                    "deliver_failed_count": null,
                    "job_price": null,
                    "insurance_price": null,
                    "insurance_coverage": false,
                    "total_price": null,
                    "payer_type": null,
                    "remarks": null,
                    "items_count": 2,
                    "service_type": null,
                    "warehouse_address": null,
                    "destination_time_window": null,
                    "door": null,
                    "time_zone": null,
                    "vehicle_type": null,
                    "created_at": "2018-06-14T06:04:06.017Z",
                    "items": [{
                        "id": "5b22055510c92b1a046ece05",
                        "sku": "12345678",
                        "purchase_order_number": null,
                        "batch_number": null,
                        "expiry_date": null,
                        "description": null,
                        "comments": null,
                        "quantity": 10,
                        "unit_of_measure": null,
                        "checked": false,
                        "actual_quantity": null,
                        "inbound_quantity": null,
                        "unload_time_estimate": null,
                        "unload_time_actual": null,
                        "follow_up_quantity": null,
                        "follow_up_reason": null,
                        "rework_quantity": null,
                        "rework_reason": null,
                        "reject_quantity": 0,
                        "reject_reason": null,
                        "weight": null,
                        "serial_numbers": [],
                        "photo_url": null
                    }, {
                        "id": "5b22055510c92b1a046ece06",
                        "sku": "12387654",
                        "purchase_order_number": null,
                        "batch_number": null,
                        "expiry_date": null,
                        "description": null,
                        "comments": null,
                        "quantity": 5,
                        "unit_of_measure": null,
                        "checked": false,
                        "actual_quantity": null,
                        "inbound_quantity": null,
                        "unload_time_estimate": null,
                        "unload_time_actual": null,
                        "follow_up_quantity": null,
                        "follow_up_reason": null,
                        "rework_quantity": null,
                        "rework_reason": null,
                        "reject_quantity": 0,
                        "reject_reason": null,
                        "weight": null,
                        "serial_numbers": [],
                        "photo_url": null
                    }],
                    "milestones": [{
                        "status": "info_recv",
                        "assign_to": null,
                        "reason": null,
                        "pod_at": "2018-06-14T06:04:06.017Z",
                        "created_at": "2018-06-14T06:04:06.017Z",
                        "user_name": "Simon"
                    }]
                }
            }

### Update [PUT]

+ Parameters

    + type: `Delivery` (string, optional) - Detrack Job Type to be updated. Must be `Delivery` or `Collection`.

+ Request (application/json)

    + Headers

            X-API-KEY: {API_KEY}

    + Body

            {
                "data": {
                    "type": "Delivery",
                    "primary_job_status": "dispatched",
                    "open_to_marketplace": false,
                    "marketplace_offer": null,
                    "do_number": "DO 0",
                    "attempt": 1,
                    "date": "2018-06-14",
                    "start_date": "2018-06-14",
                    "job_age": 1,
                    "job_release_time": null,
                    "job_time": null,
                    "time_window": null,
                    "job_received_date": null,
                    "tracking_number": "T0",
                    "order_number": "ORN12345678",
                    "job_type": null,
                    "job_sequence": null,
                    "job_fee": null,
                    "address_lat": null,
                    "address_lng": null,
                    "address": "Singapore 470140",
                    "company_name": null,
                    "address_1": null,
                    "address_2": null,
                    "address_3": null,
                    "postal_code": "470140",
                    "city": null,
                    "state": null,
                    "country": null,
                    "billing_address": null,
                    "deliver_to_collect_from": "James Li",
                    "last_name": null,
                    "phone_number": "65432178",
                    "sender_phone_number": null,
                    "fax_number": "65432179",
                    "instructions": null,
                    "assign_to": null,
                    "notify_email": "test@example.com",
                    "webhook_url": null,
                    "zone": null,
                    "customer": null,
                    "account_number": null,
                    "job_owner": null,
                    "invoice_number": null,
                    "invoice_amount": null,
                    "payment_mode": null,
                    "payment_amount": null,
                    "group_name": null,
                    "vendor_name": null,
                    "shipper_name": null,
                    "source": null,
                    "weight": null,
                    "parcel_width": null,
                    "parcel_length": null,
                    "parcel_height": null,
                    "cubic_meter": null,
                    "boxes": null,
                    "cartons": null,
                    "pieces": null,
                    "envelopes": null,
                    "pallets": null,
                    "bins": null,
                    "trays": null,
                    "bundles": null,
                    "rolls": null,
                    "number_of_shipping_labels": null,
                    "attachment_url": null,
                    "detrack_number": "DET2000001",
                    "status": "dispatched",
                    "tracking_status": "Info received",
                    "reason": null,
                    "last_reason": null,
                    "received_by_sent_by": null,
                    "note": null,
                    "carrier": null,
                    "pod_lat": "",
                    "pod_lng": "",
                    "pod_address": "",
                    "address_tracked_at": null,
                    "arrived_lat": null,
                    "arrived_lng": null,
                    "arrived_address": null,
                    "arrived_at": null,
                    "texted_at": null,
                    "called_at": null,
                    "serial_number": null,
                    "signed_at": null,
                    "photo_1_at": null,
                    "photo_2_at": null,
                    "photo_3_at": null,
                    "photo_4_at": null,
                    "photo_5_at": null,
                    "signature_file_url": null,
                    "photo_1_file_url": null,
                    "photo_2_file_url": null,
                    "photo_3_file_url": null,
                    "photo_4_file_url": null,
                    "photo_5_file_url": null,
                    "actual_weight": null,
                    "temperature": null,
                    "hold_time": null,
                    "payment_collected": null,
                    "auto_reschedule": null,
                    "actual_crates": null,
                    "actual_pallets": null,
                    "actual_utilization": null,
                    "goods_service_rating": null,
                    "driver_rating": null,
                    "customer_feedback": null,
                    "eta_time": null,
                    "live_eta": null,
                    "depot": null,
                    "depot_contact": null,
                    "department": null,
                    "sales_person": null,
                    "identification_number": null,
                    "bank_prefix": null,
                    "run_number": null,
                    "pick_up_from": null,
                    "pick_up_time": null,
                    "pick_up_lat": null,
                    "pick_up_lng": null,
                    "pick_up_address": null,
                    "pick_up_address_1": null,
                    "pick_up_address_2": null,
                    "pick_up_address_3": null,
                    "pick_up_city": null,
                    "pick_up_state": null,
                    "pick_up_country": null,
                    "pick_up_postal_code": null,
                    "pick_up_zone": null,
                    "pick_up_assign_to": null,
                    "pick_up_reason": null,
                    "info_received_at": "2018-06-14T06:04:06.017Z",
                    "pick_up_at": null,
                    "scheduled_at": null,
                    "at_warehouse_at": null,
                    "out_for_delivery_at": null,
                    "head_to_pick_up_at": null,
                    "head_to_delivery_at": null,
                    "cancelled_at": null,
                    "pod_at": null,
                    "pick_up_failed_count": null,
                    "deliver_failed_count": null,
                    "job_price": null,
                    "insurance_price": null,
                    "insurance_coverage": false,
                    "total_price": null,
                    "payer_type": null,
                    "remarks": null,
                    "items_count": 2,
                    "service_type": null,
                    "warehouse_address": null,
                    "destination_time_window": null,
                    "door": null,
                    "time_zone": null,
                    "vehicle_type": null,
                    "created_at": "2018-06-14T06:04:06.017Z",
                    "items": [{
                        "id": "5b22055510c92b1a046ece05",
                        "sku": "12345678",
                        "purchase_order_number": null,
                        "batch_number": null,
                        "expiry_date": null,
                        "description": null,
                        "comments": null,
                        "quantity": 10,
                        "unit_of_measure": null,
                        "checked": false,
                        "actual_quantity": null,
                        "inbound_quantity": null,
                        "unload_time_estimate": null,
                        "unload_time_actual": null,
                        "follow_up_quantity": null,
                        "follow_up_reason": null,
                        "rework_quantity": null,
                        "rework_reason": null,
                        "reject_quantity": 0,
                        "reject_reason": null,
                        "weight": null,
                        "serial_numbers": [],
                        "photo_url": null
                    }, {
                        "id": "5b22055510c92b1a046ece06",
                        "sku": "12387654",
                        "purchase_order_number": null,
                        "batch_number": null,
                        "expiry_date": null,
                        "description": null,
                        "comments": null,
                        "quantity": 5,
                        "unit_of_measure": null,
                        "checked": false,
                        "actual_quantity": null,
                        "inbound_quantity": null,
                        "unload_time_estimate": null,
                        "unload_time_actual": null,
                        "follow_up_quantity": null,
                        "follow_up_reason": null,
                        "rework_quantity": null,
                        "rework_reason": null,
                        "reject_quantity": 0,
                        "reject_reason": null,
                        "weight": null,
                        "serial_numbers": [],
                        "photo_url": null
                    }]
                }
            }

+ Response 200 (application/json)

    + Body

            {
                "data": {
                    "id": "5b22055510c92b1a046ece04",
                    "type": "Delivery",
                    "primary_job_status": "dispatched",
                    "open_to_marketplace": false,
                    "marketplace_offer": null,
                    "do_number": "DO 0",
                    "attempt": 1,
                    "date": "2018-06-14",
                    "start_date": "2018-06-14",
                    "job_age": 1,
                    "job_release_time": null,
                    "job_time": null,
                    "time_window": null,
                    "job_received_date": null,
                    "tracking_number": "T0",
                    "order_number": "ORN12345678",
                    "job_type": null,
                    "job_sequence": null,
                    "job_fee": null,
                    "address_lat": null,
                    "address_lng": null,
                    "address": "Singapore 470140",
                    "company_name": null,
                    "address_1": null,
                    "address_2": null,
                    "address_3": null,
                    "postal_code": "470140",
                    "city": null,
                    "state": null,
                    "country": null,
                    "geocoded_lat": 1.33668219002454,
                    "geocoded_lng": 103.910711702473,
                    "billing_address": null,
                    "deliver_to_collect_from": "James Li",
                    "last_name": null,
                    "phone_number": "65432178",
                    "sender_phone_number": null,
                    "fax_number": "65432179",
                    "instructions": null,
                    "assign_to": null,
                    "notify_email": "test@example.com",
                    "webhook_url": null,
                    "zone": null,
                    "customer": null,
                    "account_number": null,
                    "job_owner": null,
                    "invoice_number": null,
                    "invoice_amount": null,
                    "payment_mode": null,
                    "payment_amount": null,
                    "group_name": null,
                    "vendor_name": null,
                    "shipper_name": null,
                    "source": null,
                    "weight": null,
                    "parcel_width": null,
                    "parcel_length": null,
                    "parcel_height": null,
                    "cubic_meter": null,
                    "boxes": null,
                    "cartons": null,
                    "pieces": null,
                    "envelopes": null,
                    "pallets": null,
                    "bins": null,
                    "trays": null,
                    "bundles": null,
                    "rolls": null,
                    "number_of_shipping_labels": null,
                    "attachment_url": null,
                    "detrack_number": "DET2000001",
                    "status": "dispatched",
                    "tracking_status": "Info received",
                    "reason": null,
                    "last_reason": null,
                    "received_by_sent_by": null,
                    "note": null,
                    "carrier": null,
                    "pod_lat": "",
                    "pod_lng": "",
                    "pod_address": "",
                    "address_tracked_at": null,
                    "arrived_lat": null,
                    "arrived_lng": null,
                    "arrived_address": null,
                    "arrived_at": null,
                    "texted_at": null,
                    "called_at": null,
                    "serial_number": null,
                    "signed_at": null,
                    "photo_1_at": null,
                    "photo_2_at": null,
                    "photo_3_at": null,
                    "photo_4_at": null,
                    "photo_5_at": null,
                    "signature_file_url": null,
                    "photo_1_file_url": null,
                    "photo_2_file_url": null,
                    "photo_3_file_url": null,
                    "photo_4_file_url": null,
                    "photo_5_file_url": null,
                    "actual_weight": null,
                    "temperature": null,
                    "hold_time": null,
                    "payment_collected": null,
                    "auto_reschedule": null,
                    "actual_crates": null,
                    "actual_pallets": null,
                    "actual_utilization": null,
                    "goods_service_rating": null,
                    "driver_rating": null,
                    "customer_feedback": null,
                    "eta_time": null,
                    "live_eta": null,
                    "depot": null,
                    "depot_contact": null,
                    "department": null,
                    "sales_person": null,
                    "identification_number": null,
                    "bank_prefix": null,
                    "run_number": null,
                    "pick_up_from": null,
                    "pick_up_time": null,
                    "pick_up_lat": null,
                    "pick_up_lng": null,
                    "pick_up_address": null,
                    "pick_up_address_1": null,
                    "pick_up_address_2": null,
                    "pick_up_address_3": null,
                    "pick_up_city": null,
                    "pick_up_state": null,
                    "pick_up_country": null,
                    "pick_up_postal_code": null,
                    "pick_up_zone": null,
                    "pick_up_assign_to": null,
                    "pick_up_reason": null,
                    "info_received_at": "2018-06-14T06:04:06.017Z",
                    "pick_up_at": null,
                    "scheduled_at": null,
                    "at_warehouse_at": null,
                    "out_for_delivery_at": null,
                    "head_to_pick_up_at": null,
                    "head_to_delivery_at": null,
                    "cancelled_at": null,
                    "pod_at": null,
                    "pick_up_failed_count": null,
                    "deliver_failed_count": null,
                    "job_price": null,
                    "insurance_price": null,
                    "insurance_coverage": false,
                    "total_price": null,
                    "payer_type": null,
                    "remarks": null,
                    "items_count": 2,
                    "service_type": null,
                    "warehouse_address": null,
                    "destination_time_window": null,
                    "door": null,
                    "time_zone": null,
                    "vehicle_type": null,
                    "created_at": "2018-06-14T06:04:06.017Z",
                    "items": [{
                        "id": "5b22055510c92b1a046ece05",
                        "sku": "12345678",
                        "purchase_order_number": null,
                        "batch_number": null,
                        "expiry_date": null,
                        "description": null,
                        "comments": null,
                        "quantity": 10,
                        "unit_of_measure": null,
                        "checked": false,
                        "actual_quantity": null,
                        "inbound_quantity": null,
                        "unload_time_estimate": null,
                        "unload_time_actual": null,
                        "follow_up_quantity": null,
                        "follow_up_reason": null,
                        "rework_quantity": null,
                        "rework_reason": null,
                        "reject_quantity": 0,
                        "reject_reason": null,
                        "weight": null,
                        "serial_numbers": [],
                        "photo_url": null
                    }, {
                        "id": "5b22055510c92b1a046ece06",
                        "sku": "12387654",
                        "purchase_order_number": null,
                        "batch_number": null,
                        "expiry_date": null,
                        "description": null,
                        "comments": null,
                        "quantity": 5,
                        "unit_of_measure": null,
                        "checked": false,
                        "actual_quantity": null,
                        "inbound_quantity": null,
                        "unload_time_estimate": null,
                        "unload_time_actual": null,
                        "follow_up_quantity": null,
                        "follow_up_reason": null,
                        "rework_quantity": null,
                        "rework_reason": null,
                        "reject_quantity": 0,
                        "reject_reason": null,
                        "weight": null,
                        "serial_numbers": [],
                        "photo_url": null
                    }],
                    "milestones": [{
                        "status": "info_recv",
                        "assign_to": null,
                        "reason": null,
                        "pod_at": "2018-06-14T06:04:06.017Z",
                        "created_at": "2018-06-14T06:04:06.017Z",
                        "user_name": "Simon"
                    }]
                }
            }

### Delete [DELETE]

+ Parameters

    + type: `Delivery` (string, optional) - Detrack Job Type to be deleted. Must be `Delivery` or `Collection`.

+ Request (application/json)

    + Headers

            X-API-KEY: {API_KEY}

+ Response 204 (application/json)

## Reattempt [/dn/jobs/reattempt]

+ `do_number` (string required) D.O No.
+ `date` (date) Date.
+ `new_date` (date) Date of the reattempt if different from date.
+ `type` (string) Detrack Job Type.

### Reattempt [POST]

+ Request (application/json)

    + Headers

            X-API-KEY: {API_KEY}

    + Body

            {
                "data": {
                    "do_number": "5b22055510c92b1a046ece18",
                    "date": "2019-03-08",
                    "type": "Delivery",
                    "new_date": "2019-03-18"
                }
            }

+ Response 200 (application/json)

    + Body

            {
                "data": {
                    "id": "5b22055510c92b1a046ece18",
                    "type": "Delivery",
                    "primary_job_status": "dispatched",
                    "open_to_marketplace": false,
                    "marketplace_offer": null,
                    "do_number": "DO 0",
                    "attempt": 1,
                    "date": "2018-06-14",
                    "start_date": "2018-06-14",
                    "job_age": 1,
                    "job_release_time": null,
                    "job_time": null,
                    "time_window": null,
                    "job_received_date": null,
                    "tracking_number": "T0",
                    "order_number": "ORN12345678",
                    "job_type": null,
                    "job_sequence": null,
                    "job_fee": null,
                    "address_lat": null,
                    "address_lng": null,
                    "address": "Singapore 470140",
                    "company_name": null,
                    "address_1": null,
                    "address_2": null,
                    "address_3": null,
                    "postal_code": "470140",
                    "city": null,
                    "state": null,
                    "country": null,
                    "geocoded_lat": 1.33668219002454,
                    "geocoded_lng": 103.910711702473,
                    "billing_address": null,
                    "deliver_to_collect_from": "James Li",
                    "last_name": null,
                    "phone_number": "65432178",
                    "sender_phone_number": null,
                    "fax_number": "65432179",
                    "instructions": null,
                    "assign_to": null,
                    "notify_email": "test@example.com",
                    "webhook_url": null,
                    "zone": null,
                    "customer": null,
                    "account_number": null,
                    "job_owner": null,
                    "invoice_number": null,
                    "invoice_amount": null,
                    "payment_mode": null,
                    "payment_amount": null,
                    "group_name": null,
                    "vendor_name": null,
                    "shipper_name": null,
                    "source": null,
                    "weight": null,
                    "parcel_width": null,
                    "parcel_length": null,
                    "parcel_height": null,
                    "cubic_meter": null,
                    "boxes": null,
                    "cartons": null,
                    "pieces": null,
                    "envelopes": null,
                    "pallets": null,
                    "bins": null,
                    "trays": null,
                    "bundles": null,
                    "rolls": null,
                    "number_of_shipping_labels": null,
                    "attachment_url": null,
                    "detrack_number": "DET2000001",
                    "status": "dispatched",
                    "tracking_status": "Info received",
                    "reason": null,
                    "last_reason": null,
                    "received_by_sent_by": null,
                    "note": null,
                    "carrier": null,
                    "pod_lat": "",
                    "pod_lng": "",
                    "pod_address": "",
                    "address_tracked_at": null,
                    "arrived_lat": null,
                    "arrived_lng": null,
                    "arrived_address": null,
                    "arrived_at": null,
                    "texted_at": null,
                    "called_at": null,
                    "serial_number": null,
                    "signed_at": null,
                    "photo_1_at": null,
                    "photo_2_at": null,
                    "photo_3_at": null,
                    "photo_4_at": null,
                    "photo_5_at": null,
                    "photo_6_at": null,
                    "photo_7_at": null,
                    "photo_8_at": null,
                    "photo_9_at": null,
                    "photo_10_at": null,
                    "signature_file_url": null,
                    "photo_1_file_url": null,
                    "photo_2_file_url": null,
                    "photo_3_file_url": null,
                    "photo_4_file_url": null,
                    "photo_5_file_url": null,
                    "photo_6_file_url": null,
                    "photo_7_file_url": null,
                    "photo_8_file_url": null,
                    "photo_9_file_url": null,
                    "photo_10_file_url": null,
                    "actual_weight": null,
                    "temperature": null,
                    "hold_time": null,
                    "payment_collected": null,
                    "auto_reschedule": null,
                    "actual_crates": null,
                    "actual_pallets": null,
                    "actual_utilization": null,
                    "goods_service_rating": null,
                    "driver_rating": null,
                    "customer_feedback": null,
                    "eta_time": null,
                    "live_eta": null,
                    "depot": null,
                    "depot_contact": null,
                    "department": null,
                    "sales_person": null,
                    "identification_number": null,
                    "bank_prefix": null,
                    "run_number": null,
                    "pick_up_from": null,
                    "pick_up_time": null,
                    "pick_up_lat": null,
                    "pick_up_lng": null,
                    "pick_up_address": null,
                    "pick_up_address_1": null,
                    "pick_up_address_2": null,
                    "pick_up_address_3": null,
                    "pick_up_city": null,
                    "pick_up_state": null,
                    "pick_up_country": null,
                    "pick_up_postal_code": null,
                    "pick_up_zone": null,
                    "pick_up_assign_to": null,
                    "pick_up_reason": null,
                    "info_received_at": "2018-06-14T06:04:06.017Z",
                    "pick_up_at": null,
                    "scheduled_at": null,
                    "at_warehouse_at": null,
                    "out_for_delivery_at": null,
                    "head_to_pick_up_at": null,
                    "head_to_delivery_at": null,
                    "cancelled_at": null,
                    "pod_at": null,
                    "pick_up_failed_count": null,
                    "deliver_failed_count": null,
                    "job_price": null,
                    "insurance_price": null,
                    "insurance_coverage": false,
                    "total_price": null,
                    "payer_type": null,
                    "remarks": null,
                    "items_count": 2,
                    "service_type": null,
                    "warehouse_address": null,
                    "destination_time_window": null,
                    "door": null,
                    "time_zone": null,
                    "vehicle_type": null,
                    "created_at": "2018-06-14T06:04:06.017Z",
                    "items": [{
                        "id": "5b22055510c92b1a046ece05",
                        "sku": "12345678",
                        "purchase_order_number": null,
                        "batch_number": null,
                        "expiry_date": null,
                        "description": null,
                        "comments": null,
                        "quantity": 10,
                        "unit_of_measure": null,
                        "checked": false,
                        "actual_quantity": null,
                        "inbound_quantity": null,
                        "unload_time_estimate": null,
                        "unload_time_actual": null,
                        "follow_up_quantity": null,
                        "follow_up_reason": null,
                        "rework_quantity": null,
                        "rework_reason": null,
                        "reject_quantity": 0,
                        "reject_reason": null,
                        "weight": null,
                        "serial_numbers": [],
                        "photo_url": null
                    }, {
                        "id": "5b22055510c92b1a046ece06",
                        "sku": "12387654",
                        "purchase_order_number": null,
                        "batch_number": null,
                        "expiry_date": null,
                        "description": null,
                        "comments": null,
                        "quantity": 5,
                        "unit_of_measure": null,
                        "checked": false,
                        "actual_quantity": null,
                        "inbound_quantity": null,
                        "unload_time_estimate": null,
                        "unload_time_actual": null,
                        "follow_up_quantity": null,
                        "follow_up_reason": null,
                        "rework_quantity": null,
                        "rework_reason": null,
                        "reject_quantity": 0,
                        "reject_reason": null,
                        "weight": null,
                        "serial_numbers": [],
                        "photo_url": null
                    }],
                    "milestones": [{
                        "status": "info_recv",
                        "assign_to": null,
                        "reason": null,
                        "pod_at": "2018-06-14T06:04:06.017Z",
                        "created_at": "2018-06-14T06:04:06.017Z",
                        "user_name": "Simon"
                    }]
                }
            }

## Export by DO [/dn/jobs/export/{do_number}{?format}{?document}{?type}]

### Download Exported File [GET]

+ Parameters

    + format: `pdf` (string) - Format of export. Must be `pdf` or `tiff`

    + document: `pod` (string, optional) - Document to be exported. Must be `pod` or `shipping-label`.
        + default: `pod`

    + type: `Delivery` (string, optional) - Type to be exported. Must be `Delivery` or `Collection`

+ Request (application/json)

+ Response 200 (application/octet-stream)

    + Headers

            Content-Disposition: attachment; filename="{filename}"

    + Body

            File content

## Export by DO and Date [/dn/jobs/export/{do_number}/{date}{?format}{?document}{?type}]

### Download Exported File [GET]

+ Parameters

    + format: `pdf` (string) - Format of export. Must be `pdf` or `tiff`

    + document: `pod` (string, optional) - Document to be exported. Must be `pod` or `shipping-label`.
        + default: `pod`

    + type: `Delivery` (string, optional) - Type to be exported. Must be `Delivery` or `Collection`

+ Request (application/json)

+ Response 200 (application/octet-stream)

    + Headers

            Content-Disposition: attachment; filename="{filename}"

    + Body

            File content

## Search [/dn/jobs/search]

+ `account_number` (string) Account number.
+ `address` (string) Address.
+ `deliver_to_collect_from` (string) Contact name.
+ `customer` (string) Customer.
+ `dates` (object) Date range in the form { from: '2018-07-01', to: '2018-07-31' }.
+ `department` (string) Department.
+ `do_number` (string) DO number.
+ `do_numbers` (array[string]) Array of DO numbers.
+ `groups` (array[Group]) An array of groups. E.g [ { name: 'Detrack' } ].
+ `invoice_number` (string) Invoice number.
+ `item_batch_number` (string) Item batch number.
+ `item_description` (string) Item description.
+ `item_purchase_order_number` (string) Item purchase order number.
+ `item_reasons` (array[string]) An array of item reasons.
+ `item_serial_numbers` (string) Item serial number.
+ `job_time` (string) Delivery time / collection time.
+ `job_type` (string) Job type.
+ `open_to_marketplace` (boolean) Open job.
+ `order_number` (string) Order number.
+ `reasons` (array[string) Reasons. E.g ['No Recipient']
+ `run_number` (string) Run number.
+ `serial_number` (string) Serial number.
+ `source` (string) Source.
+ `start_dates` (object) Start date range in the form { from: '2018-07-01', to: '2018-07-31' }
+ `statuses` (array[string]) Array of statues.
+ `time_window` (string) Time slot.
+ `tracking_number` (string) Tracking number.
+ `type` (string) Type. Must be `Delivery` / `Collection` or `null`.
+ `vehicles` (array[Vehicle]) Array of vehicles. E.g [ { name: 'Sam' } ].
+ `zone` (string) Zone.
+ `page` (string) Page of search results.
+ `limit` (string) Number of records per page. Maximum 100.

### Search [POST]

+ Request (application/json)

    + Headers

            X-API-KEY: {API_KEY}

    + Body

            {
                "data": {
                    "type": "Delivery",
                    "do_number": "DO123456",
                    "dates": {
                        "from": "2018-07-01",
                        "to": "2018-07-31"
                    },
                    "groups": [
                        {
                            "name": "Detrack"
                        }
                    ]
                }
            }

+ Response 200 (application/json)

    + Body

            {
                "data": [
                    {
                        "id": "5b22055510c92b1a046ece04",
                        "type": "Delivery",
                        "primary_job_status": "dispatched",
                        "open_to_marketplace": false,
                        "marketplace_offer": null,
                        "do_number": "DO 0",
                        "attempt": 1,
                        "date": "2018-06-14",
                        "start_date": "2018-06-14",
                        "job_age": 1,
                        "job_release_time": null,
                        "job_time": null,
                        "time_window": null,
                        "job_received_date": null,
                        "tracking_number": "T0",
                        "order_number": "ORN12345678",
                        "job_type": null,
                        "job_sequence": null,
                        "job_fee": null,
                        "address_lat": null,
                        "address_lng": null,
                        "address": "Singapore 470140",
                        "company_name": null,
                        "address_1": null,
                        "address_2": null,
                        "address_3": null,
                        "postal_code": "470140",
                        "city": null,
                        "state": null,
                        "country": null,
                        "geocoded_lat": 1.33668219002454,
                        "geocoded_lng": 103.910711702473,
                        "billing_address": null,
                        "deliver_to_collect_from": "James Li",
                        "last_name": null,
                        "phone_number": "65432178",
                        "sender_phone_number": null,
                        "fax_number": "65432179",
                        "instructions": null,
                        "assign_to": null,
                        "notify_email": "test@example.com",
                        "webhook_url": null,
                        "zone": null,
                        "customer": null,
                        "account_number": null,
                        "job_owner": null,
                        "invoice_number": null,
                        "invoice_amount": null,
                        "payment_mode": null,
                        "payment_amount": null,
                        "group_name": null,
                        "vendor_name": null,
                        "shipper_name": null,
                        "source": null,
                        "weight": null,
                        "parcel_width": null,
                        "parcel_length": null,
                        "parcel_height": null,
                        "cubic_meter": null,
                        "boxes": null,
                        "cartons": null,
                        "pieces": null,
                        "envelopes": null,
                        "pallets": null,
                        "bins": null,
                        "trays": null,
                        "bundles": null,
                        "rolls": null,
                        "number_of_shipping_labels": null,
                        "attachment_url": null,
                        "detrack_number": "DET2000001",
                        "status": "dispatched",
                        "tracking_status": "Info received",
                        "reason": null,
                        "last_reason": null,
                        "received_by_sent_by": null,
                        "note": null,
                        "carrier": null,
                        "pod_lat": "",
                        "pod_lng": "",
                        "pod_address": "",
                        "address_tracked_at": null,
                        "arrived_lat": null,
                        "arrived_lng": null,
                        "arrived_address": null,
                        "arrived_at": null,
                        "texted_at": null,
                        "called_at": null,
                        "serial_number": null,
                        "signed_at": null,
                        "photo_1_at": null,
                        "photo_2_at": null,
                        "photo_3_at": null,
                        "photo_4_at": null,
                        "photo_5_at": null,
                        "signature_file_url": null,
                        "photo_1_file_url": null,
                        "photo_2_file_url": null,
                        "photo_3_file_url": null,
                        "photo_4_file_url": null,
                        "photo_5_file_url": null,
                        "actual_weight": null,
                        "temperature": null,
                        "hold_time": null,
                        "payment_collected": null,
                        "auto_reschedule": null,
                        "actual_crates": null,
                        "actual_pallets": null,
                        "actual_utilization": null,
                        "goods_service_rating": null,
                        "driver_rating": null,
                        "customer_feedback": null,
                        "eta_time": null,
                        "live_eta": null,
                        "depot": null,
                        "depot_contact": null,
                        "department": null,
                        "sales_person": null,
                        "identification_number": null,
                        "bank_prefix": null,
                        "run_number": null,
                        "pick_up_from": null,
                        "pick_up_time": null,
                        "pick_up_lat": null,
                        "pick_up_lng": null,
                        "pick_up_address": null,
                        "pick_up_address_1": null,
                        "pick_up_address_2": null,
                        "pick_up_address_3": null,
                        "pick_up_city": null,
                        "pick_up_state": null,
                        "pick_up_country": null,
                        "pick_up_postal_code": null,
                        "pick_up_zone": null,
                        "pick_up_assign_to": null,
                        "pick_up_reason": null,
                        "info_received_at": "2018-06-14T06:04:06.017Z",
                        "pick_up_at": null,
                        "scheduled_at": null,
                        "at_warehouse_at": null,
                        "out_for_delivery_at": null,
                        "head_to_pick_up_at": null,
                        "head_to_delivery_at": null,
                        "cancelled_at": null,
                        "pod_at": null,
                        "pick_up_failed_count": null,
                        "deliver_failed_count": null,
                        "job_price": null,
                        "insurance_price": null,
                        "insurance_coverage": false,
                        "total_price": null,
                        "payer_type": null,
                        "remarks": null,
                        "items_count": 2,
                        "service_type": null,
                        "warehouse_address": null,
                        "destination_time_window": null,
                        "door": null,
                        "time_zone": null,
                        "vehicle_type": null,
                        "created_at": "2018-06-14T06:04:06.017Z",
                        "items": [{
                            "id": "5b22055510c92b1a046ece05",
                            "sku": "12345678",
                            "purchase_order_number": null,
                            "batch_number": null,
                            "expiry_date": null,
                            "description": null,
                            "comments": null,
                            "quantity": 10,
                            "unit_of_measure": null,
                            "checked": false,
                            "actual_quantity": null,
                            "inbound_quantity": null,
                            "unload_time_estimate": null,
                            "unload_time_actual": null,
                            "follow_up_quantity": null,
                            "follow_up_reason": null,
                            "rework_quantity": null,
                            "rework_reason": null,
                            "reject_quantity": 0,
                            "reject_reason": null,
                            "weight": null,
                            "serial_numbers": [],
                            "photo_url": null
                        }, {
                            "id": "5b22055510c92b1a046ece06",
                            "sku": "12387654",
                            "purchase_order_number": null,
                            "batch_number": null,
                            "expiry_date": null,
                            "description": null,
                            "comments": null,
                            "quantity": 5,
                            "unit_of_measure": null,
                            "checked": false,
                            "actual_quantity": null,
                            "inbound_quantity": null,
                            "unload_time_estimate": null,
                            "unload_time_actual": null,
                            "follow_up_quantity": null,
                            "follow_up_reason": null,
                            "rework_quantity": null,
                            "rework_reason": null,
                            "reject_quantity": 0,
                            "reject_reason": null,
                            "weight": null,
                            "serial_numbers": [],
                            "photo_url": null
                        }],
                        "milestones": [{
                            "status": "info_recv",
                            "assign_to": null,
                            "reason": null,
                            "pod_at": "2018-06-14T06:04:06.017Z",
                            "created_at": "2018-06-14T06:04:06.017Z",
                            "user_name": "Simon"
                        }]
                    }
                ],
                "links": {
                    "next": "https://app.detrack.com/api/v2/dn/jobs/search/1",
                    "prev": null
                }
            }



## Group Depots

## Depots (object)

Attributes

+ `name` (string required) Depot name.
+ `address` (string required) Full formatted address of the depot.
+ `addr_1` (string) Address line 1.
+ `addr_2` (string) Address line 2.
+ `addr_3` (string) Address line 3.
+ `postal_code` (string) Postal or ZIP code.
+ `city` (string) City or town name.
+ `state` (string) State, province, or region.
+ `address_lat` (float) Latitude of the depot location.
+ `address_lng` (float) Longitude of the depot location.
+ `location` (array[number]) Geolocation coordinates of the depot in [longitude, latitude] format, used for map and routing calculations.

Readonly Attribute

+ `id` (string) Depot unique identifier.


## List Depots [/dn/depots{?page}{?limit}]

### List [GET]

+ Parameters

    + `page`: `1` (number, optional) - Page number.
        + default: `1`

    + `limit`: `50` (number, optional) - Number of records per page.
        + default: `25`

+ Request (application/json)

    + Headers

            X-API-KEY: {API_KEY}

+ Response 200 (application/json)

    + Body

            {
                "data": [
                    {
                        "id": "6852134d29e804821869qgr4",
                        "name": "Main Depot",
                        "address": "20 W 34th St., New York, NY 10001, United States",
                        "addr_1": null,
                        "addr_2": null,
                        "addr_3": null,
                        "zip_code": null,
                        "country": null,
                        "city": null,
                        "state": null,
                        "country_id": null,
                        "location": [
                            -73.9857,
                            40.7484
                        ],
                        "address_lat": 40.7484,
                        "address_lng": -73.9857
                    },
                    {
                        "id": "6852131629e804821869odb4",
                        "name": "Secondary Depot",
                        "address": "810 Yonkers Ave, Yonkers, NY 10704, United States",
                        "addr_1": null,
                        "addr_2": null,
                        "addr_3": null,
                        "zip_code": null,
                        "country": null,
                        "city": null,
                        "state": null,
                        "country_id": null,
                        "location": [
                            -73.8462,
                            40.9279
                        ],
                        "address_lat": 40.9279,
                        "address_lng": -73.8462
                    },
                ],
                "links": {
                    "first": "https://app.detrack.com/api/v2/dn/depots?page=1",
                    "last": "https://app.detrack.com/api/v2/dn/depots?page=1",
                    "next": null,
                    "prev": null
                },
                "total_count": 2
            }

## Retrieve Depot by Name [/dn/depots/{?name}]

### Show [GET]

+ Parameters

    + name: `Depot 1` (string, required) - Name of the depot.

+ Request (application/json)

    + Headers

            X-API-KEY: {API_KEY}

+ Response 200 (application/json)

    + Body

            {
                "data": {
                    "id": "68ff81bce8ec54b0f9f424fa",
                    "name": "Depot 1",
                    "address": "SM Megamall, EDSA corner Doña Julia Vargas Ave, Ortigas Center, Mandaluyong, 1550 Metro Manila",
                    "addr_1": null,
                    "addr_2": null,
                    "addr_3": null,
                    "zip_code": null,
                    "country": null,
                    "city": null,
                    "state": null,
                    "country_id": null,
                    "location": [
                        121.055626,
                        14.583941
                    ],
                    "address_lat": 14.583941,
                    "address_lng": 121.055626
                }
            }


## Create Depot | Bulk Update / Delete Depots [/dn/depots]

### Create [POST]

A depot must include at least a name and an address that can be geocoded.

+ Request (application/json)

    + Headers

            X-API-KEY: {API_KEY}
            
    + Body

            {
                "data": {
                    "name": "Main Depot", 
                    "address": "SM Megamall, EDSA corner Doña Julia Vargas Ave, Ortigas Center, Mandaluyong, 1550 Metro Manila"
                }
            }

+ Response 200 (application/json)

    + Body

            {
                "data": {
                    "id": "68f0d416e8ec54cbf4a04dba",
                    "name": "Main Depot",
                    "address": "SM Megamall, EDSA corner Doña Julia Vargas Ave, Ortigas Center, Mandaluyong, 1550 Metro Manila",
                    "addr_1": null,
                    "addr_2": null,
                    "addr_3": null,
                    "zip_code": null,
                    "city": null,
                    "state": null,
                    "location": [
                        121.055626,
                        14.583941
                    ],
                    "address_lat": 14.583941,
                    "address_lng": 121.055626
                }
            }
            

### Bulk Update [PUT]

+ Request (application/json)

    + Headers

            X-API-KEY: {API_KEY}

    + Body
    
            {
                "data": [ 
                    {"name": "Depot 1", "data": {"addr1": "Sample Address"} }
                ]
            }
    
+ Response 200 (application/json)

    + Body
    
            {
                "data": [
                    {
                        "name": "Depot 1",
                        "ok": true
                    }
                ]
            }

### Bulk Delete [DELETE]

+ Request (application/json)

    + Headers

            X-API-KEY: {API_KEY}

    + Body
    
            {
                "data": [{"name": "Depot 1"}]
            }
            
+ Response 200 (application/json)

    + Body
    
            {
                "data": [
                    {
                        "name": "Depot 1",
                        "deleted": true
                    }
                ]
            }


## Bulk Create Depots [/dn/depots/bulk]

### Bulk Create [POST]

Create multiple depot locations in one request.
Each depot must include at least a name and an address that can be geocoded.

+ Request (application/json)

    + Headers

            X-API-KEY: {API_KEY}
            
    + Body
            
            {
                "data": [{
                    "name": "Depot 1", 
                    "address": "SM Megamall, EDSA corner Doña Julia Vargas Ave, Ortigas Center, Mandaluyong, 1550 Metro Manila"
                },{
                    "name": "Depot 2",
                    "address": "SM Mall of Asia, Seaside Blvd, Pasay, Metro Manila, Philippines"
                }]
            }

+ Response 200 (application/json)

    + Body
    
            {
                "data": [
                    {
                        "id": "68ff81bce8ec54b0f9f424fa",
                        "name": "Depot 1",
                        "address": "SM Megamall, EDSA corner Doña Julia Vargas Ave, Ortigas Center, Mandaluyong, 1550 Metro Manila",
                        "addr_1": null,
                        "addr_2": null,
                        "addr_3": null,
                        "zip_code": null,
                        "country": null,
                        "city": null,
                        "state": null,
                        "country_id": null,
                        "location": [
                            121.055626,
                            14.583941
                        ],
                        "address_lat": 14.583941,
                        "address_lng": 121.055626
                    },
                    {
                        "id": "68ff81bde8ec54b0f9f424fd",
                        "name": "Depot 2",
                        "address": "SM Mall of Asia, Seaside Blvd, Pasay, Metro Manila, Philippines",
                        "addr_1": null,
                        "addr_2": null,
                        "addr_3": null,
                        "zip_code": null,
                        "country": null,
                        "city": null,
                        "state": null,
                        "country_id": null,
                        "location": [
                            120.98159942,
                            14.5351818
                        ],
                        "address_lat": 14.5351818,
                        "address_lng": 120.98159942
                    }
                ]
            }



## Group Routes

## Routes (object)

Attributes

+ `name` (string, required) Route name. Example: Morning Route
+ `date` (date, required) Route date in format YYYY-MM-DD.
+ `mode` (string, optional) Transport mode used for route planning.
    + Determines vehicle or travel type used in distance and time calculations.
    + Allowed values:
        + `drive, light_truck, medium_truck, truck, heavy_truck`
    + Default: `drive`
+ `vehicles` (array, required) Array of driver names
+ `type` (string, optional) Route optimization type.
    + Allowed values: `balanced, short, less_maneuvers`
    + Default: `balanced`
+ `job_ids` (array[string], required) Array of Job IDs to be included in the route.
    + Example: `["68f0d416e8ec54cbf4a04dba", "68f0d417e8ec54cbf4a04dbb"]`
+ `depot_location` (string, required) Starting depot ID or name.
    + Example: `{ "id": "68f0d416e8ec54cbf4a04dba"}`
+ `end_depot_location` (string, optional) Ending depot ID or name.
    + Example: `{ "id": "68f0d417e8ec54cbf4a04dbb"}`
+ `time_window_from` (string, optional) Route start time window in HH:MM (24-hour format).
    + Example: `08:00`
+ `time_window_to` (string, optional) Route end time window in HH:MM (24-hour format).
    + Example: `18:00`
+ `traffic` (boolean, optional) Whether to enable traffic-aware routing.
    + Default: `false`
+ `max_speed` (integer, optional) Maximum average vehicle speed in km/h.
    + Example: `60`
+ `service_time` (integer, optional) Average service time per stop, in minutes.
    + Example: `10`
+ `manual_service_time` (boolean, optional) Whether to apply a fixed service time per stop.
    + Default: `false`
+ `avoid_toll` (boolean, optional) Whether to avoid toll roads during route planning.
    + Default: `false`

Readonly Attribute

+ `id` (string) Route unique identifier.

## Retrieve Routes by Date [/dn/routes/{?date}{?page}{?limit}]

### List [GET]

+ Parameters
    + date: `2025-10-20` (date, required) — Filter routes by date (YYYY-MM-DD).
    + page: 1 (number, optional) — Page number.
        + default: 1
    + limit: 25 (number, optional) — Number of records per page. Maximum 100.
        + default: 25

+ Request (application/json)

    + Headers

            X-API-KEY: {API_KEY}

+ Response 200 (application/json)

    + Body

            {
                "data": [
                    {
                        "id": "68ef3ff729e804b42a1324bc",
                        "vrp_id": "",
                        "name": "Morning Run",
                        "date": "2025-10-15",
                        "mode": "drive",
                        "status": "to_be_confirm",
                        "message": null,
                        "vehicle": {
                            "name": "East Drive",
                            "detrack_id": "dba9c56fd59bc320",
                            "speed_limit": null,
                            "stationary_limit": null,
                            "disabled": false,
                            "lat": 14.4209833,
                            "lng": 120.9768054,
                            "address": "CXCG+8MG, City of Bacoor, Cavite, Philippines",
                            "mobile_number": "639173141859",
                            "os_and_version": "Android / 15",
                            "app_version": "4.7.1",
                            "checked_in_at": "2025-05-23T14:09:25.978+08:00",
                            "created_at": "2025-05-23T14:09:26.145+08:00",
                            "auto_job_created": null,
                            "capacity": null,
                            "geoapify_mode": null,
                            "start_time": null,
                            "end_time": null,
                            "break_from": null,
                            "break_to": null,
                            "duration": null,
                            "id": "6830111629e804826522f788",
                            "can_grab_job": false,
                            "groups": [],
                            "zones": [
                                "East"
                            ],
                            "vehicle_types": [],
                            "gps": true,
                            "battery": 54,
                            "status": "off",
                            "speed": 1,
                            "max_speed": 1,
                            "avg_speed": 0,
                            "distance": 0.11,
                            "connected_at": "2025-09-23T22:39:58.037+08:00",
                            "tracked_at": "2025-09-23T22:39:31.280+08:00",
                            "last_pod_at": "2025-06-16T16:53:35.000+08:00",
                            "connection": "off",
                            "available_at": null,
                            "depot_location": {
                                "id": "67569ad229e80421887883a4",
                                "name": "SM Mall of Asia",
                                "address": "SM Mall of Asia, Seaside Blvd, Pasay, 1300 Metro Manila",
                                "addr_1": null,
                                "addr_2": null,
                                "addr_3": null,
                                "zip_code": null,
                                "country": null,
                                "city": null,
                                "state": null,
                                "country_id": null,
                                "location": [
                                    120.9822,
                                    14.531
                                ],
                                "address_lat": 14.531,
                                "address_lng": 120.9822
                            },
                            "end_depot_location": null,
                            "geofences": [],
                            "no_geofence": false,
                            "heading_to_address": ""
                        },
                        "time_window_from": "07:00",
                        "time_window_to": "23:50",
                        "traffic": null,
                        "max_speed": null,
                        "service_time": null,
                        "manual_service_time": false,
                        "avoid_toll": false,
                        "job_ids": [
                            "6890965a29e804ea9d4a5ea3",
                            "6890965a29e804ea9d4a5ea7"
                        ],
                        "depot_location": {
                            "id": "67569ad229e80421887883a4",
                            "name": "SM Mall of Asia",
                            "address": "SM Mall of Asia, Seaside Blvd, Pasay, 1300 Metro Manila",
                            "addr_1": null,
                            "addr_2": null,
                            "addr_3": null,
                            "zip_code": null,
                            "country": null,
                            "city": null,
                            "state": null,
                            "country_id": null,
                            "location": [
                                120.9822,
                                14.531
                            ],
                            "address_lat": 14.531,
                            "address_lng": 120.9822
                        },
                        "end_depot_location": null,
                        "custom_start_location": {
                            "type": "depot",
                            "depot_location_id": "67569ad229e80421887883a4",
                            "address": "SM Mall of Asia, Seaside Blvd, Pasay, 1300 Metro Manila",
                            "address_lat": 14.531,
                            "address_lng": 120.9822
                        },
                        "start_time": "07:00",
                        "completion_time": "07:30",
                        "total_distance": 6904,
                        "total_time": 1813.3020000000001,
                        "total_unplanned": 0,
                        "total_planned": 2,
                        "created_by": "User",
                        "updated_by": "User",
                        "updated_at": "2025-10-15T14:32:24.852+08:00",
                        "error": null,
                        "type": "balanced",
                        "completed_jobs": [],
                        "planned_jobs": [
                            {
                                "id": "6890965a29e804ea9d4a5ea3",
                                "type": "Delivery",
                                "status": "dispatched",
                                "do_number": "DO 10001",
                                "address": "Vicente Sotto St, CCP Complex, Pasay 1307",
                                "time_window_from": null,
                                "time_window_to": null,
                                "eta_time": "07:05",
                                "job_sequence": 1.0,
                                "weight": null,
                                "pallets": null,
                                "geocoded_lat": 14.5542,
                                "geocoded_lng": 120.9839,
                                "priority": null,
                                "service_time": 10,
                                "group": null,
                                "has_latlng": true
                            },
                            {
                                "id": "6890965a29e804ea9d4a5ea7",
                                "type": "Delivery",
                                "status": "dispatched",
                                "do_number": "DO 10005",
                                "address": "Coral Way, Conrad Manila, Pasay 1300",
                                "time_window_from": null,
                                "time_window_to": null,
                                "eta_time": "07:20",
                                "job_sequence": 2.0,
                                "weight": null,
                                "pallets": null,
                                "geocoded_lat": 14.5358,
                                "geocoded_lng": 120.984,
                                "priority": null,
                                "service_time": 10,
                                "group": null,
                                "has_latlng": true
                            }
                        ],
                        "unplanned_jobs": []
                    }
                ],
                "links": {
                    "first": "https://app.detrack.com/api/v2/dn/routes?jobs=true&page=1",
                    "last": "https://app.detrack.com/api/v2/dn/routes?jobs=true&page=1",
                    "next": null,
                    "prev": null
                },
                "total_count": 1
            }


## Retrieve Route by Name [/dn/routes/{?name}{?date}]

### List [GET]

+ Parameters
    + name: Morning Route (string, required)
        + The name of the route.
    + date: `2025-09-30` (string, required)

+ Request (application/json)

    + Headers

            X-API-KEY: {API_KEY}

+ Response 200 (application/json)

    + Body

            {
                "data": [
                    {
                        "id": "68f1aa5b29e8045192f56046",
                        "vrp_id": "",
                        "name": "sample_run",
                        "date": "2025-10-16",
                        "mode": "drive",
                        "status": "to_be_confirm",
                        "message": null,
                        "vehicle": {
                            "name": "Driver 1",
                            "detrack_id": "d4b21e0cb337ee3c",
                            "speed_limit": null,
                            "stationary_limit": null,
                            "disabled": false,
                            "lat": 1.3369397,
                            "lng": 103.9105252,
                            "address": "61 Kaki Bukit Ave 1, Singapore 417943",
                            "mobile_number": null,
                            "os_and_version": "Android / 9",
                            "app_version": "3.9.2",
                            "checked_in_at": "2022-03-18T15:16:32.654+08:00",
                            "created_at": "2022-01-26T14:13:48.081+08:00",
                            "auto_job_created": null,
                            "capacity": 0.0,
                            "geoapify_mode": null,
                            "start_time": null,
                            "end_time": null,
                            "break_from": null,
                            "break_to": null,
                            "duration": null,
                            "id": "61f0e69c29e80437569c63e9",
                            "can_grab_job": false,
                            "groups": [],
                            "zones": [],
                            "vehicle_types": [],
                            "gps": true,
                            "battery": 100,
                            "status": "off",
                            "speed": 1,
                            "max_speed": 1,
                            "avg_speed": 1,
                            "distance": 0.2,
                            "connected_at": "2022-04-27T09:06:49.067+08:00",
                            "tracked_at": "2022-04-27T09:06:30.667+08:00",
                            "last_pod_at": "2022-03-10T13:34:00.000-11:00",
                            "connection": "off",
                            "available_at": null,
                            "depot_location": null,
                            "end_depot_location": null,
                            "geofences": [],
                            "no_geofence": false,
                            "heading_to_address": ""
                        },
                        "time_window_from": "07:00",
                        "time_window_to": "23:50",
                        "traffic": null,
                        "max_speed": null,
                        "service_time": null,
                        "manual_service_time": false,
                        "avoid_toll": false,
                        "job_ids": [
                            "68f099d629e804e63bbddb0d",
                            "68f099d729e804e63bbddb12",
                            "68f099d729e804e63bbddb17",
                            "68f099d729e804e63bbddb1c",
                            "68f099d829e804e63bbddb21"
                        ],
                        "depot_location": {
                            "id": "68f0984529e804e195aa57ca",
                            "name": "Changi Airport",
                            "address": "Changi Airport",
                            "addr_1": null,
                            "addr_2": null,
                            "addr_3": null,
                            "zip_code": null,
                            "country": null,
                            "city": null,
                            "state": null,
                            "country_id": null,
                            "location": [
                                103.98922,
                                1.35509
                            ],
                            "address_lat": 1.35509,
                            "address_lng": 103.98922
                        },
                        "end_depot_location": null,
                        "custom_start_location": {
                            "type": "depot",
                            "depot_location_id": "68f0984529e804e195aa57ca",
                            "address": "Changi Airport",
                            "address_lat": 1.35509,
                            "address_lng": 103.98922
                        },
                        "start_time": "07:00",
                        "completion_time": "08:16",
                        "total_distance": 69700,
                        "total_time": 4571.34,
                        "total_unplanned": 0,
                        "total_planned": 5,
                        "created_by": "faker",
                        "updated_by": "faker",
                        "updated_at": "2025-10-17T16:48:18.925+08:00",
                        "error": null,
                        "type": "balanced",
                        "completed_jobs": [],
                        "planned_jobs": [
                            {
                                "id": "68f099d629e804e63bbddb0d",
                                "type": "Delivery",
                                "status": "dispatched",
                                "do_number": "Junction 8",
                                "address": "Junction 8",
                                "time_window_from": null,
                                "time_window_to": null,
                                "eta_time": "07:20",
                                "job_sequence": 1.0,
                                "weight": null,
                                "pallets": null,
                                "geocoded_lat": 1.3505893,
                                "geocoded_lng": 103.84874475,
                                "priority": null,
                                "service_time": null,
                                "group": null,
                                "has_latlng": true
                            },
                            {
                                "id": "68f099d729e804e63bbddb12",
                                "type": "Delivery",
                                "status": "dispatched",
                                "do_number": "Junction 10",
                                "address": "Junction 10",
                                "time_window_from": null,
                                "time_window_to": null,
                                "eta_time": "07:30",
                                "job_sequence": 2.0,
                                "weight": null,
                                "pallets": null,
                                "geocoded_lat": 1.31246,
                                "geocoded_lng": 103.86427,
                                "priority": null,
                                "service_time": null,
                                "group": null,
                                "has_latlng": true
                            },
                            {
                                "id": "68f099d729e804e63bbddb17",
                                "type": "Delivery",
                                "status": "dispatched",
                                "do_number": "Bedok Mall",
                                "address": "Bedok Mall",
                                "time_window_from": null,
                                "time_window_to": null,
                                "eta_time": "07:43",
                                "job_sequence": 3.0,
                                "weight": null,
                                "pallets": null,
                                "geocoded_lat": 1.32276,
                                "geocoded_lng": 103.93471,
                                "priority": null,
                                "service_time": null,
                                "group": null,
                                "has_latlng": true
                            },
                            {
                                "id": "68f099d729e804e63bbddb1c",
                                "type": "Delivery",
                                "status": "dispatched",
                                "do_number": "Sentosa Resort Worlds",
                                "address": "Sentosa Resort Worlds",
                                "time_window_from": null,
                                "time_window_to": null,
                                "eta_time": "08:04",
                                "job_sequence": 4.0,
                                "weight": null,
                                "pallets": null,
                                "geocoded_lat": 1.25218,
                                "geocoded_lng": 103.824175,
                                "priority": null,
                                "service_time": null,
                                "group": null,
                                "has_latlng": true
                            },
                            {
                                "id": "68f099d829e804e63bbddb21",
                                "type": "Delivery",
                                "status": "dispatched",
                                "do_number": "Marina Bay Sands",
                                "address": "Marina Bay Sands",
                                "time_window_from": null,
                                "time_window_to": null,
                                "eta_time": "08:16",
                                "job_sequence": 5.0,
                                "weight": null,
                                "pallets": null,
                                "geocoded_lat": 1.29097,
                                "geocoded_lng": 103.86012,
                                "priority": null,
                                "service_time": null,
                                "group": null,
                                "has_latlng": true
                            }
                        ],
                        "unplanned_jobs": []
                    }
                ],
                "links": {
                    "first": "https://app.detrack.com/api/v2/dn/routes?jobs=true&page=1",
                    "last": "https://app.detrack.com/api/v2/dn/routes?jobs=true&page=1",
                    "next": null,
                    "prev": null
                },
                "total_count": 1
            }

## Create / Update Route [/dn/routes/plan]

### Create or Update [POST]

Creates a new route or updates an existing one if a route with the same name and date already exists.
This endpoint performs planning and routing operations, assigning jobs to a route and automatically computing an optimized sequence.

> Note:
> Vehicle working hours (`from` and `to`) must be configured in the application. These values are not part of the API request payload.

+ Request (application/json)

    + Headers

            X-API-KEY: {API_KEY}
            
    + Attributes
        + depot_location (object, optional)
            You may provide either:

            - `{ "id": "…" }` to reference an existing depot
            - `{ "name": "…", "address": "…" }` to provide a custom depot
            
        + end_depot_location (object, optional)
            You may provide either:

            - `{ "id": "…" }` to reference an existing depot
            - `{ "name": "…", "address": "…" }` to provide a custom depot
            
    + Body

            {
                "data": {
                    "name": "sample_run",
                    "mode": "drive",
                    "date": "2025-10-27",
                    "manual_depot": true,
                    "manual_end_depot": true,
                    "depot_location": { "id": "674ecabbe8ec54052f7ead41" },
                    "time_window_from": "07:00",
                    "time_window_to": "23:50",
                    "vehicles": ["Driver 1", "Driver 2"],
                    "retain_assigments": true,
                    "vrp_exclude_send_driver": false,
                    "assign_route": true,
                    "job_ids": ["68e0bac7e8ec545357500616","68e0bac7e8ec54535750061a","68e0bac7e8ec54535750061e","68e0bac7e8ec545357500622","68e0bac7e8ec545357500626"]
                }
            }

+ Response 200 (application/json)

    + Body

            {
                "data": {
                    "id": "69001c6de8ec5410e2570bb3",
                    "vrp_id": "",
                    "name": "sample_run",
                    "date": "2025-10-27",
                    "mode": "drive",
                    "status": "to_be_confirm",
                    "message": null,
                    "vehicle": {
                        "name": "East Drive",
                        "detrack_id": "e8f413e5ec30a81e",
                        "speed_limit": null,
                        "stationary_limit": null,
                        "disabled": false,
                        "lat": null,
                        "lng": null,
                        "address": null,
                        "mobile_number": null,
                        "os_and_version": "",
                        "app_version": null,
                        "checked_in_at": null,
                        "created_at": null,
                        "auto_job_created": null,
                        "capacity": null,
                        "geoapify_mode": null,
                        "start_time": "08:00",
                        "end_time": "20:00",
                        "break_from": null,
                        "break_to": null,
                        "duration": null,
                        "id": "67501aeee8ec549bfba6c140",
                        "can_grab_job": false,
                        "groups": [],
                        "zones": [
                            "East"
                        ],
                        "vehicle_types": [],
                        "gps": false,
                        "battery": null,
                        "status": "installed",
                        "speed": 0,
                        "max_speed": 0,
                        "avg_speed": 0,
                        "distance": 0,
                        "connected_at": null,
                        "tracked_at": null,
                        "last_pod_at": "2025-06-13T16:53:58.000+10:00",
                        "connection": "off",
                        "available_at": null,
                        "depot_location": {
                            "id": "674ecabbe8ec54052f7ead41",
                            "name": "SM Mall of Asia",
                            "address": "SM Mall of Asia, Seaside Blvd, Pasay, 1300 Metro Manila",
                            "addr_1": "Quezon2 City",
                            "addr_2": null,
                            "addr_3": null,
                            "zip_code": null,
                            "country": null,
                            "city": null,
                            "state": null,
                            "country_id": null,
                            "location": [
                                120.9822,
                                14.531
                            ],
                            "address_lat": 14.531,
                            "address_lng": 120.9822
                        },
                        "end_depot_location": null,
                        "geofences": [],
                        "no_geofence": false,
                        "heading_to_address": ""
                    },
                    "time_window_from": "07:00",
                    "time_window_to": "23:50",
                    "traffic": null,
                    "max_speed": null,
                    "service_time": null,
                    "manual_service_time": false,
                    "avoid_toll": false,
                    "job_ids": [
                        "68e0bac7e8ec545357500616",
                        "68e0bac7e8ec54535750061a",
                        "68e0bac7e8ec54535750061e",
                        "68e0bac7e8ec545357500622",
                        "68e0bac7e8ec545357500626"
                    ],
                    "depot_location": {
                        "id": "674ecabbe8ec54052f7ead41",
                        "name": "SM Mall of Asia",
                        "address": "SM Mall of Asia, Seaside Blvd, Pasay, 1300 Metro Manila",
                        "addr_1": "Quezon2 City",
                        "addr_2": null,
                        "addr_3": null,
                        "zip_code": null,
                        "country": null,
                        "city": null,
                        "state": null,
                        "country_id": null,
                        "location": [
                            120.9822,
                            14.531
                        ],
                        "address_lat": 14.531,
                        "address_lng": 120.9822
                    },
                    "end_depot_location": null,
                    "custom_start_location": {
                        "type": "depot",
                        "depot_location_id": "674ecabbe8ec54052f7ead41",
                        "address": "SM Mall of Asia, Seaside Blvd, Pasay, 1300 Metro Manila",
                        "address_lat": 14.531,
                        "address_lng": 120.9822
                    },
                    "start_time": "07:00",
                    "completion_time": "08:12",
                    "total_distance": 15107,
                    "total_time": 4373.497,
                    "total_unplanned": 0,
                    "total_planned": 5,
                    "created_by": "User",
                    "updated_by": "User",
                    "updated_at": "2025-10-28T09:29:19.260+08:00",
                    "error": null,
                    "type": "balanced",
                    "completed_jobs": [],
                    "planned_jobs": [
                        {
                            "id": "68e0bac7e8ec545357500616",
                            "type": "Delivery",
                            "status": "dispatched",
                            "do_number": "DO 10001",
                            "address": "Vicente Sotto St, CCP Complex, Pasay 1307",
                            "time_window_from": null,
                            "time_window_to": null,
                            "eta_time": "07:05",
                            "job_sequence": 1.0,
                            "weight": null,
                            "pallets": null,
                            "geocoded_lat": 14.5542,
                            "geocoded_lng": 120.9839,
                            "priority": null,
                            "service_time": 10,
                            "has_latlng": true
                        },
                        {
                            "id": "68e0bac7e8ec54535750061a",
                            "type": "Delivery",
                            "status": "dispatched",
                            "do_number": "DO 10005",
                            "address": "Coral Way, Conrad Manila, Pasay 1300",
                            "time_window_from": null,
                            "time_window_to": null,
                            "eta_time": "07:20",
                            "job_sequence": 2.0,
                            "weight": null,
                            "pallets": null,
                            "geocoded_lat": 14.5358,
                            "geocoded_lng": 120.984,
                            "priority": null,
                            "service_time": 10,
                            "has_latlng": true
                        },
                        {
                            "id": "68e0bac7e8ec54535750061e",
                            "type": "Delivery",
                            "status": "dispatched",
                            "do_number": "DO 10006",
                            "address": "Pedro Bukaneg St, CCP Complex, Pasay 1307",
                            "time_window_from": null,
                            "time_window_to": null,
                            "eta_time": "07:36",
                            "job_sequence": 3.0,
                            "weight": null,
                            "pallets": null,
                            "geocoded_lat": 14.5538,
                            "geocoded_lng": 120.9844,
                            "priority": null,
                            "service_time": 10,
                            "has_latlng": true
                        },
                        {
                            "id": "68e0bac7e8ec545357500622",
                            "type": "Delivery",
                            "status": "dispatched",
                            "do_number": "DO 10007",
                            "address": "Jose Diokno Blvd, Pasay 1300",
                            "time_window_from": null,
                            "time_window_to": null,
                            "eta_time": "07:49",
                            "job_sequence": 4.0,
                            "weight": null,
                            "pallets": null,
                            "geocoded_lat": 14.5382,
                            "geocoded_lng": 120.9858,
                            "priority": null,
                            "service_time": 10,
                            "has_latlng": true
                        },
                        {
                            "id": "68e0bac7e8ec545357500626",
                            "type": "Delivery",
                            "status": "dispatched",
                            "do_number": "DO 10008",
                            "address": "GSIS Complex, Financial Center, Pasay 1308",
                            "time_window_from": null,
                            "time_window_to": null,
                            "eta_time": "08:02",
                            "job_sequence": 5.0,
                            "weight": null,
                            "pallets": null,
                            "geocoded_lat": 14.5535,
                            "geocoded_lng": 120.9876,
                            "priority": null,
                            "service_time": 10,
                            "has_latlng": true
                        }
                    ],
                    "unplanned_jobs": []
                }
            }
