Add Activity API

This API allows the user to send event to the Netcore CE panel from external sources i.e. offline activity data

Overview

The Activity API enables you to sync offline or server-side customer activities into Netcore CE in real-time. Use this API to capture event data from POS systems, call centers, offline stores, kiosks, WhatsApp/IVR interactions, and historical data sources.

This API helps unify customer behavior across channels, enabling accurate segmentation, personalization, and journey orchestration.

You can refer to the API key guide to retrieve your authentication token.

You can use this API to capture:
• In-store and POS transactions
• Call center events
• Offline purchases
• Historical activities
• Any custom event from your backend systems

The API accepts multiple identifiers (identity, email, mobile, and anonid) so you can associate events with the right user, even when not all identifiers are available. You can send single or bulk events (up to 1000 in one request).

📘

Important Point

  • When the Activity API receives an event for a user who does not yet exist in your CE account, the system checks for a matching anonymous profile. If an anonymous profile is found, it is converted into a known user. If no profile exists, a new user profile is created automatically before the activity is recorded.
  • If timestamp passed for event passed by the activity API is more than 24hrs old, it wont trigger a journey. It will be stored in the event data.

HTTP Method

This API uses the POST method to upload the activities.

API Endpoint

The base URLs for Add Activity API are below:

RegionBase URL
US <https://api2.netcoresmartech.com/v1/activity/upload>
Indiahttps://apiin2.netcoresmartech.com/v1/activity/upload
EUhttps://apieu2.netcoresmartech.com/v1/activity/upload

Request Headers

KeyTypeDescriptionValueRequired?
Content-TypeStringJSON format for the request payloadapplication/jsonNo
api-keyStringAPI key for authentication0000eee0e00e0e00e0e0eYes

Request Body

Authentication details are required to access the API. Ensure you include the necessary tokens or credentials in your request headers.

📘

Important Points

  • Product Array: Multiple products can be passed in API call in array format, which can be seen in the JSON example below. However please note if you are passing the data in the format of an array and if it is blank, the system will not insert such events in the Netcore CE. Do not Pass an Empty Array.
  • At least one of the identifiers is required: identity, email, mobile, or anonid.
ParameterDescriptionData TypeRequired
asset_idPass website_id or app_id for which the activity is mapped.StringYes
activity_nameName of the activity or event being recorded. StringYes
timestampThis is the timestamp of the event that occurred.

We currently support the UTC and ISO-8601 time zones.

UTC Example
Expected Value format: 2021-12-29T12:06:28Z

In the UTC timezone, pass the timestamp. The timestamp will be displayed in the UI based on the timezone set on the panel.

ISO-8601 Example

In case, you would want to pass the timestamp in the local timezone, then refer to the below example for IST.
Expected Value Format: 2021-12-29T06:12:28+05:30
Date-TimeYes
identityPrimary identifier for known users. Typically, an email address, mobile number, or a unique user ID is configured as the primary key in CE.
This is the same as the primary key in your Netcore CE Panel. Passing this parameter is mandatory for identified contacts.
Note: At least one of the identifiers is required: identity, email, mobile, or anonid.
String/IntegerNo
emailEmail Address of the user associated with the event.
Note: At least one of the identifiers is required: identity, email, mobile, or anonid.
StringNo
mobileMobile number of the user associated with the event.
Note: At least one of the identifiers is required: identity, email, mobile, or anonid.
StringNo
anonidAnonymous identifier used when the user is not logged in (for example, cookie ID, device ID).

Note: At least one of the identifiers is required: identity, email, mobile, or anonid.
StringNo
activity_sourceSource of the event. Indicates whether the event originated from a website or mobile app. Valid values: web, app.yString

Depending on the asset that you are using whether it is a website or app, please use the source as either "web" or "app"

For Website - use "web"

For App - use "app"
Yes
activity_paramsThe activity_params object holds event-specific metadata.
  • customer_user_id: Internal user identifier from your system. This is a string value and not a mandatory field.
  • Total_item_qty: Total number of items in the activity(for example: cart quantity, purchase quantity).This is a number data type and not a mandatory field.
  • currency: currency code in which the transaction or activity value is recorded. This is a string value and not a mandatory field.
  • product: Each object in the product array represents a single item associated with the activity. All fields within the product object are optional, and the parameters you include may vary based on your use case.
ObjectYes

Sample Request:

[
  {
    "asset_id": "55a6d1d3ac4d5253ca4afd9636442434",
    "activity_name": "Add To Cart",
    "timestamp": "2025-09-30T08:40:46",
    "identity": "[email protected]",
    "email": "[email protected]",
    "mobile": "3525252568",
    "anonid": "",
    "activity_source": "web",
    "activity_params": {
      "customer_user_id": "1234",
      "total_item_qty": 1,
      "currency": "INR",
      "product": [
        {
          "mrp": 250.1,
          "l2_category": "Moisturizers",
          "l3_category": "Serums & Essence",
          "l1_category": "Skin",
          "price": 250.3,
          "quantity": 100,
          "product_name": "Simple Moisturizer"
        }
      ]
    }
  }
]
[[{
    "asset_id": "sdbsjdh623jhmsndbkfs",
  	"activity_name":Purchase,
    "timestamp":"2020-04-28T16:47:37",
    "identity":CUSTOMER_ID,
    "activity_source":"web",
    "activity_params":
    {
        "customer_user_id": "xxxxxx",
        "total_item_qty": 2,
        "currency": "INR",
        "items": [
            				{
                				"mrp": 250.1,
                				"l2_category": "Moisturizers",
                				"l3_category": "Serums & Essence",
                				"l1_category": "Skin",
                				"price": 250.3,
                				"quantity": 1,
            		 				"product_name": "L'Oreal Paris Revitalift Crystal Micro-Essence"
           					 },
           					 {
            						"l1_category": "Makeup",
            						"quantity": 1,
            						"mrp": 620.3,
            						"product_name": "Maybelline New York Instant Age Rewind Eraser Dark Circles Treatment Concealer - 150 Neutralizer",
            						"price": 496.8
            				}
       		 				]
			}
}]

Response

{
    "status": "success"
}

API Error Codes

Error CodeError
400Bad Request | Missing Parameter - Activity Name
401Unauthorized | Invalid API Key
405Method Not Allowed
408Request Time Out
500Internal Server Error

Bulk Activity Upload

The Same API described above can be used to upload activities in bulk(Max:1000) at a time.

Sample JSON:

[
  {
      "asset_id": "sdbsjdh623jhmsndbkfs",
    	"activity_name":"Purchase",
      "timestamp":"2020-04-28T16:47:37",
      "identity":"CUSTOMER_ID",
      "activity_source":"web",
      "activity_params": {
          "customer_user_id": "xxxxxx",
          "total_item_qty": 2,
          "currency": "INR",
          "items": [
              {
                  "mrp": 250.0,
                  "l2_category": "Moisturizers",
                  "l3_category": "Serums & Essence",
                  "l1_category": "Skin",
                  "price": 250.0,
                  "quantity": 1,
                  "product_name": "L'Oreal Paris Revitalift Crystal Micro-Essence"
              },
              {
              "l1_category": "Makeup",
              "quantity": 1,
              "mrp": 620.20,
              "product_name": "Maybelline New York Instant Age Rewind Eraser Dark Circles Treatment Concealer - 150 Neutralizer",
              "price": 496.1
              }
          ]}
  },
  {
      "activity_name":"Checkout",
      "timestamp":"2020-04-28T16:40:37Z",
      "identity":"CUSTOMER_ID",
      "activity_source":"web",
      "activity_params": {
          "customer_user_id": "xxxxxx",
          "total_item_qty": "2",
          "currency": "INR",
          "items": [
              {
                  "mrp": "250.0",
                  "l2_category": "Moisturizers",
                  "l3_category": "Serums & Essence",
                  "l1_category": "Skin",
                  "price": "250.0",
                  "quantity": "1",
                  "product_name": "L'Oreal Paris Revitalift Crystal Micro-Essence"
              },
              {
              "l1_category": "Makeup",
              "quantity": "1",
              "mrp": "620.0",
              "product_name": "Maybelline New York Instant Age Rewind Eraser Dark Circles Treatment Concealer - 150 Neutralizer",
              "price": "496.0"
              }
          ]
  },
  {
      "activity_name":"Add To Cart",
      "timestamp":"2020-04-25T10:20:37Z",
      "identity":"CUSTOMER_ID",
      "activity_source":"web",
      "activity_params": {
          "customer_user_id": "xxxxxx",
          "total_item_qty": "2",
          "currency": "INR",
          "items": [
              {
                  "mrp": "250.0",
                  "l2_category": "Moisturizers",
                  "l3_category": "Serums & Essence",
                  "l1_category": "Skin",
                  "price": "250.0",
                  "quantity": "1",
                  "product_name": "L'Oreal Paris Revitalift Crystal Micro-Essence"
              },
              {
              "l1_category": "Makeup",
              "quantity": "1",
              "mrp": "620.0",
              "product_name": "Maybelline New York Instant Age Rewind Eraser Dark Circles Treatment Concealer - 150 Neutralizer",
              "price": "496.0"
              }
          ]
  }
]

The response and error codes are the same as defined above.