Fleet - API
- Lara Cledera
- Zandric Cabalagan
- Jerome Canolang (Unlicensed)
Endpoint URL
Staging | |
---|---|
Production | Endpoint will be provided after System Integration Testing (SIT) |
Login and Get Session Token
Description: | To get the session token |
---|
Description: | To get the session token |
---|---|
Endpoint: | /login |
Method: | POST |
Request Headers
Content-Type: | application/json |
---|
Content-Type: | application/json |
---|
Request Body
Field | Data Type | Required | Description |
---|
Field | Data Type | Required | Description |
---|---|---|---|
string | Yes | Fleet email credential | |
password | string | Yes | Fleet password |
Sample Request Body
{
"email": "dev.fleet@gmail.com",
"password": "P@ssw0rd"
}
Sample Response
{
"success": true,
"results": {
"apiKey": "fb77c9653bf5e736d191b46bbfed7c2bd",
"clientId": "SANDBOX_DEV",
"sessionToken": "b45e2fb77c9653bf5e736d19e1fd18ebbffd0f6d3dd25af118e5eb38851bf4d"
}
}
Response for Invalid Credential
{
"success": false,
"results": "Invalid login credential."
}
Field | Description |
---|
Field | Description |
---|---|
apiKey | Generated hash on client-side to be used on succeeding API request |
clientId | Reference Client ID |
sessionToken | Generated hash on every API login to be used on succeeding API requests. |
Error Responses
Status | Message |
| |
|
|
Get List of Areas
Description: | To get the list of areas |
---|
Description: | To get the list of areas |
---|---|
Endpoint: | /getListOfAreas |
Method: | GET |
Request Headers
Auth-Token: | <Auth Token acquired from LOGIN API> |
---|
Auth-Token: | <Auth Token acquired from LOGIN API> |
---|
URL Query Parameters
apiKey: | <API key acquired from LOGIN API> |
---|
apiKey: | <API key acquired from LOGIN API> |
---|
Sample Response
Field | Description |
---|
Field | Description |
---|---|
| Generated hash id for your the area |
| area code |
| human readable name of the area |
| array of store ids within this area |
Error Responses
Status | Message |
| |
|
|
Get List of Stores
Description: | To get the list of stores |
---|
Description: | To get the list of stores |
---|---|
Endpoint: | /getListOfStores |
Method: | GET |
Request Headers
Auth-Token: | <Auth Token acquired from LOGIN API> |
---|
Auth-Token: | <Auth Token acquired from LOGIN API> |
---|
URL Query Parameters
apiKey: | <API key acquired from LOGIN API> |
---|
apiKey: | <API key acquired from LOGIN API> |
---|---|
areaCode: | <Area Code acquired from GET Area API> |
Sample Response
Sample Response
Field | Description |
---|
Field | Description |
---|---|
| Generated hash id for your the for the store |
| Address of the store/hub |
| boolean, whether or not the hub allow riders to start advance jobs |
| boolean, whether or not the hub is the default hub in the area |
| latitude coordinate of the hub |
| longitude coordinate of the hub |
| name of the hub |
| province where the hub is located |
Get List of Jobs
Description: | To get jobs with the following statuses based on the store. |
---|
Description: | To get jobs with the following statuses based on the store. |
---|---|
Endpoint: | /getJobList |
Method: | GET |
Request Headers
Auth-Token: | <Auth Token acquired from LOGIN API> |
---|
Auth-Token: | <Auth Token acquired from LOGIN API> |
---|
URL Query Parameters
apiKey: | <API key acquired from LOGIN API> |
---|
apiKey: | <API key acquired from LOGIN API> |
---|---|
storeId: | <Store id acquired from STORE API where to get the list of jobs> |
status: | <PENDING, DONE, or CANCELLED> |
page: | <Page number> |
startDate: | <Start Date> |
endDate: | <End Date> |
onlyOverDue: | <True or False> |
Sample Response
Job Data
Field | Description |
---|
Field | Description |
---|---|
| Generated hash |
| Destination address |
| unique key for the rider assigned This is empty or undefined if job has no assigned rider. |
| name of the assigned rider. This is empty or undefined if job has no assigned rider. |
| city of the destination address |
| contact number of receiver |
| Unix timestamp of the creation date |
| Name of the receiver |
| email of the receiver |
| Unix timestamp for the expected delivery date |
| Declared item price |
| landmark |
| string representation of the tags of this job including the labels and id of the tag |
| additional details of the job |
| reference number |
| additional contact number of the receiver- usually a landline number |
| province |
| Job remarks |
| status of the job |
| hash id of the store this job belongs to |
| Name of the store this job belongs to |
| array of tag ids → get details of the tag via getListOfTags endpoint |
| exact date and time the job is accepted by a driver ( |
| exact date and time the job is assigned to a driver ( |
| exact date and time the driver arrived to the location ( |
| exact date and time the driver started the job ( |
| duraction from |
| duration from |
| duration from |
| duration from |
| duration from |
Get List of Available Riders
Description: | To get list of all available riders |
---|
Description: | To get list of all available riders |
---|---|
Endpoint: | /getAvailableRiders |
Method: | GET |
Request Headers
Auth-Token: | <Auth Token acquired from LOGIN API> |
---|
Auth-Token: | <Auth Token acquired from LOGIN API> |
---|
URL Query Parameters
apiKey: | <API key acquired from LOGIN API> |
---|
apiKey: | <API key acquired from LOGIN API> |
---|---|
storeId: (optional) | For single store: ["storeId"] |
inHub: (optional) | <true or false> |
assignedThreshold: (optional) | <Number: Minimum 0> |
Sample Response
Driver Data
Field | Description |
---|
Field | Description |
---|---|
| array of area ids this driver belongs to |
| Whether or not the driver is disabled |
| driver’s email |
| driver’s first name |
| driver’s last name |
| boolean, whether or not the driver is near the hub’s vicinity |
| unix timestamp of driver’s last recorded action |
| driver’s latitude location |
| driver’s longitude location |
| driver’s mobile number |
| ONLINE or OFFLINE |
| collection/array of store ids this driver belongs to |