Skip to main content
POST
/
behavior
/
events
cURL
curl --request POST \
  --url https://app.masivo.ai/api/storefront/v1/behavior/events \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "customer_id": "<string>",
  "brand_id": "<string>",
  "type": "PURCHASE",
  "platform": "<string>",
  "fulfilled": true,
  "reserve": 1,
  "redeem": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "amount": 1
    }
  ],
  "tags": {},
  "referral_code": "<string>",
  "metadata": {},
  "issued_at": "2026-03-25T10:00:00.000Z"
}
'
{
  "data": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "type": "PURCHASE",
    "data": {},
    "fulfilled": true,
    "reserve": 123,
    "queue_message_id": "<string>",
    "rewarding_campaigns": "<array>",
    "status": "PENDING",
    "result": {
      "wallet": {},
      "customer": {},
      "gift_card": [
        {
          "code": "<string>",
          "reward_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "rewarded_at": "2023-11-07T05:31:56Z",
          "description": "<string>",
          "expired_at": "2023-11-07T05:31:56Z",
          "redeemed_at": "2023-11-07T05:31:56Z"
        }
      ],
      "accumulations": [
        {
          "amount": 123,
          "reward_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "campaign_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "brand_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "issued_at": "2023-11-07T05:31:56Z",
          "expiration_date": "2023-11-07T05:31:56Z",
          "reservation_expires_at": "2023-11-07T05:31:56Z"
        }
      ],
      "redemptions": [
        {
          "amount": 123,
          "reward_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "campaign_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "brand_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "issued_at": "2023-11-07T05:31:56Z",
          "expiration_date": "2023-11-07T05:31:56Z",
          "reservation_expires_at": "2023-11-07T05:31:56Z"
        }
      ],
      "transactions": [
        {
          "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "brand_id": "<string>",
          "event_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "campaign_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "channel_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "store_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "funded_by": "MARKETING",
          "event_type": "PURCHASE",
          "reward_type": "POINTS",
          "reward_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "amount": 123,
          "cost": 123,
          "details": "<string>",
          "type": "ACCUMULATION",
          "receiver_id": "<string>",
          "sender_id": "<string>",
          "created_at": "2023-11-07T05:31:56Z",
          "issued_at": "2023-11-07T05:31:56Z",
          "attributes": {
            "line": {
              "amount": 123,
              "reward_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
              "campaign_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
              "brand_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
              "issued_at": "2023-11-07T05:31:56Z",
              "expiration_date": "2023-11-07T05:31:56Z",
              "reservation_expires_at": "2023-11-07T05:31:56Z"
            },
            "campaign_name": "<string>"
          },
          "metadata": {}
        }
      ],
      "customer_by_tier": [
        {}
      ]
    },
    "issued_at": "2023-11-07T05:31:56Z",
    "processing_at": "2023-11-07T05:31:56Z",
    "resolved_at": "2023-11-07T05:31:56Z",
    "cancelled_at": "2023-11-07T05:31:56Z",
    "expired_at": "2023-11-07T05:31:56Z",
    "reversed_at": "2023-11-07T05:31:56Z"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.masivo.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
customer_id
string
required

The customer unique identifier in your system

brand_id
string
required

The id of the brand that originate the event

type
string
required

The type of the event

Example:

"PURCHASE"

platform
string | null

Platform name where the event originated

order
object

The order in case of a PURCHASE event

product
object

The product in case of an ADD_TO_CART event

fulfilled
boolean
default:true

If the event was fulfilled, when false, rewards to be redeemed will be reserved until fulfilled

reserve
number<int2>
default:1

The number of days to reserve the rewards

redeem
object[]

The rewards to redeem in the order

tags
object

Include your conditions event tags here

referral_code
string

(Optional) The referral code to track the event

metadata
object

Include any additional info here

issued_at
string<date-time>

Optional ISO 8601 timestamp of when the event occurred. Must be within the last 72 hours and cannot be in the future. Defaults to the current server time if not provided.

Example:

"2026-03-25T10:00:00.000Z"

Response

Event enqueued for processing

data
object