Aktionen & Gutscheine — API und MCP
Überblick
Dieser Bereich stellt 10 Operationen bereit. Jede davon ist zugleich ein MCP-Werkzeug.
Der Bereich hängt am Modul-Schalter module.promotions. Ist das Modul aus, antworten diese Operationen mit 404.
Operationen
| Methode | Pfad | Zweck | Recht | Parameter |
|---|---|---|---|---|
GET | /api/v1/promotions/campaigns | Liste der Promotion | promotions.campaign.view · promotions.campaign.manage | page, active, current, customerGroupId, q |
POST | /api/v1/promotions/campaigns | Creates a Promotion resource. — Legt eine Aktion an. Ohne rules bepreist sie nichts — eine Aktion ohne Regel ist gültig, aber wirkungslos. | promotions.campaign.manage | + Rumpf |
DELETE | /api/v1/promotions/campaigns/{ulid} | Eine Promotion löschen | promotions.campaign.manage | ulid |
GET | /api/v1/promotions/campaigns/{ulid} | Eine Promotion lesen | promotions.campaign.view · promotions.campaign.manage | ulid |
PATCH | /api/v1/promotions/campaigns/{ulid} | Updates the Promotion resource. — Ändert eine Aktion. Mitgesendete rules ERSETZEN den Regelsatz vollständig; ohne rules bleibt er unverändert. | promotions.campaign.manage | ulid, + Rumpf |
GET | /api/v1/promotions/vouchers | Liste der Voucher | promotions.voucher.view · promotions.voucher.manage | page, code, kind, active, redeemable, customerId, q |
POST | /api/v1/promotions/vouchers | Creates a Voucher resource. — Stellt einen Gutschein aus. Ohne code erzeugt der Server einen; mit codeCount > 1 eine ganze Serie (Antwort: der erste, die übrigen über die Liste). rateType=amount startet mit valueAmount als Restwert. kind legt die Art fest — discount (Standard, Rabatt am Auftrag) oder credit (gekauftes Guthaben, nur an der Kasse; verlangt rateType=amount). | promotions.voucher.manage | + Rumpf |
DELETE | /api/v1/promotions/vouchers/{ulid} | Removes the Voucher resource. — Soft-Delete. Ein bereits eingelöster Gutschein wird nicht gelöscht (409) — sonst stünde eine Beleg-Position ohne Herkunft da. | promotions.voucher.manage | ulid |
GET | /api/v1/promotions/vouchers/{ulid} | Eine Voucher lesen | promotions.voucher.view · promotions.voucher.manage | ulid |
PATCH | /api/v1/promotions/vouchers/{ulid} | Updates the Voucher resource. — Ändert einen Gutschein. Der Restwert lässt sich NICHT frei setzen — er ist das Ergebnis der Einlösungen; nur active sperrt einen Gutschein. kind ist nur änderbar, solange nichts eingelöst wurde (409) — an der Art hängt die Umsatzsteuer. | promotions.voucher.manage | ulid, + Rumpf |
Zweckangaben, die nicht dem Standardmuster folgen, stammen unverändert aus der Schnittstellen-Beschreibung im Code.