Overview / Catalog / Update a campaign

Update a campaign

patch https://api.flactrum.com/v1/campaigns/{campaign}
Required scope campaigns.write
Success status200
Returns One Campaign object

Parameters

NameInTypeDescription
campaign * path string ULID of the record.

Request body

FieldTypeDescription
name * string —
description string|null —
discount_type * string —
discount_value * number Percentage discounts cannot exceed 100.
starts_at * string —
ends_at * string Must be after starts_at.
is_active boolean —
priority integer —
branch_ids array Omit or send empty for a brand-wide campaign.
product_ids array —
category_ids array Leave both target lists empty to cover the whole menu.

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 PATCH 'https://api.flactrum.com/v1/campaigns/01m43mxrgbecaqp1mgw4b1x3ty' \
  -H 'Authorization: Bearer flk_your_key:your_secret' \
  -H 'Content-Type: application/json' \
  -d '{
    "priority": 5
}'

HTTP 200 · application/json

{
    "data": {
        "id": "01m43mxrgbecaqp1mgw4b1x3ty",
        "name": "Kampanya",
        "description": null,
        "discount_type": "percent",
        "discount_value": 20,
        "discount_label": "%20 indirim",
        "starts_at": "2026-10-03T14:26:12+00:00",
        "ends_at": "2026-10-11T14:26:12+00:00",
        "is_active": true,
        "priority": 5,
        "is_running": true,
        "status": "Yayında",
        "branch_ids": [],
        "product_ids": [],
        "category_ids": [],
        "targets_whole_menu": true,
        "created_at": "2026-10-04T14:26:12+00:00",
        "updated_at": "2026-10-04T14:26:12+00:00"
    }
}