> ## 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 export config



## OpenAPI

````yaml /openapi/public/openapi-importexport.json put /export-config/{exportConfigId}/
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:
  /export-config/{exportConfigId}/:
    put:
      tags:
        - Export Config
      summary: Update export config
      operationId: updateExportConfig
      parameters:
        - name: exportConfigId
          in: path
          required: true
          description: |-
            Unique identifier for the export config that generated by system.
            **Example**: `642634bde1428d414838c882`
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExportConfigUpdateRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                properties:
                  status:
                    description: Status of response.
                    type: string
                  code:
                    description: Code of response.
                    type: string
                  message:
                    description: Message of API response.
                    type: string
                  data:
                    description: Detail of object export config.
                    type: object
                    additionalProperties: true
                example:
                  status: true
                  code: 200
                  message: Export Config has been updated successfully.
                  data:
                    _id: 67459c0b9778e36baa076802
                    name: Report Daily
                    description: Template for daily report with bill item detail
                    collection: task
                    fields:
                      - component: input
                        id: flow
                        inputType: string
                        source: reservedKey
                        title: Flow
                        uniqueTitle: Flow
                      - component: input
                        id: _id
                        inputType: string
                        source: reservedKey
                        title: Id
                        uniqueTitle: Id
                      - component: input
                        id: hub
                        inputType: string
                        source: reservedKey
                        title: Hub
                        uniqueTitle: Hub
                      - component: input
                        id: title
                        inputType: string
                        source: reservedKey
                        title: Title
                        uniqueTitle: Title
                      - component: input
                        id: status
                        inputType: string
                        source: reservedKey
                        title: Status
                        uniqueTitle: Status
                      - component: input
                        id: orderNumber
                        title: Order Number
                        inputType: string
                        default: null
                        routeAs: null
                        showAs: title
                        required: false
                        visible: true
                        page: page0
                        flowId:
                          - 66a988d53ae08a7ab52867c2
                          - 66c6a05440d39b2616275622
                          - 66c6a05c40d39b2616275624
                          - 66c6a06412d3f54e2f425e22
                        flowName:
                          - Export Bill
                          - Flow A
                          - Flow B
                          - Flow C
                        uniqueTitle: Order Number
                      - component: bill
                        id: billItem
                        title: Bill Item
                        addNew: true
                        required: false
                        value: null
                        editable: []
                        costs:
                          - Discount
                          - Shipping Cost
                        visible: true
                        masterItems:
                          - name: Snack
                            unit_price: 10000
                          - name: Cold Drink
                            unit_price: 5000
                          - name: Bread
                            unit_price: 7000
                          - name: Egg
                            unit_price: 2500
                        masterCosts:
                          - type: number
                            name: Discount
                            amount: 10000
                          - type: number
                            name: Shipping Cost
                            amount: 7000
                        qtyRule: null
                        page: page1
                        flowId:
                          - 66a988d53ae08a7ab52867c2
                        flowName:
                          - Export Bill
                        additionalField:
                          - billItem.Discount
                          - billItem.Shipping Cost
                          - billItem.totalCost
                        uniqueTitle: Bill Item
                    flowIds:
                      - 66a988d53ae08a7ab52867c2
                      - 66c6a05440d39b2616275622
                      - 66c6a05c40d39b2616275624
                      - 66c6a06412d3f54e2f425e22
                    organizationId: 66791b2bf001a712b77b3622
                    updatedTime: '2024-11-26T10:06:27.615000Z'
                    createdTime: '2024-11-26T09:59:39.860000Z'
        '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:
    ExportConfigUpdateRequest:
      example:
        _id: 67459c0b9778e36baa076802
        name: Report Daily
        description: Template for daily report with bill item detail
        collection: task
        fields:
          - component: input
            id: flow
            inputType: string
            source: reservedKey
            title: Flow
            uniqueTitle: Flow
          - component: input
            id: _id
            inputType: string
            source: reservedKey
            title: Id
            uniqueTitle: Id
          - component: input
            id: hub
            inputType: string
            source: reservedKey
            title: Hub
            uniqueTitle: Hub
          - component: input
            id: title
            inputType: string
            source: reservedKey
            title: Title
            uniqueTitle: Title
          - component: input
            id: status
            inputType: string
            source: reservedKey
            title: Status
            uniqueTitle: Status
          - component: input
            id: orderNumber
            title: Order Number
            inputType: string
            default: null
            routeAs: null
            showAs: title
            required: false
            visible: true
            page: page0
            flowId:
              - 66a988d53ae08a7ab52867c2
              - 66c6a05440d39b2616275622
              - 66c6a05c40d39b2616275624
              - 66c6a06412d3f54e2f425e22
            flowName:
              - Export Bill
              - Flow A
              - Flow B
              - Flow C
            uniqueTitle: Order Number
          - component: bill
            id: billItem
            title: Bill Item
            addNew: true
            required: false
            value: null
            editable: []
            costs:
              - Discount
              - Shipping Cost
            visible: true
            masterItems:
              - name: Snack
                unit_price: 10000
              - name: Cold Drink
                unit_price: 5000
              - name: Bread
                unit_price: 7000
              - name: Egg
                unit_price: 2500
            masterCosts:
              - type: number
                name: Discount
                amount: 10000
              - type: number
                name: Shipping Cost
                amount: 7000
            qtyRule: null
            page: page1
            flowId:
              - 66a988d53ae08a7ab52867c2
            flowName:
              - Export Bill
            additionalField:
              - billItem.Discount
              - billItem.Shipping Cost
              - billItem.totalCost
            uniqueTitle: Bill Item
        flowIds:
          - 66a988d53ae08a7ab52867c2
          - 66c6a05440d39b2616275622
          - 66c6a05c40d39b2616275624
          - 66c6a06412d3f54e2f425e22
        organizationId: 66791b2bf001a712b77b3622
        updatedTime: '2024-11-26T09:59:39.860000Z'
        createdTime: '2024-11-26T09:59:39.860000Z'
      type: object
      properties:
        name:
          type: string
          description: |-
            The name of export config. Name must be unique.
            **Example**: `Report Daily`
        collection:
          type: string
          description: |-
            The collection from which the data will be exported.
            **Example**: `task`
        description:
          type: string
        flowIds:
          type: array
          description: >-
            The flow identifier used to filter the components refers only to the
            selected flow IDs. Use [Flow /flows
            API](#tag/Flow/operation/getflow) to get the list of flow id.

            **Example:** `['66a988d53ae08a7ab52867c2']`
          items:
            type: object
            additionalProperties: true
        fields:
          type: array
          description: >-
            The optional fields to be included in the exported data that ref to
            Flow reserved key and User fields. 
             **To see the details of reserved key of task, please follow [ this link ](#tag/task_model)**
          items:
            type: object
            properties:
              id:
                type: string
                description: >-
                  An unique identifier for flow component. The value that cannot
                  be input is the reserved key task.
              component:
                type: string
                description: Type of Component.
              title:
                type: string
                description: Title of Component.
              source:
                type: string
                description: Flag for reserved key Component.
            required:
              - id
              - component
              - title
      required:
        - name
        - collection
        - flowIds
        - fields
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Use a valid Bearer token to authenticate.

````