Read flow by ID
curl --request GET \
--url https://apiweb.mile.app/api/v3/flow/{flowId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://apiweb.mile.app/api/v3/flow/{flowId}"
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/{flowId}', 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/{flowId}",
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/{flowId}"
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/{flowId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiweb.mile.app/api/v3/flow/{flowId}")
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",
"flow": {
"_id": "6352736c628401059b37a1d1",
"name": "Delivery",
"pages": [
{
"id": "page0",
"enabled": true,
"components": [
{
"component": "input",
"id": "title",
"inputType": "string",
"default": null,
"title": "Title",
"isRequired": true,
"visible": true,
"showAs": "title"
},
{
"component": "input",
"id": "content",
"inputType": "string",
"default": null,
"title": "Content",
"isRequired": true,
"visible": true,
"showAs": "content"
},
{
"component": "input",
"id": "receiverName",
"inputType": "string",
"default": "Admin Hub",
"title": "ReceiverName",
"isRequired": false,
"visible": true
},
{
"component": "input",
"id": "qty",
"inputType": "number",
"default": "1",
"title": "Quantity",
"isRequired": false,
"visible": true
},
{
"component": "input",
"id": "deliveryTime",
"inputType": "string",
"default": null,
"title": "Delivery Time",
"isRequired": false,
"visible": true
},
{
"component": "select",
"id": "label",
"default": null,
"options": [
"CGR",
"HDR",
"HJK",
"NYT"
],
"min": 0,
"max": 2,
"title": "Label",
"visible": true
},
{
"component": "select",
"id": "deliveryStatus",
"options": [
"success",
"failed"
],
"default": "success",
"title": "Delivery Status",
"min": 0,
"max": 1,
"visible": true
}
]
},
{
"id": "page1",
"components": [
{
"component": "input",
"id": "receiver",
"inputType": "string",
"default": null,
"title": "Receiver",
"isRequired": false,
"visible": true
},
{
"component": "input",
"id": "codAmount",
"inputType": "number",
"default": "1",
"title": "codAmount",
"isRequired": false,
"visible": true
},
{
"component": "select",
"id": "statusDelivery",
"default": null,
"options": [
"Success",
"Failed"
],
"min": 0,
"max": 1,
"title": "Status Delivery",
"visible": true
}
]
}
],
"configurations": [
{
"id": "startTime",
"adjustment": 0
},
{
"id": "endTime",
"adjustment": 24
}
],
"isDefault": true,
"version": 2,
"orderIndex": 1,
"createdBy": "jhon@example.com",
"updatedBy": "jhon@example.com",
"createdTime": "2021-12-14T04:30:45.538000Z",
"updatedTime": "2021-12-14T05:10:01.801000Z"
}
}{
"status": false,
"message": "Data not found"
}{
"status": false,
"message": "Internal server error, please contact support@mile.app."
}Flow
Read flow by ID
GET
/
flow
/
{flowId}
Read flow by ID
curl --request GET \
--url https://apiweb.mile.app/api/v3/flow/{flowId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://apiweb.mile.app/api/v3/flow/{flowId}"
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/{flowId}', 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/{flowId}",
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/{flowId}"
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/{flowId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiweb.mile.app/api/v3/flow/{flowId}")
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",
"flow": {
"_id": "6352736c628401059b37a1d1",
"name": "Delivery",
"pages": [
{
"id": "page0",
"enabled": true,
"components": [
{
"component": "input",
"id": "title",
"inputType": "string",
"default": null,
"title": "Title",
"isRequired": true,
"visible": true,
"showAs": "title"
},
{
"component": "input",
"id": "content",
"inputType": "string",
"default": null,
"title": "Content",
"isRequired": true,
"visible": true,
"showAs": "content"
},
{
"component": "input",
"id": "receiverName",
"inputType": "string",
"default": "Admin Hub",
"title": "ReceiverName",
"isRequired": false,
"visible": true
},
{
"component": "input",
"id": "qty",
"inputType": "number",
"default": "1",
"title": "Quantity",
"isRequired": false,
"visible": true
},
{
"component": "input",
"id": "deliveryTime",
"inputType": "string",
"default": null,
"title": "Delivery Time",
"isRequired": false,
"visible": true
},
{
"component": "select",
"id": "label",
"default": null,
"options": [
"CGR",
"HDR",
"HJK",
"NYT"
],
"min": 0,
"max": 2,
"title": "Label",
"visible": true
},
{
"component": "select",
"id": "deliveryStatus",
"options": [
"success",
"failed"
],
"default": "success",
"title": "Delivery Status",
"min": 0,
"max": 1,
"visible": true
}
]
},
{
"id": "page1",
"components": [
{
"component": "input",
"id": "receiver",
"inputType": "string",
"default": null,
"title": "Receiver",
"isRequired": false,
"visible": true
},
{
"component": "input",
"id": "codAmount",
"inputType": "number",
"default": "1",
"title": "codAmount",
"isRequired": false,
"visible": true
},
{
"component": "select",
"id": "statusDelivery",
"default": null,
"options": [
"Success",
"Failed"
],
"min": 0,
"max": 1,
"title": "Status Delivery",
"visible": true
}
]
}
],
"configurations": [
{
"id": "startTime",
"adjustment": 0
},
{
"id": "endTime",
"adjustment": 24
}
],
"isDefault": true,
"version": 2,
"orderIndex": 1,
"createdBy": "jhon@example.com",
"updatedBy": "jhon@example.com",
"createdTime": "2021-12-14T04:30:45.538000Z",
"updatedTime": "2021-12-14T05:10:01.801000Z"
}
}{
"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
Unique identifier for the flow that generated by system.
Example: 6352736c628401059b37a1d1
⌘I