do_number) and a date. Jobs contain address and contact details, one or more items, and a running list of milestones the driver records as the job progresses.
Identifiers
Every job is uniquely identified by the combination of:do_number(string, required) — Your delivery order number.date(date, required) — The job date inYYYY-MM-DDformat.type(string) — EitherDeliveryorCollection. Defaults toDelivery.
id(string, read-only) — Detrack’s internal ID for the job.detrack_number(string, read-only) — A human-readable Detrack tracking number, for exampleDET2000001.
do_number (plus optionally date and type) to look up a job. See Retrieve.
Required fields
Creating a job always requires:do_numberdate
address, or the address lines address_1, address_2, and address_3. Your account settings can make other fields mandatory, such as the contact name (deliver_to_collect_from).
Everything else is optional but strongly recommended: contact name (deliver_to_collect_from), phone_number, notify_email, and items.
Items
A job can carry any number ofitems. Which item fields are required depends on your account’s mandatory item field settings. Items also support quantity, unit_of_measure, batch and purchase order numbers, expiry dates, and driver-captured fields like actual_quantity, follow_up_quantity, and rework_quantity.
Milestones
Detrack records amilestones array on every job as the driver progresses through statuses. Each milestone contains:
status— The status the job entered, for exampleinfo_recv,dispatched,out_for_delivery,completed.assign_to— The driver at the time of the change.reason— A failure reason when the job did not complete.pod_at— When the status change happened.created_at— When the milestone was recorded.user_name— Who recorded it.
Status fields
Job responses include three status fields. They answer different questions:
For example, a delivery job with
status dispatched shows a different tracking_status depending on assignment and date:
- Not yet assigned to a driver: “Info received”
- Assigned, with a job date in the future: “Scheduled”
- Assigned, on or after the job date: “Out for delivery”
Lifecycle
A typical job progresses through:info_recv— Detrack received the job.dispatched— Assigned to a driver.out_for_delivery/head_to_delivery— Driver is en route.completed/completed_partial/failed— Terminal state.
Where to go next
- Create a job or bulk-create up to 100.
- Search jobs by date range, customer, group, status, and more.
- Export PODs for completed jobs.
