Skip to main content

Import call samples

Use the Varicent Incentives API to perform actions related to data imports, such as retrieving information about table imports or running saved imports.

Retrieve data import information

Use this call to retrieve all information about Varicent Incentives table imports.

Request

GET - api/v1/imports

Sample call

curl -X GET -H "Authorization: Bearer API_KEY" 
-H "Model: YOUR_CLIENT_MODEL” 
-H "Content-Type: application/json" 
https:// YOUR_ICM10_API_SERVER_ADDRESS/api/v1/imports

Sample response

[{
"name": "YOUR_IMPORT_NAME",
"importType": "Text",
"hasHeader": true,
"table": "YOUR_TABLE_NAME",
"columnMatchings": {
"columns": [
"Text",
"Date",
"Numeric",
"Email"
],
"matched" [
"Text",
"Date",
"Numeric",
"Email"
]
},
"dateFormat": "MonthFirst",
"listSubitems": [],
"subitemMap": {},
"addMember": false,
"updateExistingRows": true,
"tableType": "Custom",
"isLocal": false,
"useIncrementalImport": false,
"culture": "en-US",
"tableEffectiveDated": false,
"isODBCTextDriver": false,
"version": {
"rowVersion": 1705010
},
"importId": 52,
"filename": "YOUR_IMPORT_FILE_NAME",
"delimiter": "\t",
"queryTimeout": 0,
"userSelected": false,
"sandbox": false,
"codePage": 0,
"ignoreFirst": false,
"ignoreLast": false,
"recordLength": 0
}]

Run saved import

Use this call to run a saved import in Varicent Incentives.

Request

POST - api/v1/rpc/imports/{YOUR_IMPORT_ID}/run

Note

The import ID can be obtained from the GET - api/v1/imports call response in the ImportId field.

Sample call

curl -X GET -H "Authorization: Bearer API_KEY" 
-H "Model: YOUR_CLIENT_MODEL” 
-H "Content-Type: application/json"
https:// YOUR_ICM10_API_SERVER_ADDRESS/api/v1/imports/{YOUR_IMPORT_ID}/run

Sample response

{
  "completedactivities": "api/v1/completedactivities/[ProgressId]",
  "liveactivities": "api/v1/liveactivities/[ProgressId]"
}