APIAPI ReferenceJob Management
Create Job
Create a new job with tasks in your Fleetwork account.
POST
/api/v1/workspace/jobsRequest Body
jobNamestringRequiredJob namejobStatusintegerRequired0=New,1=Scheduled,2=InProgressjobTypeintegerRequired0=Unknown,1=Shipment,2=ServicejobDescriptionstringOptionalJob descriptionmetaDatastringOptionalCustom JSON metadata stringtasksarrayRequiredArray of task objects (see Task fields below)
Task Fields
taskNamestringRequiredTask nametaskTypeintegerOptional0=Unknown,1=Shipment,2=ServicepriorityintegerOptional0=Low,1=Medium,2=HighdescriptionstringOptionalTask descriptioncontactNamestringOptionalContact person namecontactPhonestringOptionalContact phone numberstartDtlongOptionalScheduled start time (Unix ms)endDtlongOptionalScheduled end time (Unix ms)startTimeintegerOptionalTime window start (minutes from midnight)endTimeintegerOptionalTime window end (minutes from midnight)serviceTimeintegerOptionalService duration in minutessetupTimeintegerOptionalSetup duration in minutesplaceobjectOptionalPlace object - see Place fields below. Use the Search Places API to retrieve valid refIds.metaDatastringOptionalTask-level custom JSON metadataskillIdUUIDOptionalRequired skill ID for this taskshipmentPropertyobjectConditionalRequired for Shipment jobs - see below
place fields
idUUIDOptionalID of an existing place (if already in address book)refIdstringRequiredYour external reference ID for this place (see Search Places)namestringOptionalPlace nameaddressstringOptionalFull addresslatnumberOptionalLatitudelngnumberOptionalLongitudecontactPersonstringOptionalContact person namecontactNumstringOptionalContact phone numberstartTimeintegerOptionalTime window start (minutes from midnight)endTimeintegerOptionalTime window end (minutes from midnight)
shipmentProperty fields (Shipment job only)
shipmentTypeintegerRequired1=Pick,2=Drop
JSON
{
"jobName": "Delivery Job Q1",
"jobDescription": "Morning delivery run",
"jobStatus": 1,
"jobType": 1,
"tasks": [
{
"taskName": "Pick up goods",
"taskType": 1,
"priority": 1,
"contactName": "Mr. Tuan",
"contactPhone": "+84901234567",
"shipmentProperty": { "shipmentType": 1 },
"place": {
"refId": "WH-001",
"name": "Main Warehouse",
"address": "100 Warehouse St, D7",
"lat": 10.74,
"lng": 106.72
}
},
{
"taskName": "Deliver to Customer A",
"taskType": 1,
"priority": 1,
"contactName": "Ms. Lan",
"contactPhone": "+84907654321",
"shipmentProperty": { "shipmentType": 2 },
"place": {
"refId": "CUST-A-001",
"name": "Customer A Location",
"address": "123 Le Loi, D1",
"lat": 10.7731,
"lng": 106.703
}
}
]
}