Skip to main content
GET
/
flows
Read flows
curl --request GET \
  --url https://apiweb.mile.app/api/v3/flows \
  --header 'Authorization: Bearer <token>'
{
  "status": true,
  "message": "Success",
  "flows": {
    "current_page": 1,
    "data": [
      {
        "_id": "6352736c628401059b37a1d1",
        "name": "Delivery",
        "pages": [
          {
            "id": "page0",
            "components": [
              {
                "component": "input",
                "id": "title",
                "inputType": "string",
                "default": null,
                "title": "Title",
                "isRequired": true,
                "visible": true,
                "showAs": "title"
              },
              {
                "component": "input",
                "id": "content",
                "inputType": "string",
                "default": null,
                "title": "Content",
                "isRequired": true,
                "visible": true,
                "showAs": "content"
              },
              {
                "component": "input",
                "id": "receiverName",
                "inputType": "string",
                "default": "Admin Hub",
                "title": "ReceiverName",
                "isRequired": false,
                "visible": true
              },
              {
                "component": "input",
                "id": "qty",
                "inputType": "number",
                "default": "1",
                "title": "Quantity",
                "isRequired": false,
                "visible": true
              },
              {
                "component": "input",
                "id": "deliveryTime",
                "inputType": "string",
                "default": null,
                "title": "Delivery Time",
                "isRequired": false,
                "visible": true
              },
              {
                "component": "select",
                "id": "label",
                "default": null,
                "options": [
                  "CGR",
                  "HDR",
                  "HJK",
                  "NYT"
                ],
                "min": 0,
                "max": 2,
                "title": "Label",
                "visible": true
              },
              {
                "component": "select",
                "id": "deliveryStatus",
                "options": [
                  "success",
                  "failed"
                ],
                "default": "success",
                "title": "Delivery Status",
                "min": 0,
                "max": 1,
                "visible": true
              }
            ]
          },
          {
            "id": "page1",
            "components": [
              {
                "component": "input",
                "id": "receiver",
                "inputType": "string",
                "default": null,
                "title": "Receiver",
                "isRequired": false,
                "visible": true
              },
              {
                "component": "input",
                "id": "codAmount",
                "inputType": "number",
                "default": "1",
                "title": "codAmount",
                "isRequired": false,
                "visible": true
              },
              {
                "component": "select",
                "id": "statusDelivery",
                "default": null,
                "options": [
                  "Success",
                  "Failed"
                ],
                "min": 0,
                "max": 1,
                "title": "Status Delivery",
                "visible": true
              }
            ]
          }
        ],
        "configurations": [
          {
            "id": "startTime",
            "adjustment": 0
          },
          {
            "id": "endTime",
            "adjustment": 24
          }
        ],
        "isDefault": true,
        "version": 2,
        "orderIndex": 1,
        "organizationId": "6153defcbd80d354e0708a74",
        "createdBy": "jhon@example.com",
        "updatedBy": "jhon@example.com",
        "createdTime": "2021-12-14T04:30:45.538000Z",
        "updatedTime": "2021-12-14T05:10:01.801000Z",
        "deletedTime": "2021-12-15T05:10:01.801000Z"
      }
    ],
    "first_page_url": "http://apiweb.mile.app/api/v3/flows?limit=20&page=1",
    "from": 1,
    "last_page": 1,
    "last_page_url": "http://apiweb.mile.app/api/v3/flows?limit=20&page=1",
    "links": [
      {
        "url": null,
        "label": "&laquo; Previous",
        "active": false
      },
      {
        "url": "http://apiweb.mile.app/api/v3/flows?limit=20&page=1",
        "label": "1",
        "active": true
      },
      {
        "url": null,
        "label": "Next &raquo;",
        "active": false
      }
    ],
    "next_page_url": null,
    "path": "http://apiweb.mile.app/api/v3/flows",
    "per_page": 20,
    "prev_page_url": null,
    "to": 5,
    "total": 5
  }
}

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
sort_by
string

sort_by is used to sort the result-set in ascending or descending order according to selected field. The value of this param is one of available fields on flow objects. Example: name, orderIndex, createdTime, etc. Default: orderIndex

sort_order
string

sort_order is to decide ascending or descending order Example: asc or desc. Default: desc

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,pages,configuration

permission
boolean

Parameter used to display flows based on permissions. Example: true or false.

Response

Success

status
boolean

Status of response.

message
string

Message of API response.

flows
object

List of object flows.