Read data type
curl --request GET \
--url https://apiweb.mile.app/api/v3/data-types \
--header 'Authorization: Bearer <token>'import requests
url = "https://apiweb.mile.app/api/v3/data-types"
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/data-types', 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/data-types",
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/data-types"
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/data-types")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiweb.mile.app/api/v3/data-types")
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_types": {
"current_page": 1,
"data": [
{
"name": "OutletDetail",
"fields": [
{
"id": "dataId",
"title": "Data ID",
"type": "string",
"optionData": [],
"required": true,
"primaryKey": true
},
{
"id": "outletName",
"title": "Outlet Name",
"type": "string",
"optionData": [],
"required": true
},
{
"id": "outletHours",
"title": "Outlet Hours",
"default": 12,
"type": "number",
"optionData": [],
"required": true
},
{
"id": "outletType",
"title": "Outlet Type",
"type": "string",
"optionData": [
"minimarket",
"supermarket",
"vending machine",
"warung"
],
"required": true
},
{
"id": "outletOpen",
"title": "Outlet Open",
"default": "09:00",
"type": "string",
"optionData": [],
"required": true
},
{
"id": "outletClosed",
"title": "Outlet Closed",
"default": "17:00",
"type": "string",
"optionData": [],
"required": true
},
{
"id": "outletContractExpired",
"title": "Outlet Contract Expired",
"type": "string",
"optionData": [],
"required": true
},
{
"id": "outletOpenInWeekend",
"title": "Outlet Open In Weekend",
"type": "boolean",
"optionData": [],
"required": true
},
{
"id": "outletGeolocation",
"title": "Outlet Geolocation",
"description": "Contoh inputan \"-6.171702325136309,106.81775093078615\"",
"type": "string",
"optionData": [],
"required": true
},
{
"id": "outletPhoneNumber",
"title": "Outlet Phone Number",
"description": "Example format \"+628 456 7890 or +62 123 456 789 or 0123456789\"",
"type": "string",
"optionData": [],
"required": true
},
{
"id": "outletCloseOrder",
"title": "Outlet Close Order",
"description": "Example format \"2024-11-01 15:30:45 or 2024-11-01T15:30:45.123+02:00 or 2024-11-01T15:30:45+02:00\"",
"type": "string",
"format": "date-time",
"optionData": [],
"required": true
}
]
}
],
"first_page_url": "https://apiweb.mile.app/v3/data-types?page=1",
"from": 1,
"last_page": 1,
"last_page_url": "https://apiweb.mile.app/v3/data-types?page=1",
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "https://apiweb.mile.app/v3/data-types?page=1",
"label": "1",
"active": true
},
{
"url": null,
"label": "Next »",
"active": false
}
],
"next_page_url": null,
"path": "https://apiweb.mile.app/v3/data-types",
"per_page": 20,
"prev_page_url": null,
"to": 15,
"total": 15
}
}{
"status": false,
"message": "Bad request - invalid parameters provided."
}{
"status": false,
"message": "Internal server error, please contact support@mile.app."
}Data Type
Read data type
GET
/
data-types
Read data type
curl --request GET \
--url https://apiweb.mile.app/api/v3/data-types \
--header 'Authorization: Bearer <token>'import requests
url = "https://apiweb.mile.app/api/v3/data-types"
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/data-types', 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/data-types",
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/data-types"
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/data-types")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiweb.mile.app/api/v3/data-types")
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_types": {
"current_page": 1,
"data": [
{
"name": "OutletDetail",
"fields": [
{
"id": "dataId",
"title": "Data ID",
"type": "string",
"optionData": [],
"required": true,
"primaryKey": true
},
{
"id": "outletName",
"title": "Outlet Name",
"type": "string",
"optionData": [],
"required": true
},
{
"id": "outletHours",
"title": "Outlet Hours",
"default": 12,
"type": "number",
"optionData": [],
"required": true
},
{
"id": "outletType",
"title": "Outlet Type",
"type": "string",
"optionData": [
"minimarket",
"supermarket",
"vending machine",
"warung"
],
"required": true
},
{
"id": "outletOpen",
"title": "Outlet Open",
"default": "09:00",
"type": "string",
"optionData": [],
"required": true
},
{
"id": "outletClosed",
"title": "Outlet Closed",
"default": "17:00",
"type": "string",
"optionData": [],
"required": true
},
{
"id": "outletContractExpired",
"title": "Outlet Contract Expired",
"type": "string",
"optionData": [],
"required": true
},
{
"id": "outletOpenInWeekend",
"title": "Outlet Open In Weekend",
"type": "boolean",
"optionData": [],
"required": true
},
{
"id": "outletGeolocation",
"title": "Outlet Geolocation",
"description": "Contoh inputan \"-6.171702325136309,106.81775093078615\"",
"type": "string",
"optionData": [],
"required": true
},
{
"id": "outletPhoneNumber",
"title": "Outlet Phone Number",
"description": "Example format \"+628 456 7890 or +62 123 456 789 or 0123456789\"",
"type": "string",
"optionData": [],
"required": true
},
{
"id": "outletCloseOrder",
"title": "Outlet Close Order",
"description": "Example format \"2024-11-01 15:30:45 or 2024-11-01T15:30:45.123+02:00 or 2024-11-01T15:30:45+02:00\"",
"type": "string",
"format": "date-time",
"optionData": [],
"required": true
}
]
}
],
"first_page_url": "https://apiweb.mile.app/v3/data-types?page=1",
"from": 1,
"last_page": 1,
"last_page_url": "https://apiweb.mile.app/v3/data-types?page=1",
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "https://apiweb.mile.app/v3/data-types?page=1",
"label": "1",
"active": true
},
{
"url": null,
"label": "Next »",
"active": false
}
],
"next_page_url": null,
"path": "https://apiweb.mile.app/v3/data-types",
"per_page": 20,
"prev_page_url": null,
"to": 15,
"total": 15
}
}{
"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.
Query Parameters
The page number of results to retrieve. Example: 2
Specifies the maximum number of items to retrieve in a single request. Example: 10
Required range:
1 <= x <= 1000Fields is for selecting the specific fields that you can choose by multiples to show in the response using a string with a comma delimiter.
Example: name,fields,organizationId
Filter by provider type. Comma-separated values for multiple providers.
Example: internal,external-api
Default: internal (temporary for backward compatibility)
Available values: internal, external-api
⌘I