Upload file data for Segment

POST http://api.ants.tech/access/api/segment/upload/:itemTypeId

Request

Params

  • itemTypeId: Type to define the Customer segment or Visitor segment (-1003 for Customer segment, -1007 for Visitor segment)

  • file: Form file to upload

Headers

Name
Description

Authorization*

Bearer <ACCESS_TOKEN>

Response

  • filePath: File storage path, used for Create Segment API

  • fileName: Metadata of the file, used for Create Segment API

  • extension: Metadata of the file, used for Create Segment API

  • delimiter: Metadata of the file, used for Create Segment API

  • delimiterCode: Metadata of the file, used for Create Segment API

  • headerFiles: Array containing the file header code and index, used for mapping with BO attributes that need to be uploaded when Creating Segment

    • headerCode: Header of the file

    • headerIndex: Order of headerCode

{
    "code": 200,
    "message": "Success",
    "data": {
        "entries": [
            {
                "filePath": "/S3/cdp-import-export/import/segment/33167",
                "fileName": "-1003_1600083836_1707120681099.csv",
                "extension": "csv",
                "delimiter": "\t",
                "delimiterCode": "tab",
                "headerFiles": [
                    {
                        "headerCode": "id",
                        "headerIndex": 0
                    },
                    {
                        "headerCode": "created_date",
                        "headerIndex": 1
                    },
                    {
                        "headerCode": "from_user",
                        "headerIndex": 2
                    },
                    {
                        "headerCode": "to_user",
                        "headerIndex": 3
                    },
                    {
                        "headerCode": "user_id",
                        "headerIndex": 4
                    },
                    {
                        "headerCode": "message",
                        "headerIndex": 5
                    },
                    {
                        "headerCode": "page_id",
                        "headerIndex": 6
                    },
                    {
                        "headerCode": "page_name",
                        "headerIndex": 7
                    }
                ]
            }
        ],
        "meta": {
            "total": 1
        }
    },
    "codeMessage": null,
    "duration": "1.507 ms"
}

Last updated