POST https://restapi.actonsoftware.com/api/1/customevents
This endpoint will import a CSV file with custom events. Click here for more information on Custom Events.
Parameters
Name | Parameter Type |
Allow Multiple |
Required/ Optional |
Data Type | Description |
---|---|---|---|---|---|
Authorization: | Header | false | Required | String | Insert your generated access token. (Bearer {access token}) |
destination | form | false | Required | String |
Specify a unique name for the custom event. This is the name that displays in the UI (example: "Custom Touch Points") |
firstrow | form | false | Required | String | Does the first row of the source data contain a heading? ("Y","N") |
fieldseparator | form | false | Required | String | Set field separator character ("TAB", "COMMA", "SEMICOLON", "SPACE" ) |
quotecharacter | form | false | Required | String | Set field quote character ("NONE", "SINGLE_QUOTE", "DOUBLE_QUOTE") |
customeventaction | form | false | Required | String |
Set the event type of the custom event.
Note1:There can only be a single unigue custom event per csv file Note2:User friendly name can be defined in the UI This can be used in segmentation and scoring. For example: customeventaction = attended an event |
emailcolidx | form | false | Required | String | Column index (zero-based) for email in the source file. |
datecolidx | form | false | Required | String | Column index (zero-based) for the date for the custom event in the source file. |
titlecolidx | form | false | Required | String |
Column index (zero-based) for the event title for the custom event in the source file. This can be used in segmentation and scoring. For example: Titlecolidx = Sample Custom Touch Point 123 |
notecolidx | form | false | Optional | String | Column index (zero-based) for an optional note from the source file. |
titlecount | form | false | Required | String | Set the number of new titles you expect to add from the source file. There's no need to count existing titles already within the custom touch event |
dateformat | form | false | Required | string | The date format used to parse the source file date column. |
filename | form | false | Optional | String | Specify the name of the file being attached. |
form | false | Required | file | The file to upload (in CSV format). |
Parameter Notes
dateformat Examples:
SLASH FORMATS: MM/dd/yyyy (01/25/2023) dd/MM/yyyy (25/01/2023) MM/dd/yy (01/25/2023) dd/MM/yy (01/25/23) yyyy/MM/dd (2023/01/25)
DASH FORMATS: MM-dd-yyyy (01-25-2023) dd-MM-yyyy (25-01-2023) MM-dd-yy (01-25-2023) dd-MM-yy (01-25-23) yyyy-MM-dd (2023-01-25)
TEXTUAL MONTH: dd MMM yyyy (25 Jan 2032) MMM dd yyyy (Jan 25 2023) dd MMMM yyyy (25 Jaunuary 2023) EEE, dd MMM yyyy (Tue, 25 Jan 2023) EEEE, dd MMMM yyyy (Tuesday, 25 January 2023)
Response
{ "jobId": "15937380", "status": "success" }
Code Examples
cURL
curl -X POST https://restapi.actonsoftware.com/api/1/customevents -H "Authorization: Bearer 12345678-9abc-defg-hijk-lmnopqrs" -H 'Cache-Control: no-cache' -H 'Content-Type: multipart/form-data' -H 'cache-control: no-cache' -H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' -F destination=TestCustomEvent -F fieldseparator=COMMA -F quotecharacter=NONE -F firstrow=Y -F customeventaction=CUSTOM_GENERAL -F emailcolidx=2 -F datecolidx=3 -F titlecolidx=4 -F dateformat=MM/dd/yyyy -F filename=customEvent.csv -F notecolidx=5 -F titlecount=1 -F file=@/Users/john.doe/Documents/customEvent.csv