API Documentation
Endpoints
- Auth
- Brands
- Tiers
- Rewards
- Customers
- Campaigns
- Behavior
- Coupons
- GETGet campaign
- GETGet campaigns
- POSTCreate a new campaign
- Transactions
- Push notifications
- Migrate
- Maintenance
Guides
Resources
Create a new campaign
Create a campaign
curl --request POST \
--url https://app.masivo.ai/api/storefront/v1/campaigns \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"brand_id": "<string>",
"name": "<string>",
"description": "<string>",
"type": "BEHAVIOR",
"rules": [
{
"conditions": [
[
{
"type": "Order Value",
"operator": "grater than",
"primitive": "string",
"value": 9.95
}
]
],
"effects": [
{
"reward_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "POINTS",
"tier_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reward": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"brand_id": "<string>",
"name": "<string>",
"description": "<string>",
"type": "POINTS",
"conditions": [
[
{
"type": "Order Value",
"operator": "grater than",
"primitive": "string",
"value": 9.95
}
]
],
"attributes": {
"conversion_factor": 0.1
}
},
"expiration_date": "12/months",
"amount": 1
}
]
}
],
"attributes": {
"trigger": "PURCHASE",
"privacy": "PRIVATE"
},
"status": "RUNNING",
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z",
"funded_by": "<string>",
"budget": 1000
}'
{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"brand_id": "<string>",
"name": "<string>",
"description": "<string>",
"type": "BEHAVIOR",
"rules": [
{
"conditions": [
[
{
"type": "Order Value",
"operator": "grater than",
"primitive": "string",
"value": 9.95
}
]
],
"effects": [
{
"reward_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "POINTS",
"tier_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reward": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"brand_id": "<string>",
"name": "<string>",
"description": "<string>",
"type": "POINTS",
"conditions": [
[
{
"type": "Order Value",
"operator": "grater than",
"primitive": "string",
"value": 9.95
}
]
],
"attributes": {
"conversion_factor": 0.1
}
},
"expiration_date": "12/months",
"amount": 1
}
]
}
],
"attributes": {
"trigger": "PURCHASE",
"privacy": "PRIVATE"
},
"status": "RUNNING",
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z",
"funded_by": "<string>",
"budget": 1000
}
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
The brand id of the campaign, null if is a global campaign
The name of the campaign
The description of the campaign
The type of the campaign
BEHAVIOR
, COUPONS
OR conditions
AND conditions
The reward id to apply
The type of reward
POINTS
, DISCOUNT
, GIFT_CARD
, PRODUCT
The tier to offer the reward. Null if is for all tiers
The reward internal unique identifier
The brand id of the reward, null if is a global reward
The name of the reward
The description of the reward
The type of the reward
POINTS
, DISCOUNT
, GIFT_CARD
, PRODUCT
OR conditions
AND conditions
Rewards duration since issued
"12/months"
The amount of the reward
1
The status of the campaign
RUNNING
, PAUSED
, SCHEDULED
, FINISHED
The start date of the campaign
The end date of the campaign
Who is funding these campaign
The budget of the campaign
1000
Response
The campaign internal unique identifier
The brand id of the campaign, null if is a global campaign
The name of the campaign
The description of the campaign
The type of the campaign
BEHAVIOR
, COUPONS
OR conditions
AND conditions
The reward id to apply
The type of reward
POINTS
, DISCOUNT
, GIFT_CARD
, PRODUCT
The tier to offer the reward. Null if is for all tiers
The reward internal unique identifier
The brand id of the reward, null if is a global reward
The name of the reward
The description of the reward
The type of the reward
POINTS
, DISCOUNT
, GIFT_CARD
, PRODUCT
OR conditions
AND conditions
The attributes of the reward
Rewards duration since issued
"12/months"
The amount of the reward
1
The status of the campaign
RUNNING
, PAUSED
, SCHEDULED
, FINISHED
The start date of the campaign
The end date of the campaign
Who is funding these campaign
The budget of the campaign
1000
curl --request POST \
--url https://app.masivo.ai/api/storefront/v1/campaigns \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"brand_id": "<string>",
"name": "<string>",
"description": "<string>",
"type": "BEHAVIOR",
"rules": [
{
"conditions": [
[
{
"type": "Order Value",
"operator": "grater than",
"primitive": "string",
"value": 9.95
}
]
],
"effects": [
{
"reward_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "POINTS",
"tier_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reward": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"brand_id": "<string>",
"name": "<string>",
"description": "<string>",
"type": "POINTS",
"conditions": [
[
{
"type": "Order Value",
"operator": "grater than",
"primitive": "string",
"value": 9.95
}
]
],
"attributes": {
"conversion_factor": 0.1
}
},
"expiration_date": "12/months",
"amount": 1
}
]
}
],
"attributes": {
"trigger": "PURCHASE",
"privacy": "PRIVATE"
},
"status": "RUNNING",
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z",
"funded_by": "<string>",
"budget": 1000
}'
{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"brand_id": "<string>",
"name": "<string>",
"description": "<string>",
"type": "BEHAVIOR",
"rules": [
{
"conditions": [
[
{
"type": "Order Value",
"operator": "grater than",
"primitive": "string",
"value": 9.95
}
]
],
"effects": [
{
"reward_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "POINTS",
"tier_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reward": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"brand_id": "<string>",
"name": "<string>",
"description": "<string>",
"type": "POINTS",
"conditions": [
[
{
"type": "Order Value",
"operator": "grater than",
"primitive": "string",
"value": 9.95
}
]
],
"attributes": {
"conversion_factor": 0.1
}
},
"expiration_date": "12/months",
"amount": 1
}
]
}
],
"attributes": {
"trigger": "PURCHASE",
"privacy": "PRIVATE"
},
"status": "RUNNING",
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z",
"funded_by": "<string>",
"budget": 1000
}
}