Overview / Catalog / List campaigns

List campaigns

get https://api.flactrum.com/v1/campaigns
Required scope campaigns.read
Panel screenMenu & products → Campaigns
Success status200
Returns A paginated list of Campaign objects

Parameters

NameInTypeDescription
running query boolean Only campaigns in force right now.
branch_id query string Campaigns valid at this branch, including brand-wide ones.
product_id query string —
page query integer Page number.
per_page query integer Page size. Values above the maximum are rejected rather than silently clamped.
active query boolean Filter by active flag. Omit to get both.
updated_since query string Only records changed at or after this instant. Use it for incremental sync.
sort query string Column to sort by. Each endpoint lists what it accepts.
direction query string Sort direction.

Response fields

FieldTypeDescription
id string —
name string —
description string|null —
discount_type string —
discount_value number —
discount_label string Human-readable summary, e.g. "%20 indirim".
starts_at string —
ends_at string —
is_active boolean —
priority integer When several campaigns hit one product, the highest priority wins. Campaigns never stack.
is_running boolean —
status string —
branch_ids array Empty means the campaign is brand-wide.
product_ids array —
category_ids array —
targets_whole_menu boolean True when no product or category was targeted.

Examples

Recorded from the test suite — these are real requests and their real responses.

curl -X GET 'https://api.flactrum.com/v1/campaigns?running=true' \
  -H 'Authorization: Bearer flk_your_key:your_secret' \
  -H 'Accept: application/json'

HTTP 200 · application/json

{
    "data": [
        {
            "id": "01m43mxr6xzz9nzb8a1d183b37",
            "name": "Öğrenci indirimi",
            "description": null,
            "discount_type": "percent",
            "discount_value": 15,
            "discount_label": "%15 indirim",
            "starts_at": "2026-10-04T00:00:00+00:00",
            "ends_at": "2026-11-04T14:26:12+00:00",
            "is_active": true,
            "priority": 10,
            "is_running": true,
            "status": "Yayında",
            "branch_ids": [
                "01m43mxr503htvc04sjffmvhmb"
            ],
            "product_ids": [],
            "category_ids": [
                "01m43mxr5baccj0x7w99cwxd9y"
            ],
            "targets_whole_menu": false,
            "created_at": "2026-10-04T14:26:12+00:00",
            "updated_at": "2026-10-04T14:26:12+00:00"
        }
    ],
    "meta": {
        "total": 1,
        "page": 1,
        "per_page": 25,
        "last_page": 1
    }
}