Page tree

 

Contents

 

Here is the basic structure for the Users Upsert API, assuming your account name with Evergage is "account" and your dataset is "engage"

Users can be updated in batch. Data is sent in array form and must include the user's unique ID, and if the dataset is setup to track accounts, it must also include the matching accountName.

Here is the basic structure for the Accounts Upsert API, assuming your account name with Evergage is "account" and your dataset is "engage"
Accounts can be updated in batch.  Data is sent in array form and must include the account's unique ID using the attribute "name".

 

Example JSON file format for User Upsert

The following is example JSON that can be posted to the user upsert path to update user attributes. 

This example updates the user attributes "age" and "state" respectively. All attributes must be sent as strings.
 

Example JSON file format for Account Upsert

The following is example JSON that can be posted to the account upsert path to update account attributes. 

This example updates the account attribute "accountStatus". All attributes must be sent as strings.


Example CSV file format for Updates

See CSV Users and Accounts Import for a detailed document on how the CSV file should look.

 

Update Language Examples

For all examples, we will be using the following values:

 

Evergage Account Key (this is the subdomain you use to login to Evergage with, if your account is "testaccount.evergage.com", then use "testaccount"):

testaccount

Evergage Dataset (by default this is "engage"):

engage

API Token (this is used to authenticate your requests and can be found in our UI under Settings -> API Tokens:

1234567A-1A2B-DEF1-A123-123A456B789C

File name.  When using file names (CURL), we assume you've named your files fileName.json and fileName.csv (for JSON and CSV formats respectively):

fileName.json / fileName.csv

 

 

CURL Example for User Upsert


Upserting data through CURL on the command line can be done with both CSV and JSON files.

The syntax is slightly different for both formats, so be sure to use the correct command depending on the format of your data.

For both commands you will need a few key values. In the commands listed below be sure to replace the accountKey, datasetNameapiTokenand fileName fields to their correct values. The account token value is available under  the API Tokens Settings.

JSON:

curl -k -X POST -d @fileName.json -H "Content-Type:application/json" "https://testaccount.evergage.com/api/dataset/engage/users/upsert?_at=1234567A-1A2B-DEF1-A123-123A456B789C"

CSV:

curl -k -X POST -F "file=@fileName.csv" "https://testaccount.evergage.com/api/dataset/engage/users/upsert?_at=1234567A-1A2B-DEF1-A123-123A456B789C"

 

Java Example for User Upsert

 

Dependencies:
 

PHP Example for User Upsert

 

User update  Example (PHP) 

 

Python Example for User Upsert

 


 



This page has no comments.