Skip to main content
Fleetwork
Fleetwork

Contact us

We look forward to hearing from you. Please fill out the form below.

APIAPI ReferenceJob Management

Create Job

Create a new job with tasks in your Fleetwork account.

POST/api/v1/workspace/jobs

Request Body

  • jobNamestringRequired
    Job name
  • jobStatusintegerRequired
    0=New, 1=Scheduled, 2=InProgress
  • jobTypeintegerRequired
    0=Unknown, 1=Shipment, 2=Service
  • jobDescriptionstringOptional
    Job description
  • metaDatastringOptional
    Custom JSON metadata string
  • tasksarrayRequired
    Array of task objects (see Task fields below)

Task Fields

  • taskNamestringRequired
    Task name
  • taskTypeintegerOptional
    0=Unknown, 1=Shipment, 2=Service
  • priorityintegerOptional
    0=Low, 1=Medium, 2=High
  • descriptionstringOptional
    Task description
  • contactNamestringOptional
    Contact person name
  • contactPhonestringOptional
    Contact phone number
  • startDtlongOptional
    Scheduled start time (Unix ms)
  • endDtlongOptional
    Scheduled end time (Unix ms)
  • startTimeintegerOptional
    Time window start (minutes from midnight)
  • endTimeintegerOptional
    Time window end (minutes from midnight)
  • serviceTimeintegerOptional
    Service duration in minutes
  • setupTimeintegerOptional
    Setup duration in minutes
  • placeobjectOptional
    Place object - see Place fields below. Use the Search Places API to retrieve valid refIds.
  • metaDatastringOptional
    Task-level custom JSON metadata
  • skillIdUUIDOptional
    Required skill ID for this task
  • shipmentPropertyobjectConditional
    Required for Shipment jobs - see below

place fields

  • idUUIDOptional
    ID of an existing place (if already in address book)
  • refIdstringRequired
    Your external reference ID for this place (see Search Places)
  • namestringOptional
    Place name
  • addressstringOptional
    Full address
  • latnumberOptional
    Latitude
  • lngnumberOptional
    Longitude
  • contactPersonstringOptional
    Contact person name
  • contactNumstringOptional
    Contact phone number
  • startTimeintegerOptional
    Time window start (minutes from midnight)
  • endTimeintegerOptional
    Time window end (minutes from midnight)

shipmentProperty fields (Shipment job only)

  • shipmentTypeintegerRequired
    1=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
      }
    }
  ]
}