Delete data type by ID
curl --request DELETE \
--url https://apiweb.mile.app/api/v3/data-type/{dataTypeId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://apiweb.mile.app/api/v3/data-type/{dataTypeId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://apiweb.mile.app/api/v3/data-type/{dataTypeId}', 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-type/{dataTypeId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
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-type/{dataTypeId}"
req, _ := http.NewRequest("DELETE", 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.delete("https://apiweb.mile.app/api/v3/data-type/{dataTypeId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiweb.mile.app/api/v3/data-type/{dataTypeId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": true,
"data_type": {
"_id": "640a45dd089dc95a0a09ef14",
"name": "OutletDetail",
"fields": [
{
"id": "dataId",
"title": "Data ID",
"type": "string",
"default": "true",
"optionData": [],
"required": 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": "string",
"optionData": [],
"required": true
},
{
"id": "outletCoordinate",
"title": "Outlet Coordinate",
"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
}
],
"createdBy": "john.doe@mile.app",
"organizationId": "63c61d865347e356d05e3052",
"updatedTime": "2023-03-09 20:47:24",
"createdTime": "2023-03-09 20:47:24",
"provider": "internal",
"providerConfig": null
}
}{
"status": false,
"message": "Data not found"
}{
"status": false,
"message": "Internal server error, please contact support@mile.app."
}Data Type
Delete data type by ID
DELETE
/
data-type
/
{dataTypeId}
Delete data type by ID
curl --request DELETE \
--url https://apiweb.mile.app/api/v3/data-type/{dataTypeId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://apiweb.mile.app/api/v3/data-type/{dataTypeId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://apiweb.mile.app/api/v3/data-type/{dataTypeId}', 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-type/{dataTypeId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
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-type/{dataTypeId}"
req, _ := http.NewRequest("DELETE", 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.delete("https://apiweb.mile.app/api/v3/data-type/{dataTypeId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiweb.mile.app/api/v3/data-type/{dataTypeId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": true,
"data_type": {
"_id": "640a45dd089dc95a0a09ef14",
"name": "OutletDetail",
"fields": [
{
"id": "dataId",
"title": "Data ID",
"type": "string",
"default": "true",
"optionData": [],
"required": 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": "string",
"optionData": [],
"required": true
},
{
"id": "outletCoordinate",
"title": "Outlet Coordinate",
"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
}
],
"createdBy": "john.doe@mile.app",
"organizationId": "63c61d865347e356d05e3052",
"updatedTime": "2023-03-09 20:47:24",
"createdTime": "2023-03-09 20:47:24",
"provider": "internal",
"providerConfig": null
}
}{
"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 data type that generated by system.
Example: 640a45dd089dc95a0a09ef14
⌘I