> ## 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.

# Update import config



## OpenAPI

````yaml /openapi/public/openapi-importexport.json put /import-config/{importConfigId}/
openapi: 3.0.0
info:
  title: MileApp API - ImportExport
  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 Import
    description: >-
      The Data Import module allows users to upload and import data source
      records from Excel or CSV files. Import operations are processed in the
      background via queue system for scalability and can handle large datasets.
      The import process validates data against data type schemas, tracks
      processing status in real-time, and generates detailed reports including
      failed records for review. All import activities can be monitored through
      import-monitoring endpoints with 30-day data retention.
  - name: Export Task
    description: >-
      The Export Task module provides functionality to export task data and data
      source records to various formats (XLSX, JSON). It supports both direct
      export for small datasets and background processing for large exports.
      Users can customize exports using export configurations, filter data by
      multiple criteria, and monitor export operations through export logs.
      Export files are stored securely with 30-day retention period.
  - name: Export Config
    description: >-
      The Export Config module is used to save and manage the specific fields
      that a user wants included in export results. This allows users to
      customize their exported data by selecting only the necessary fields for
      each export, ensuring that the output contains exactly the information
      they need.


      **To see the details of export config object, please follow [this
      link](#tag/export_config_model)**
  - name: Import Config
    description: >-
      The Import Config module saves and manages column mapping presets for bulk
      import features across MileApp. Users can store field-to-Excel-column
      mappings so they can be reused across multiple imports. Each config is
      linked to a specific resource and contains the mapping between its fields
      and Excel header columns.
paths:
  /import-config/{importConfigId}/:
    put:
      tags:
        - Import Config
      summary: Update import config
      operationId: updateImportConfig
      parameters:
        - name: importConfigId
          in: path
          required: true
          description: |-
            Unique identifier for the import config that generated by system.
            **Example**: `67b5a1234567890abcdef001`
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ImportConfigUpdateRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                properties:
                  status:
                    type: boolean
                    description: Status of response.
                  code:
                    description: Code of response.
                    type: integer
                  message:
                    description: Message of API response.
                    type: string
                  data:
                    description: Detail of updated import config object.
                    type: object
                    additionalProperties: true
                example:
                  status: true
                  code: 200
                  message: Import Config has been updated successfully.
                  data:
                    _id: 67b5a1234567890abcdef001
                    name: Delivery Order Import - Flow A (Updated)
                    description: Updated column mapping preset
                    collection: task
                    referenceType: flow
                    referenceId: 66a988d53ae08a7ab52867c2
                    fields:
                      - id: orderNumber
                        headerColumn: Order Number
                      - id: customerName
                        headerColumn: Customer Name
                      - id: address
                        headerColumn: Delivery Address
                      - id: billItem
                        sheet: Bill Items
                        fields:
                          - id: name
                            headerColumn: Item Name
                          - id: qty
                            headerColumn: Quantity
                          - id: unitPrice
                            headerColumn: Unit Price
                    organizationId: 66791b2bf001a712b77b3622
                    updatedTime: '2026-02-19T09:15:00.000000Z'
                    createdTime: '2026-02-19T08:30:00.000000Z'
        '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:
  schemas:
    ImportConfigUpdateRequest:
      example:
        name: Delivery Order Import - Flow A (Updated)
        description: Updated column mapping preset
        collection: task
        referenceType: flow
        referenceId: 66a988d53ae08a7ab52867c2
        fields:
          - id: orderNumber
            headerColumn: Order Number
          - id: customerName
            headerColumn: Customer Name
          - id: address
            headerColumn: Delivery Address
          - id: billItem
            sheet: Bill Items
            fields:
              - id: name
                headerColumn: Item Name
              - id: qty
                headerColumn: Quantity
              - id: unitPrice
                headerColumn: Unit Price
      type: object
      properties:
        name:
          type: string
          description: |-
            The name of the import config. Maximum 200 characters.
            **Example**: `Delivery Order Import - Flow A`
        description:
          type: string
        collection:
          type: string
          description: |-
            The collection type for the import.
            **Example**: `task`
        referenceType:
          type: string
          description: |-
            The type of reference for this config.
            **Example**: `flow`
        referenceId:
          type: string
          description: >-
            The ID of the referenced resource (e.g., flow ID). Use [Flow /flows
            API](#tag/Flow/operation/getflow) to get the list of flow IDs.

            **Example**: `66a988d53ae08a7ab52867c2`
        fields:
          type: array
          description: >-
            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`.
          items:
            type: object
            properties:
              id:
                type: string
                description: The flow component field ID.
              headerColumn:
                type: string
                description: The Excel header column name mapped to this field.
              sheet:
                type: string
                description: >-
                  The Excel sheet name for complex components (bill, list,
                  subpage).
              fields:
                type: array
                description: Nested sub-field mappings for complex components.
                items:
                  type: object
                  properties:
                    id:
                      type: string
                      description: The sub-field ID within the complex component.
                    headerColumn:
                      type: string
                      description: The Excel header column name mapped to this sub-field.
                  required:
                    - id
            required:
              - id
      required:
        - name
        - collection
        - referenceType
        - referenceId
        - fields
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Use a valid Bearer token to authenticate.

````