> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mileapp.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Read data type



## OpenAPI

````yaml /openapi/public/openapi-data.json get /data-types
openapi: 3.0.0
info:
  title: MileApp API - Data
  version: 3.0.0
  description: MileApp API Documentation - RESTful API for field operations management.
servers:
  - url: https://apiweb.mile.app/api/v3
security:
  - bearerAuth: []
tags:
  - name: Data Source
    description: >-
      The Data source could help you simplify the process of filling in task
      information based on existing data at MileApp. This data could consist of
      information such as name, number, date, coordinate, and multiple options.
      The Data typically represents entities such as customers, products,
      employees, suppliers, or any other critical data elements that are used
      across the application.


      **To see the details of data source object, please follow [this
      link](#tag/data_source_model)**
  - name: Data Type
    description: >-
      The Data type is the structure of data fields that is customizable to suit
      your business needs. Data type attributes consist of IDs, name, field
      details, type, and primary key. This data type structure will be used at
      Data Source and Flow.


      **To see the details of data type object, please follow [this
      link](#tag/data_type_model)**
paths:
  /data-types:
    get:
      tags:
        - Data Type
      summary: Read data type
      operationId: getDataType
      parameters:
        - $ref: '#/components/parameters/pageInQuery'
        - $ref: '#/components/parameters/limitInQuery'
        - name: fields
          in: query
          required: false
          description: >-
            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`
          schema:
            type: string
        - name: provider
          in: query
          required: false
          description: >-
            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`
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                title: NetworkReadResponse
                properties:
                  status:
                    type: boolean
                    description: Status of response.
                  message:
                    description: Message of API response.
                    type: string
                  data_types:
                    description: List of object data type.
                    type: object
                    additionalProperties: true
                example:
                  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
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: boolean
                    description: Shows if the request was successful.
                  message:
                    type: string
                    description: A short message explaining what went wrong.
                example:
                  status: false
                  message: Bad request - invalid parameters provided.
        '500':
          description: Server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: boolean
                    description: Shows if the request was successful.
                  message:
                    type: string
                    description: A short message explaining what went wrong.
                example:
                  status: false
                  message: Internal server error, please contact support@mile.app.
      deprecated: false
      security:
        - bearerAuth: []
components:
  parameters:
    pageInQuery:
      name: page
      in: query
      schema:
        default: 1
        type: integer
      description: The page number of results to retrieve. **Example:** `2`
    limitInQuery:
      name: limit
      in: query
      schema:
        default: 20
        minimum: 1
        maximum: 1000
        type: integer
      description: >-
        Specifies the maximum number of items to retrieve in a single request.
        **Example:** `10`
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Use a valid Bearer token to authenticate.

````