curl --request GET \
--url https://apiweb.mile.app/api/v4/data-types \
--header 'Authorization: Bearer <token>'import requests
url = "https://apiweb.mile.app/api/v4/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/v4/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/v4/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/v4/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/v4/data-types")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiweb.mile.app/api/v4/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": [
{
"_id": "6abcadb6a138a6318d023ec5",
"name": "Outlet",
"organizationId": "65c1f4eeca7c4816d94587b2",
"provider": "internal",
"providerConfig": null,
"limitUser": false,
"commonData": false,
"v4Only": true,
"fields": [
{
"id": "dataId",
"title": "Outlet Code",
"type": "string",
"required": true,
"unique": true,
"show": true
},
{
"id": "outletName",
"title": "Outlet Name",
"type": "string",
"required": true,
"show": true
},
{
"id": "channel",
"title": "Channel",
"type": "string",
"required": false,
"show": true,
"optionData": [
{
"value": "retail",
"label": "Retail"
},
{
"value": "horeca",
"label": "HoReCa"
}
]
},
{
"id": "region",
"title": "Region",
"type": "string",
"required": false,
"show": true,
"relation": {
"kind": "belongsTo",
"targetKind": "dataType",
"target": "6abcadb6a138a6318d023ec9",
"displayField": "regionName"
}
}
],
"uniqueTogether": [],
"migration": null,
"createdBy": "admin@example.com",
"createdTime": "2026-10-01T03:00:00.000000Z",
"updatedTime": "2026-10-01T03:00:00.000000Z"
}
],
"per_page": 20,
"total": 1,
"last_page": 1
}
}{
"status": false,
"message": "Bad request - invalid parameters provided."
}{
"status": false,
"message": "Internal server error, please contact support@mile.app."
}Read data types
Returns the data types of your organization as a page under data_types, newest first. Each carries v4Only and, on /api/v4, migration (the Preparing or unique backfill progress, null when none ran).
v4 differences: v3-compatible and v4-only types are both listed, and Master Data extensions are left out unless withExtensions is set.
v3-compatible and v4-only types. Every data type is one of two kinds, decided by the server: v4Only is returned on every read. A type is v4-only when it was created through /api/v4, uses a v4-only feature (the field types title, boolean, multiOption, relation, a field validation, unique, or uniqueTogether), was upgraded, or extends a Master Data entity (extends). A v4-only type is not shown to the mobile app.
Requires permission view/dataType.
curl --request GET \
--url https://apiweb.mile.app/api/v4/data-types \
--header 'Authorization: Bearer <token>'import requests
url = "https://apiweb.mile.app/api/v4/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/v4/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/v4/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/v4/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/v4/data-types")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiweb.mile.app/api/v4/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": [
{
"_id": "6abcadb6a138a6318d023ec5",
"name": "Outlet",
"organizationId": "65c1f4eeca7c4816d94587b2",
"provider": "internal",
"providerConfig": null,
"limitUser": false,
"commonData": false,
"v4Only": true,
"fields": [
{
"id": "dataId",
"title": "Outlet Code",
"type": "string",
"required": true,
"unique": true,
"show": true
},
{
"id": "outletName",
"title": "Outlet Name",
"type": "string",
"required": true,
"show": true
},
{
"id": "channel",
"title": "Channel",
"type": "string",
"required": false,
"show": true,
"optionData": [
{
"value": "retail",
"label": "Retail"
},
{
"value": "horeca",
"label": "HoReCa"
}
]
},
{
"id": "region",
"title": "Region",
"type": "string",
"required": false,
"show": true,
"relation": {
"kind": "belongsTo",
"targetKind": "dataType",
"target": "6abcadb6a138a6318d023ec9",
"displayField": "regionName"
}
}
],
"uniqueTogether": [],
"migration": null,
"createdBy": "admin@example.com",
"createdTime": "2026-10-01T03:00:00.000000Z",
"updatedTime": "2026-10-01T03:00:00.000000Z"
}
],
"per_page": 20,
"total": 1,
"last_page": 1
}
}{
"status": false,
"message": "Bad request - invalid parameters provided."
}{
"status": false,
"message": "Internal server error, please contact support@mile.app."
}Query Parameters
Response
Success
The response is of type object.