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

# Read order type versions

> Returns the published versions of an order type, newest first, with `runningOrders` (orders not yet final) on each version. Requires permission `view/orderType`.
Pass `version` to get that one version with its full `snapshot` (`name`, `code`, `schemaVersion`, `fields`, `statuses`, `configuration`, `orderSteps`) instead of the list.



## OpenAPI

````yaml /openapi/public/openapi-flow.json get /order-type-logs
openapi: 3.0.0
info:
  title: API - Flow
  version: 3.0.0
  description: API Documentation - RESTful API for field operations management.
servers:
  - url: https://apiweb.mile.app/api/v3
security:
  - bearerAuth: []
tags:
  - name: Flow
    description: >-
      Flow is the mobile field application workflow, setting it correctly is
      critical to the success of the field workers in doing their job
      efficiently. Flow attributes consist of IDs, pages, components,
      configurations, and time. The Flow will be used at Task, Automation, or
      Schedule.


      **To see the details of flow object, please follow [this
      link](#tag/flow_model)**
  - name: Automation
    description: >-
      Automation enables you to set up automation based on tasks' events and
      data source's events. It might help you automate creation of tasks, task
      assignment, task placement, task webhook, data source update, datasource
      creation, and data source webhook. Automation attributes consist of IDs,
      automation name, automation type, automation details, and rules.


      **To see the details of automation object, please follow [this
      link](#tag/automation_model)**
  - name: Order Type
    description: >-
      An order type is the blueprint for orders: the list of steps, which task
      type each step uses, and how an order moves from one step to the next.
      Order types are versioned: you edit a draft, validate or simulate it, then
      publish it. These endpoints are served under `/api/v4`.
paths:
  /order-type-logs:
    servers:
      - url: https://apiweb.mile.app/api/v4
    get:
      tags:
        - Order Type
      summary: Read order type versions
      description: >-
        Returns the published versions of an order type, newest first, with
        `runningOrders` (orders not yet final) on each version. Requires
        permission `view/orderType`.

        Pass `version` to get that one version with its full `snapshot` (`name`,
        `code`, `schemaVersion`, `fields`, `statuses`, `configuration`,
        `orderSteps`) instead of the list.
      operationId: getOrderTypeLogs
      parameters:
        - name: orderTypeId
          in: query
          required: true
          description: |-
            Unique identifier for the order type.
            **Example**: `6710a2f4c1d2e3f4a5b6c7d8`
          schema:
            type: string
        - name: version
          in: query
          required: false
          description: Return only this version, with its snapshot. Minimum 1.
          schema:
            type: integer
        - $ref: '#/components/parameters/pageInQuery'
        - name: limit
          in: query
          required: false
          description: Number of rows per page, 1-100. Default `25`.
          schema:
            type: integer
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: boolean
                    description: Status of response.
                  message:
                    description: Message of API response.
                    type: string
                  data:
                    description: >-
                      List of versions, or one version with its snapshot when
                      `version` is given.
                    type: array
                    items:
                      type: object
                      additionalProperties: true
                example:
                  status: true
                  message: Success
                  data:
                    - version: 2
                      publishedAt: '2026-10-07T03:15:22.000+00:00'
                      publishedBy: admin@example.com
                      note: Add weight field
                      runningOrders: 12
                      restoredFrom: null
                    - version: 1
                      publishedAt: '2026-10-02T08:00:00.000+00:00'
                      publishedBy: admin@example.com
                      note: null
                      runningOrders: 0
                      restoredFrom: null
                  pagination:
                    page: 1
                    limit: 25
                    total: 2
                    totalPages: 1
        '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.
        '404':
          description: Data not found
          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: Data not found
        '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`
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Use a valid Bearer token to authenticate.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.