Fleet Connectivity Extension API Developer's Guide

Sending a Job to an Asset

This section provides an example of a POST request with details for a new delivery job.

User Story

A logistics company needs to ship a delivery to the HERE Berlin Campus at WGS 84 geocoordinates 52.53086,13.38469. The dispatcher software client, Dispatcher-1, assigns the delivery to the mobile asset, Asset-1. Asset-1 keeps Dispatcher-1 updated on its progress (see the Requesting Updates from the Assets for instructions on how to do this). The dispatcher wants to know when the asset's delay amounts to more than five percent (5%) of the originally calculated time.

Send Job Request Summary

The following list summarizes the elements required to create a request matching the user story and shows, in square brackets, how the request example below uses these elements. Note that the request example also uses the authentication parameters.

Content-Type: application/json
Resource: sendjob.json
Parameters: [app_id={YOUR_APP_ID}], specifies the authentication app_id
  [app_code={YOUR_APP_CODE}], specifies the authentication app_id

Body:

Job Request Body
Note: HERE recommends that you follow standard REST paradigms where possible and that you use the POST method to send job request messages to the Fleet Connectivity Extension API Web Service. For convenience, when using the Fleet Connectivity Extension API API in a pure JavaScript environment, the resource sendjob supports the request parameter job with the GET method, allowing you to send a job request as a parameter.

Send Job Request (as POST)

The code block below demonstrates the complete POST request, specifying that the response data are to be delivered in JSON.
https://fce.cit.api.here.com/1/sendjob.json
?app_id={YOUR_APP_ID}
&app_code={YOUR_APP_CODE}
POST body:
{
  "version" : "1.0",
  "job_id" : "12345",
  "dispatcher_id" : "Dispatcher-1",
  "type" : "NEW_DESTINATION",
  "asset_id" : "Asset-1",
  "message" :"This is an example job.",
  "content" : {
    "destination" : "52.53086,13.38469",
    "avoidAreas" : "50.145743,8.560077;50.139527,8.571493;",
    "mode" : "fastest,car,traffic:enabled"
   }
}

Send Job Response

The response to the request contains:
  • the ID of the job specified in the request
The example response in JSON format is as follows:
{
  job_id: "12345"
}