Profile API

Use the Profile API to store customer attribute data. WMI uses this data in conjunction with the parameters defined in Configuration API to evaluation customer behavior. Tasks may include:

  • Get a list of profiles or details about a profile
  • Add or update a profile column
  • Exploring available column
  • Adding a custom column

When creating or adding columns (metrics) to your customer profile, do not exceed 200 columns in your database.

For full details on using the Profile API, refer to the WMI Profile API in API Explorer

API Endpoints

These are the endpoints available with the Profile API.

Endpoint Action Description
/profile GET Gets a list of profiles in the system. Includes id and minimal detail about each profile to support easy identification and UI display needs.
/profile/{profileUniqueName} GET Gets the details about a profile.
PATCH Updates submitted details for the profile according to policy for the requesting user.
/profile/{profileUniqueName}/column GET Get a list of all columns for the profile. Includes id and minimal detail about each column to support easy identification and UI display needs.
POST Adds a new column to the profile. Uses the convention of . for the doc id. If the doc id exists or the specified profile table does not exist, it is an error.
/profile/{profileUniqueName}/column/{columnUniqueName} GET Gets details for a column.
PATCH Updates details for the column according to policy for the requesting user. May be restricted to user columns, or only a subset of attributes for WMI core attributes. Only the following columns are allowed editable with the PATCH action:

  • isHidden
  • isExportEssential
  • category
  • displaySortColumn
  • columnDescription
  • displayOrder
  • displayScale
  • label
  • format

API Endpoint Examples

/profile GET
curl -X GET --header 'Accept: application/json' --header 'Authorization: APIKey yourapikeyvalue' 'https://wmi-rest-api-r1.watsonmarketinginsights.ibm.com/api/v1/profile'
/profile/{profileUniqueName} GET
curl -X GET --header 'Accept: application/json' --header 'Authorization: APIKey yourapikeyvalue' 'https://wmi-rest-api-r1.watsonmarketinginsights.ibm.com/api/v1/profile/profile1'
PATCH
curl -X PATCH--header 'Content-Type: application/json' --header 'Accept: application/json' --header 'Authorization: APIKey yourapikeyvalue' -d  
'{
      "description": "Profile table for capturing customer characteristics",
      "label": "Customer Profile"
  }' 'https://wmi-rest-api-r1.watsonmarketinginsights.ibm.com/api/v1/profile/profile1'
/profile/{profileUniqueName}/column GET
curl -X GET --header 'Accept: application/json' --header 'Authorization: APIKey yourapikeyvalue' 'https://wmi-rest-api-r1.watsonmarketinginsights.ibm.com/api/v1/profile/profile1/column'
POST
curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'Authorization: APIKey yourapikeyvalue' -d
'{
    "columnName": " WEATHER_STATION_CD ",
    "columnDescription": "The relationship to the nearest weather station",
    "category": "Demographic",
    "displayOrder": "",
    "displayScale": "",
    "dataType": "string",
    "label": "Weather Station",
    "format": "none",
    "displaySortColumn": "",
    "isHidden": false,
    "isExportEssential": true
  }' 'https://wmi-rest-api-r1.watsonmarketinginsights.ibm.com/api/v1/profile/profile1/column'
/profile/{profileUniqueName}/column/{columnUniqueName} GET
curl -X GET --header 'Accept: application/json' --header 'Authorization: APIKey yourapikeyvalue' 'https://wmi-rest-api-r1.watsonmarketinginsights.ibm.com/api/v1/profile/profile1/column/WEATHER_STATION_CD'
PATCH
curl -X PATCH--header 'Content-Type: application/json' --header 'Accept: application/json' --header 'Authorization: APIKey yourapikeyvalue' -d 
'{
    "isHidden": "false",
    "category": "Demographic",
    "displayOrder": "",
    "columnDescription": "First Name"
  }' 'https://wmi-rest-api-r1.watsonmarketinginsights.ibm.com/api/v1/profile/profile1/column/WEATHER_STATION_CD'

Join The Discussion

Your email address will not be published. Required fields are marked *