Read flow versions
curl --request POST \
--url https://apiweb.mile.app/api/v3/flows/check-version \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"flows": [
{
"name": "Delivery",
"version": 1
},
{
"name": "Pickup",
"id": "646194ac5f0bb66cbe421e15",
"version": 3
}
],
"allFlow": false
}
'import requests
url = "https://apiweb.mile.app/api/v3/flows/check-version"
payload = {
"flows": [
{
"name": "Delivery",
"version": 1
},
{
"name": "Pickup",
"id": "646194ac5f0bb66cbe421e15",
"version": 3
}
],
"allFlow": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
flows: [
{name: 'Delivery', version: 1},
{name: 'Pickup', id: '646194ac5f0bb66cbe421e15', version: 3}
],
allFlow: false
})
};
fetch('https://apiweb.mile.app/api/v3/flows/check-version', 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/flows/check-version",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'flows' => [
[
'name' => 'Delivery',
'version' => 1
],
[
'name' => 'Pickup',
'id' => '646194ac5f0bb66cbe421e15',
'version' => 3
]
],
'allFlow' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://apiweb.mile.app/api/v3/flows/check-version"
payload := strings.NewReader("{\n \"flows\": [\n {\n \"name\": \"Delivery\",\n \"version\": 1\n },\n {\n \"name\": \"Pickup\",\n \"id\": \"646194ac5f0bb66cbe421e15\",\n \"version\": 3\n }\n ],\n \"allFlow\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://apiweb.mile.app/api/v3/flows/check-version")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"flows\": [\n {\n \"name\": \"Delivery\",\n \"version\": 1\n },\n {\n \"name\": \"Pickup\",\n \"id\": \"646194ac5f0bb66cbe421e15\",\n \"version\": 3\n }\n ],\n \"allFlow\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiweb.mile.app/api/v3/flows/check-version")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"flows\": [\n {\n \"name\": \"Delivery\",\n \"version\": 1\n },\n {\n \"name\": \"Pickup\",\n \"id\": \"646194ac5f0bb66cbe421e15\",\n \"version\": 3\n }\n ],\n \"allFlow\": false\n}"
response = http.request(request)
puts response.read_body{
"status": true,
"message": "Success",
"flow": [
{
"_id": "628dd180dd11f3369825bcff",
"name": "Delivery",
"pages": [
{
"id": "page0",
"enabled": true,
"components": []
},
{
"id": "page1",
"components": []
}
],
"organizationId": "628dd142dd11f3369825bcf5",
"version": 1,
"updatedTime": "2022-05-25T06:49:36.308000Z",
"createdTime": "2022-05-25T06:49:36.308000Z"
},
{
"_id": "628dd1e5b4f9523e0d3a0305",
"name": "tryBillComponent",
"pages": [
{
"id": "page0",
"components": [
{
"component": "bill",
"id": "bill1",
"title": "BilBilan",
"addNew": false,
"valueRef": null,
"editable": [],
"cost": [
"makan",
"minum",
"tidur"
]
},
{
"component": "input",
"id": "input1",
"title": "namaAktivitas",
"inputType": "string",
"default": null,
"routeAs": null,
"showAs": null,
"isRequired": false
},
{
"component": "input",
"id": "input2",
"title": "Input 2",
"inputType": "string",
"default": "11,22",
"routeAs": null,
"showAs": null,
"isRequired": false,
"useGeoLock": true,
"radius": 1,
"geoLockTrigger": "onTaskStart"
}
]
}
],
"organizationId": "628dd142dd11f3369825bcf5",
"version": 8,
"updatedTime": "2022-05-30T12:03:23.374000Z",
"createdTime": "2022-05-25T06:51:17.322000Z"
},
{
"_id": "6294a50a9b894f0d87037113",
"name": "tryGeoLockComponent",
"pages": [
{
"id": "page0",
"components": []
}
],
"organizationId": "628dd142dd11f3369825bcf5",
"version": 3,
"updatedTime": "2022-05-30T12:02:20.293000Z",
"createdTime": "2022-05-30T11:05:46.644000Z"
}
]
}{
"status": false,
"message": "Bad request - invalid parameters provided."
}{
"status": false,
"message": "Internal server error, please contact support@mile.app."
}Flow
Read flow versions
POST
/
flows
/
check-version
Read flow versions
curl --request POST \
--url https://apiweb.mile.app/api/v3/flows/check-version \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"flows": [
{
"name": "Delivery",
"version": 1
},
{
"name": "Pickup",
"id": "646194ac5f0bb66cbe421e15",
"version": 3
}
],
"allFlow": false
}
'import requests
url = "https://apiweb.mile.app/api/v3/flows/check-version"
payload = {
"flows": [
{
"name": "Delivery",
"version": 1
},
{
"name": "Pickup",
"id": "646194ac5f0bb66cbe421e15",
"version": 3
}
],
"allFlow": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
flows: [
{name: 'Delivery', version: 1},
{name: 'Pickup', id: '646194ac5f0bb66cbe421e15', version: 3}
],
allFlow: false
})
};
fetch('https://apiweb.mile.app/api/v3/flows/check-version', 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/flows/check-version",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'flows' => [
[
'name' => 'Delivery',
'version' => 1
],
[
'name' => 'Pickup',
'id' => '646194ac5f0bb66cbe421e15',
'version' => 3
]
],
'allFlow' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://apiweb.mile.app/api/v3/flows/check-version"
payload := strings.NewReader("{\n \"flows\": [\n {\n \"name\": \"Delivery\",\n \"version\": 1\n },\n {\n \"name\": \"Pickup\",\n \"id\": \"646194ac5f0bb66cbe421e15\",\n \"version\": 3\n }\n ],\n \"allFlow\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://apiweb.mile.app/api/v3/flows/check-version")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"flows\": [\n {\n \"name\": \"Delivery\",\n \"version\": 1\n },\n {\n \"name\": \"Pickup\",\n \"id\": \"646194ac5f0bb66cbe421e15\",\n \"version\": 3\n }\n ],\n \"allFlow\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiweb.mile.app/api/v3/flows/check-version")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"flows\": [\n {\n \"name\": \"Delivery\",\n \"version\": 1\n },\n {\n \"name\": \"Pickup\",\n \"id\": \"646194ac5f0bb66cbe421e15\",\n \"version\": 3\n }\n ],\n \"allFlow\": false\n}"
response = http.request(request)
puts response.read_body{
"status": true,
"message": "Success",
"flow": [
{
"_id": "628dd180dd11f3369825bcff",
"name": "Delivery",
"pages": [
{
"id": "page0",
"enabled": true,
"components": []
},
{
"id": "page1",
"components": []
}
],
"organizationId": "628dd142dd11f3369825bcf5",
"version": 1,
"updatedTime": "2022-05-25T06:49:36.308000Z",
"createdTime": "2022-05-25T06:49:36.308000Z"
},
{
"_id": "628dd1e5b4f9523e0d3a0305",
"name": "tryBillComponent",
"pages": [
{
"id": "page0",
"components": [
{
"component": "bill",
"id": "bill1",
"title": "BilBilan",
"addNew": false,
"valueRef": null,
"editable": [],
"cost": [
"makan",
"minum",
"tidur"
]
},
{
"component": "input",
"id": "input1",
"title": "namaAktivitas",
"inputType": "string",
"default": null,
"routeAs": null,
"showAs": null,
"isRequired": false
},
{
"component": "input",
"id": "input2",
"title": "Input 2",
"inputType": "string",
"default": "11,22",
"routeAs": null,
"showAs": null,
"isRequired": false,
"useGeoLock": true,
"radius": 1,
"geoLockTrigger": "onTaskStart"
}
]
}
],
"organizationId": "628dd142dd11f3369825bcf5",
"version": 8,
"updatedTime": "2022-05-30T12:03:23.374000Z",
"createdTime": "2022-05-25T06:51:17.322000Z"
},
{
"_id": "6294a50a9b894f0d87037113",
"name": "tryGeoLockComponent",
"pages": [
{
"id": "page0",
"components": []
}
],
"organizationId": "628dd142dd11f3369825bcf5",
"version": 3,
"updatedTime": "2022-05-30T12:02:20.293000Z",
"createdTime": "2022-05-30T11:05:46.644000Z"
}
]
}{
"status": false,
"message": "Bad request - invalid parameters provided."
}{
"status": false,
"message": "Internal server error, please contact support@mile.app."
}Authorizations
Use a valid Bearer token to authenticate.
Body
application/json
List of flows to check version. Each item must have either id or name.
Show child attributes
Show child attributes
Controls whether the API returns all organization flows or only the requested ones.
true(default): Returns all flows.false: Returns only flows matching the requestedidorname. Example:false
⌘I