Description:

  • Sends dispatch request using trip id

Version:

Ver. Maker Established Date Revision Date
1.0.0 lenny 2021-12-31

Request URL:

Request Method:

  • POST

Request Header:

Parameter Name Whether Must Type Instructions
Content-Type Yes string Request Type: x-www-form-urlencoded

Request Parameter:

Parameter Name Whether Must Type Instructions
tripId Yes string Trip ID
fTokenID Yes string Token

Return Example:

Return when correct:

{
    "Result": 200,
    "Message": "success",
    "FObject": null
}

Return on error:

{
    "Result": 105,
    "Message": "Fail:tripId is null",
    "FObject": null
}

{
    "Result": 105,
    "Message": "Fail:without this trip ID",
    "FObject": null
}

{
    "Result": 105,
    "Message": "Fail:repeat the send dispatch",
    "FObject": null
}

{
    "Result": 105,
    "Message": "Fail:other error",
    "FObject": null
}

{
    "Result": 105,
    "Message": "Fail:token error or timeout",
    "FObject": null
}

{
    "Result": 105,
    "Message": "Fail:no device is bound to this trip ID",
    "FObject": null
}

Return Parameter Description:

Parameter Name Type Instructions

Request Example:

String result = "";
//request url
String url ="http://icloud.assetscontrols.com:8092/api/AscentPH/SendDispatchRequest?tripId=BOC-A-12312021-0002&fTokenID=DB7F20D9-84C3-44C3-B05A-06A9C392A189";
//Create post request object
  HttpPost post = new HttpPost(url);
 CloseableHttpClient client = HttpClients.createDefault();
 //Start the execution request and get the return value
 HttpResponse response = client.execute(post);
 //Get the returned entity object
HttpEntity entity = response.getEntity();
//Convert entity object to string
String result = EntityUtils.toString(entity, "UTF-8");
 return result;
文档更新时间: 2023-02-06 16:05   作者:刘家帅