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:
| Region | Base URL |
|---|---|
| US | <https://api2.netcoresmartech.com/v1/activity/upload> |
| India | https://apiin2.netcoresmartech.com/v1/activity/upload |
| EU | https://apieu2.netcoresmartech.com/v1/activity/upload |
Request Headers
| Key | Type | Description | Value | Required? |
|---|---|---|---|---|
Content-Type | String | JSON format for the request payload | application/json | No |
api-key | String | API key for authentication | 0000eee0e00e0e00e0e0e | Yes |
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,mobile, oranonid.
| Parameter | Description | Data Type | Required |
|---|---|---|---|
| asset_id | Pass website_id or app_id for which the activity is mapped. | String | Yes |
| activity_name | Name of the activity or event being recorded. | String | Yes |
| timestamp | This 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-Time | Yes |
| identity | Primary 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/Integer | No |
| Email Address of the user associated with the event. Note: At least one of the identifiers is required: identity, email, mobile, or anonid. | String | No | |
| mobile | Mobile number of the user associated with the event. Note: At least one of the identifiers is required: identity, email, mobile, or anonid. | String | No |
| anonid | Anonymous 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. | String | No |
| activity_source | Source of the event. Indicates whether the event originated from a website or mobile app. Valid values: web, app.y | String 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_params | The activity_params object holds event-specific metadata.
| Object | Yes |
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 Code | Error |
|---|---|
| 400 | Bad Request | Missing Parameter - Activity Name |
| 401 | Unauthorized | Invalid API Key |
| 405 | Method Not Allowed |
| 408 | Request Time Out |
| 500 | Internal 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.
Updated 11 days ago
