Log Treatment Interactions

This API enables your team to monitor how your users are engaging with the touchpoints you distribute through Auxia.

API Definition

POST https://apis.auxia.io/v1/LogTreatmentInteraction

Path Parameters

NameTypeDescription

api-key

String

A string API key that is issued to each project or company that uses Auxia. This key should have permission to call this API.

This can be either set in the request parameters or in the header.

Headers

NameTypeDescription

x-api-key

String

A string API key that is issued to each project or company that uses Auxia. This API key should have permission to call this API.

This can be either set in the request parameters or the header.

Raw request body

{
    "projectId": "1250",
    "userId": "gGTE8CWUIgpzPivCejVk7JN284V",
    "treatmentTrackingId": "6_690e24d8-16a6-4518-bf37-09a8f0120dfb",
    "treatmentId": "1250",
    "surface": "HOME_SCREEN",
    "interactionType": "CLICKED",
    "interactionTimeMicros": 1667829258250000,
    "actionName": "Buy Now"    
}

Example Curl

curl --location --request POST 'https://apis.auxia.io/v1/LogTreatmentInteraction' \
--header 'Content-Type: application/json, x-api-key: ****************' \
--data-raw '{
    "projectId": "1250",
    "userId": "gGTE8CWUIgpzPivCejVk7JN284V",
    "treatmentTrackingId": "6_690e24d8-16a6-4518-bf37-09a8f0120dfb",
    "treatmentId": "1250",
    "surface": "HOME_SCREEN"
    "interactionType": "CLICKED",
    "interactionTimeMicros": 1667829258250000,
    "actionName": "Buy Now"
}'

Response

< content-type: application/json
<
{ }

Schema reference

Request

This API may be called multiple times for each treatment_tracking_id for different interactions or recurring interactions.

NameData TypeRequired?

projectId

String

Required

For a given customer's project, this should always be the same.

userId

string

Required

Unique ID for the user whose interaction is being logged. This field is new - optional until the clients are migrated to start using it.

treatmentTrackingId

String

Required

A unique ID that is obtained for each treatment returned by the getTreatments API. This can be passed back in this API to complete the feedback loop.

treatmentId

string

Required

Unique ID of the treatment for which interaction is being logged returned by the getTreatments API. This can be passed back in this API to complete the feedback loop. Treatment ID is used for efficient matching with treatments returned by GetTreatments API. But if it adds complexity in passing it around, please discuss with Auxia to make this optional. This field is new - optional until the clients are migrated to start using it.

surface

string

Required

The name of the surface on which the treatment is rendered. This field is new - optional until the clients are migrated to start using it.

interactionType

String

Required

This specifies the type of interaction. Supported values include:

  • VIEWED

  • CLICKED

  • SNOOZED

  • DISMISSED

  • CTA_COMPLETED

  • SWIPE

interactionTimeMicros

Int64

Required

This indicates the time at which the interaction occurred. Please ensure the timestamp matches the timestamp recorded by your analytics events (e.g. Amplitude, Firebase, etc). This represents the number of microseconds of UTC time after Unix epoch.

actionName

String

Optional

Indicates the action associated with the user tap/click/swipe.

Response

An empty response indicates that the RPC was completed successfully

Last updated