Skip to main content
POST
/
import-config
Create import config
curl --request POST \
  --url https://apiweb.mile.app/api/v3/import-config \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Delivery Order Import - Flow A",
  "description": "Column mapping preset for daily delivery order import",
  "collection": "task",
  "referenceType": "flow",
  "referenceId": "66a988d53ae08a7ab52867c2",
  "fields": [
    {
      "id": "orderNumber",
      "headerColumn": "Order No"
    },
    {
      "id": "customerName",
      "headerColumn": "Customer"
    },
    {
      "id": "billItem",
      "sheet": "Bill Items",
      "fields": [
        {
          "id": "name",
          "headerColumn": "Item Name"
        },
        {
          "id": "qty",
          "headerColumn": "Quantity"
        },
        {
          "id": "unitPrice",
          "headerColumn": "Price"
        }
      ]
    }
  ]
}
'
{
  "status": true,
  "code": 201,
  "message": "Import Config has been added successfully.",
  "data": {
    "name": "Delivery Order Import - Flow A",
    "description": "Column mapping preset for daily delivery order import",
    "collection": "task",
    "referenceType": "flow",
    "referenceId": "66a988d53ae08a7ab52867c2",
    "fields": [
      {
        "id": "orderNumber",
        "headerColumn": "Order No"
      },
      {
        "id": "customerName",
        "headerColumn": "Customer"
      },
      {
        "id": "billItem",
        "sheet": "Bill Items",
        "fields": [
          {
            "id": "name",
            "headerColumn": "Item Name"
          },
          {
            "id": "qty",
            "headerColumn": "Quantity"
          },
          {
            "id": "unitPrice",
            "headerColumn": "Price"
          }
        ]
      }
    ],
    "organizationId": "66791b2bf001a712b77b3622",
    "updatedTime": "2026-02-19T08:30:00.000000Z",
    "createdTime": "2026-02-19T08:30:00.000000Z",
    "_id": "67b5a1234567890abcdef001"
  }
}

Authorizations

Authorization
string
header
required

Use a valid Bearer token to authenticate.

Body

application/json
name
string
required

The name of the import config. Maximum 200 characters. Example: Delivery Order Import - Flow A

collection
string
required

The collection type for the import. Example: task

referenceType
string
required

The type of reference for this config. Example: flow

referenceId
string
required

The ID of the referenced resource (e.g., flow ID). Use Flow /flows API to get the list of flow IDs. Example: 66a988d53ae08a7ab52867c2

fields
object[]
required

Array of field mapping objects. Each object maps a flow field to an Excel header column. For complex components (bill, list, subpage), include sheet and nested fields.

description
string

Response

Success

status
boolean

Status of response.

data
object

Detail object of created import config.