FoyerDevelopers

Generated · Live registry

rabattcodes tools

5 tools in this domain, generated from the running registry.

All tool domains

rabattcodes.aendern

writes

Changes a discount code (id) with all fields (code, art, wert, limits, aktiv). Without an actual change nothing is written (geaendert=false); otherwise an audit log entry is created with the value before and after. Owner only. Changes data. Mutation — changes data.

Input parameters

FieldTypeRequiredNotes
idstringyes
felderobjectyes
felder.codestringyes
felder.artenumyesOne of: prozent, betrag
felder.wertintegeryes
felder.minNaechteinteger · nullableyes
felder.aufenthaltVonstring · nullableyes
felder.aufenthaltBisstring · nullableyes
felder.buchbarVonstring · nullableyes
felder.buchbarBisstring · nullableyes
felder.maxEinloesungeninteger · nullableyes
felder.aktivbooleanyes

Output fields

FieldTypeRequiredNotes
idstringyes
geaendertbooleanyes

rabattcodes.anlegen

writes

Creates a discount code for the direct booking page: code, art (prozent or betrag), wert, optionally minNaechte, stay and booking period, maxEinloesungen, aktiv. The code is normalized; a code that is already taken returns CONFLICT. Owner only. Changes data and writes an audit log entry. Mutation — changes data.

Input parameters

FieldTypeRequiredNotes
codestringyes
artenumyesOne of: prozent, betrag
wertintegeryes
minNaechteinteger · nullableyes
aufenthaltVonstring · nullableyes
aufenthaltBisstring · nullableyes
buchbarVonstring · nullableyes
buchbarBisstring · nullableyes
maxEinloesungeninteger · nullableyes
aktivbooleanyes

Output fields

FieldTypeRequiredNotes
idstringyes
codestringyes

rabattcodes.liste

read-only

All codes of the property with redemptions x/max, newest first. Read-only query.

Input parameters

Returns object.

Output fields

Returns array of object. Fields of each element:

FieldTypeRequiredNotes
idstringyes
codestringyes
artenumyesOne of: prozent, betrag
wertnumberyes
minNaechtenumber · nullableyes
aufenthaltVonstring · nullableyes
aufenthaltBisstring · nullableyes
buchbarVonstring · nullableyes
buchbarBisstring · nullableyes
maxEinloesungennumber · nullableyes
aktivbooleanyes
erstelltAmstringyes
eingeloestnumberyes
vorgemerktnumberyes
rabattSummeCentsnumberyes
loeschbarbooleanyes

rabattcodes.loeschen

writesconfirm

Delete a discount code that has NEVER been used (no redemption, no pending Stripe checkout). A used code cannot be deleted — deactivate it with rabattcodes.setzeAktiv instead. Irreversible. Requires confirmation.

Input parameters

FieldTypeRequiredNotes
idstringyes

Output fields

FieldTypeRequiredNotes
idstringyes

rabattcodes.setzeAktiv

writes

Deactivate (and reactivate again) — the way to handle codes that have been used. Mutation — changes data.

Input parameters

FieldTypeRequiredNotes
idstringyes
aktivbooleanyes

Output fields

FieldTypeRequiredNotes
idstringyes
aktivbooleanyes
geaendertbooleanyes