Skip to main content
PUT
/
flow-reorder
Re-order flow
curl --request PUT \
  --url https://apiweb.mile.app/api/v3/flow-reorder \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "data": [
    {
      "flowId": "64118c2a2785f33e53375225"
    },
    {
      "doDuplicate": true,
      "flowId": "64118c2a2785f33e53375225",
      "flowName": "Flow Copy"
    },
    {
      "flowId": "6352736c628401059b37a1d1"
    },
    {
      "flowId": "63fd8e69d5d8b97133216e1b"
    },
    {
      "doDelete": true,
      "flowId": "63fd8e69d5d8b97133216e1a"
    }
  ]
}
'
{
  "status": true,
  "code": 200,
  "message": "success re-order index",
  "data": [
    {
      "status": true,
      "code": 200,
      "message": "Success",
      "flow": {
        "orderIndex": 1,
        "version": 32
      }
    },
    {
      "status": true,
      "code": 200,
      "message": "Flow has been created successfully.",
      "flow": {
        "name": "Flow Copy",
        "orderIndex": 2,
        "createdBy": "user@mile.app",
        "updatedBy": "user@mile.app",
        "pages": [
          {
            "id": "page0",
            "enabled": true,
            "components": [
              {
                "component": "input",
                "id": "order",
                "title": "Order",
                "inputType": "string",
                "default": null,
                "routeAs": null,
                "showAs": "title",
                "isRequired": false,
                "visible": true,
                "preValue": null
              }
            ]
          }
        ],
        "configurations": [
          {
            "id": "startTime",
            "adjustment": 0
          },
          {
            "id": "endTime",
            "adjustment": 24
          }
        ],
        "organizationId": "66791b2bf001a712b77b3622",
        "version": 1,
        "updatedTime": "2025-06-19T10:49:31.289000Z",
        "createdTime": "2025-06-19T10:49:31.289000Z",
        "_id": "6853eb3bc3a6b9a8b10567f2"
      }
    },
    {
      "status": true,
      "code": 200,
      "message": "Success",
      "flow": {
        "orderIndex": 3,
        "version": 21
      }
    },
    {
      "status": true,
      "code": 200,
      "message": "Success",
      "flow": {
        "orderIndex": 3,
        "version": 59
      }
    },
    {
      "status": true,
      "code": 200,
      "data": {
        "_id": "63fd8e69d5d8b97133216e1a",
        "name": "Unloading",
        "orderIndex": 4,
        "createdBy": "user@mile.app",
        "updatedBy": "user@mile.app",
        "pages": [
          {
            "id": "page0",
            "enabled": true,
            "components": []
          }
        ],
        "configurations": [
          {
            "id": "startTime",
            "adjustment": 0
          },
          {
            "id": "endTime",
            "adjustment": 24
          }
        ],
        "organizationId": "66791b2bf001a712b77b3622",
        "version": 1,
        "updatedTime": "2025-06-19T10:49:31.289000Z",
        "createdTime": "2025-06-19T10:49:31.289000Z"
      }
    }
  ]
}

Authorizations

Authorization
string
header
required

Use a valid Bearer token to authenticate.

Body

application/json
data
object[]
required

List of data flowId. Example: { 'flowId': '64118c2a2785f33e53375225' }

Response

Success

status
boolean

Status of response.

code
integer

Code of API response.

message
string

Message of API response.

data
object

Detail of object flows.