GET
/
campaigns
curl --request GET \
  --url https://app.masivo.ai/api/storefront/v1/campaigns \
  --header 'Authorization: Bearer <token>'
{
  "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
    }
  ],
  "from": 0,
  "to": 9,
  "count": 10
}

Authorizations

Authorization
string
header
required

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

Query Parameters

from
string
required

Starting record index, starting from 0

to
string
required

Ending record index, starting from 0

type
enum<string>

Filter by campaign type

Available options:
BEHAVIOR,
COUPONS
brand_id
string | null

Filter by brand id

customer_id
string

Filter campaigns that a customer can participate

status
enum<string>

Filter by campaign status

Available options:
RUNNING,
PAUSED,
SCHEDULED,
FINISHED,
NOT FINISHED
labels
string

Filter by campaign labels (, separated values)

funded_by
string

Filter by funder

includes
enum<string>

Whether to include additional data inside attributes

Available options:
CODES_SUMMARY

Response

200 - application/json
Ok
data
object[]
from
number

The starting record index

Example:

0

to
number

The ending record index

Example:

9

count
number

The total number of campaigns

Example:

10