Generate example
curl --request GET \
--url https://apiweb.mile.app/api/v3/flow/{flowName}/task \
--header 'Authorization: Bearer <token>'import requests
url = "https://apiweb.mile.app/api/v3/flow/{flowName}/task"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://apiweb.mile.app/api/v3/flow/{flowName}/task', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://apiweb.mile.app/api/v3/flow/{flowName}/task",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://apiweb.mile.app/api/v3/flow/{flowName}/task"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://apiweb.mile.app/api/v3/flow/{flowName}/task")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiweb.mile.app/api/v3/flow/{flowName}/task")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": true,
"message": "Success.",
"data": {
"flowName": "Pickup",
"flowFields": [
{
"field": "hubId",
"type": "string",
"required": true,
"description": "The identifier for the hub that generated by system.\r\nUse GET /hubs API to get the list of Hub IDs.",
"example": "63e0842e1d09947148301a92",
"format": null
},
{
"field": "flow",
"type": "string",
"required": true,
"description": "The unique name of organization's flow.\r\nUse Flow /flows API to get the list of flow names.",
"example": "Pickup",
"format": null
},
{
"field": "startTime",
"type": "string",
"format": null,
"required": true,
"description": "Start datetime of task to active.",
"example": "2023-05-15T04:26:00.000+00:00"
},
{
"field": "endTime",
"type": "string",
"format": null,
"required": true,
"description": "End datetime of task to active.",
"example": "2023-05-16T04:26:00.000+00:00"
},
{
"field": "requesterName",
"type": "string",
"required": false,
"description": "This field's type & value is according to Flow's setting.",
"example": "Loid Forger",
"format": null
},
{
"field": "requesterPhone",
"type": "string",
"required": false,
"description": "This field's type & value is according to Flow's setting.",
"example": "081163137712",
"format": null
},
{
"field": "address",
"type": "string",
"required": false,
"description": "This field's type & value is according to Flow's setting.",
"example": "92553 Walsh Crest Apt. 213\nFerrymouth, OR 81988-7765",
"format": null
},
{
"field": "pickupPoint",
"type": "string",
"required": false,
"description": "This field's type & value is according to Flow's setting.",
"example": "68.978483,-67.186351",
"format": null
},
{
"field": "packageType",
"type": "string",
"required": false,
"description": "This field's type & value is according to Flow's setting.",
"example": "Document",
"format": [
"Food",
"Clothes",
"Document",
"Medicine",
"Books",
"Others"
]
}
],
"bodyRequest": {
"hubId": "63e0842e1d09947148301a92",
"flow": "Pickup",
"startTime": "2023-05-15T04:26:00.000+00:00",
"endTime": "2023-05-16T04:26:00.000+00:00",
"requesterName": "Loid Forger",
"requesterPhone": "081163137712",
"address": "92553 Walsh Crest Apt. 213\nFerrymouth, OR 81988-7765",
"pickupPoint": "68.978483,-67.186351",
"packageType": "Document"
}
}
}{
"status": false,
"message": "Data not found"
}{
"status": false,
"message": "Internal server error, please contact support@mile.app."
}Flow
Generate example
GET
/
flow
/
{flowName}
/
task
Generate example
curl --request GET \
--url https://apiweb.mile.app/api/v3/flow/{flowName}/task \
--header 'Authorization: Bearer <token>'import requests
url = "https://apiweb.mile.app/api/v3/flow/{flowName}/task"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://apiweb.mile.app/api/v3/flow/{flowName}/task', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://apiweb.mile.app/api/v3/flow/{flowName}/task",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://apiweb.mile.app/api/v3/flow/{flowName}/task"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://apiweb.mile.app/api/v3/flow/{flowName}/task")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiweb.mile.app/api/v3/flow/{flowName}/task")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": true,
"message": "Success.",
"data": {
"flowName": "Pickup",
"flowFields": [
{
"field": "hubId",
"type": "string",
"required": true,
"description": "The identifier for the hub that generated by system.\r\nUse GET /hubs API to get the list of Hub IDs.",
"example": "63e0842e1d09947148301a92",
"format": null
},
{
"field": "flow",
"type": "string",
"required": true,
"description": "The unique name of organization's flow.\r\nUse Flow /flows API to get the list of flow names.",
"example": "Pickup",
"format": null
},
{
"field": "startTime",
"type": "string",
"format": null,
"required": true,
"description": "Start datetime of task to active.",
"example": "2023-05-15T04:26:00.000+00:00"
},
{
"field": "endTime",
"type": "string",
"format": null,
"required": true,
"description": "End datetime of task to active.",
"example": "2023-05-16T04:26:00.000+00:00"
},
{
"field": "requesterName",
"type": "string",
"required": false,
"description": "This field's type & value is according to Flow's setting.",
"example": "Loid Forger",
"format": null
},
{
"field": "requesterPhone",
"type": "string",
"required": false,
"description": "This field's type & value is according to Flow's setting.",
"example": "081163137712",
"format": null
},
{
"field": "address",
"type": "string",
"required": false,
"description": "This field's type & value is according to Flow's setting.",
"example": "92553 Walsh Crest Apt. 213\nFerrymouth, OR 81988-7765",
"format": null
},
{
"field": "pickupPoint",
"type": "string",
"required": false,
"description": "This field's type & value is according to Flow's setting.",
"example": "68.978483,-67.186351",
"format": null
},
{
"field": "packageType",
"type": "string",
"required": false,
"description": "This field's type & value is according to Flow's setting.",
"example": "Document",
"format": [
"Food",
"Clothes",
"Document",
"Medicine",
"Books",
"Others"
]
}
],
"bodyRequest": {
"hubId": "63e0842e1d09947148301a92",
"flow": "Pickup",
"startTime": "2023-05-15T04:26:00.000+00:00",
"endTime": "2023-05-16T04:26:00.000+00:00",
"requesterName": "Loid Forger",
"requesterPhone": "081163137712",
"address": "92553 Walsh Crest Apt. 213\nFerrymouth, OR 81988-7765",
"pickupPoint": "68.978483,-67.186351",
"packageType": "Document"
}
}
}{
"status": false,
"message": "Data not found"
}{
"status": false,
"message": "Internal server error, please contact support@mile.app."
}Authorizations
Use a valid Bearer token to authenticate.
Path Parameters
The unique name of organization's flow.
Use Flow /flows API to get the list of flow names.
Example: Pickup