Skip to main content
GET
/
data-types
Read data type
curl --request GET \
  --url https://apiweb.mile.app/api/v3/data-types \
  --header 'Authorization: Bearer <token>'
{
  "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": "&laquo; Previous",
        "active": false
      },
      {
        "url": "https://apiweb.mile.app/v3/data-types?page=1",
        "label": "1",
        "active": true
      },
      {
        "url": null,
        "label": "Next &raquo;",
        "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
  }
}

Authorizations

Authorization
string
header
required

Use a valid Bearer token to authenticate.

Query Parameters

page
integer
default:1

The page number of results to retrieve. Example: 2

limit
integer
default:20

Specifies the maximum number of items to retrieve in a single request. Example: 10

Required range: 1 <= x <= 1000
fields
string

Fields 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

provider
string

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

Response

Success

status
boolean

Status of response.

message
string

Message of API response.

data_types
object

List of object data type.