POST https://restapi.actonsoftware.com/ucl/v2/import/contacts/{accountId}
This endpoint allows you to import CSV records to All Contacts.
Parameters
Name | Parameter Type |
Allow Multiple |
Required/ Optional |
Data Type | Description |
---|---|---|---|---|---|
authorization | header | false | required | string | Insert your generated access token. (Bearer {access token}) |
accountId | Path | false | required | number | Account ID where query needs to be done |
fileId | Path | False | required | String | Specify the file ID of the import that you would like to access. |
hasHeader | Body | False | Required | Boolean | Specify if the csv has headers or not. |
segmentName | Body | False | Required | String | The name of the segment that will be created. |
fieldSeparator | Body | False | Optional | String |
Set the field separator character (“,”, TAB KEY) |
quoteCharacter | Body | False | Required | String |
Set field quote character. Can be: None, Single Quote or Double Quote. |
columns | Body | False | Required | Array of string |
Specify the name, type and position of the column and the merge for it and format of date if it’s required. |
If the column is of type DATE, you should specify the format of the date. There are some values that we accepted: "YYYY-MM-DD", "YY-MM-DD", "DD-MM-YY", "DD-MM-YYYY".
Example: “format:”YYYY-MM-DD”
Response
Code Examples
cURL
curl --location --request POST
'https://restapi.actonsoftware.com/ucl/v2/import/contacts/{ACCOUNT_ID} \
--header 'Authorization: Bearer a9d1db70-abf1-3bac-8514-e70b7c3b279a' \
--header 'Content-Type: application/json' \
--data-raw '{
"fileId":"1672931625837_2b318194-1f25-4951-9cfe-f2d40356fbfa_1-record-10-12-22-tes
t3637708311668646805.csv",
"hasHeader":true,
"segmentName":"Testing 2023",
"fieldSeparator":",",
"quoteCharacter":"'\''",
"columns": [
{"name": "Last Name", "type": "TEXT", "filePosition":0},
{"name": "Email", "type": "EMAIL", "filePosition":2}
]
}'