Auxia
  • Welcome!
  • Quick Start
    • Getting Started
      • Step 1: Ingesting your data
      • Step 2: Integrating Auxia into your product
      • Step 3: Defining your model objective
      • Step 4: Creating your first treatment
      • Step 5: Measuring success
        • Interactions
        • Engagement
  • Data Ingestion
    • Overview
      • User event data
      • User attributes
    • Data Connections
      • Google BigQuery
      • Amazon S3
      • Amplitude
        • Batch with Export API
        • Streaming with Google Pub/Sub
  • Deploying Auxia
    • Deploying with Auxia's API
      • Making your first call
      • Tracking interactions
      • Surfaces and types
      • Contextual attributes for real-time distribution
    • Delivery Integrations
      • Braze
  • API Reference
    • Get Treatments
    • Log Treatment Interactions
  • Treatment Management
Powered by GitBook
On this page
  • API Definition
  • Raw request body
  • Example Curl
  • Response
  • Schema reference
  • Request
  • Response
  1. API Reference

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

Name
Type
Description

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

Name
Type
Description

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.

Name
Data Type
Required?

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

PreviousGet TreatmentsNextTreatment Management

Last updated 10 months ago

Page cover image