vouchers/ endpoint provides you with an interface for managing vouchers in our shop system. With this interface, you can create vouchers, delete them, create templates, and view existing vouchers.
Supported methods
List of all supported methods.Data fields
Data fields of a voucher
Example
Data fields of a voucher charge
Example
Data fields of a voucher blueprint
Further fields match the fields of vouchers.
Example
Data fields of a voucher preset
Example
Methods for managing vouchers
This section describes all endpoints for managing individual vouchers. Through the interface, vouchers can be created, updated, deleted, and retrieved. The management of voucher charges is handled separately in its own section. For all operations, corresponding read, write, create, or delete permissions are required.GET vouchers
This method returns a paginated list of all vouchers present in the system. Filter and sort parameters can be used to specifically restrict and order the results. The returned voucher data includes information on activity, validity, redemption conditions, and value specifications. Read permissions are required for access.Example
Response
Filter fields
id, active, pool, chargeId, createdAt, updatedAt, validFrom, validUntil, maxUseCount
Sort fields
id, active, pool, chargeId, createdAt, updatedAt, validFrom, validUntil, maxUseCount
Error codes
PUT vouchers/{id} - Coming soon
This method updates the properties of an existing voucher by its unique ID. Through the request body, various fields such as activation status, validity periods, values, or redemption conditions can be changed. On successful update, a confirmation is returned. Write permissions for voucher data are required.This method is not yet implemented and is planned for a future version.
Example
Response
Error codes
POST vouchers
This method creates one or more new vouchers. The vouchers can either be assigned to a new charge or appended to an existing charge. For a new charge to be created, thechargeId field in the request body must be empty.
A maximum of 10,000 vouchers can be created per request. On successful creation, the associated charge ID as well as the number of created vouchers are returned.
Create permissions for voucher data are required.
Example
Request body
Response
Error codes
DELETE vouchers/{id}
This method deletes an existing voucher by its unique ID. On successful deletion, the ID of the removed voucher is returned as confirmation. Delete permissions for voucher data are required for execution.Example
Response
Error codes
POST vouchers/bulk
This method allows you to create or update multiple vouchers in a single request (bulk import). The request body must contain a JSON array in which each element is an object with adata field that contains the voucher data.
A maximum of 10,000 entries can be provided per request. Invalid entries are skipped and listed under skippedLines in the response.
If a voucher with the same ID already exists, it is checked whether the data is compatible. With the query parameter ?force, an update can be forced.
Create permissions for voucher data are required.
Example
Query parameters
Request body
Response
Response with skipped lines
Error codes
DELETE vouchers/bulk
This method allows you to delete multiple vouchers in a single request. The request body must contain a JSON array in which each element is an object with theid of the voucher to be deleted.
A maximum of 10,000 entries can be provided per request. Invalid entries are skipped and listed under skippedItems in the response.
Delete permissions for voucher data are required.
Example
Request body
Data fields per entry
Response
Response with skipped entries
Error codes
Methods for voucher charges
This section describes all endpoints for managing voucher charges. A voucher charge is a group of vouchers that can be created and managed together. Through the interface, charges can be listed, filtered, created, updated, exported, and deleted. In addition, creator information and labels of existing charges can be retrieved. For all operations, corresponding read, write, create, or delete permissions are required.GET vouchers/charges
This method returns a paginated list of all voucher charges present in the system. Filter and sort parameters can be used to restrict and order the list by various criteria. The returned data contains information about the charge itself as well as the associated voucher settings. Read permissions are required for access.Example
Response
Filter fields
id, createdAt, updatedAt, type, name, creator, labels, description
Sort fields
id, createdAt, updatedAt, type, name, creator, description
Error codes
GET vouchers/charges/creators
This method returns a list of user accounts with IDs and emails that have created voucher charges. For manually created charges, the name corresponds to the email address of the user account; for imported charges, “Import” is displayed instead. Read permissions are required for access.Example
Response
Error codes
GET vouchers/charges/labels
This method returns a list of all labels assigned to voucher charges. Labels are used for categorizing charges and are considered in the full-text search. Access to this information requires read permissions for voucher data.Example
Response
Error codes
PUT vouchers/charges/{chargeid} - Coming soon
This method updates the properties of an existing voucher charge by its unique ID. Through the request body, fields such as name, description, or additional labels can be changed. On successful update, a confirmation is returned. Write permissions for voucher data are required.This method is not yet implemented and is planned for a future version.
Example
Response
Error codes
DELETE vouchers/charges/{chargeid}
This method deletes an existing voucher charge together with all vouchers it contains by the specified charge ID. On successful deletion, the ID of the removed charge is returned as confirmation. Delete permissions for voucher data are required for execution.Example
Response
Error codes
Methods for voucher blueprints
This section describes all endpoints for managing voucher blueprints (templates). Voucher blueprints define predefined configurations such as discount types, validity periods, values, and other conditions for vouchers. Through the interface, blueprints can be created, updated, retrieved, deleted, and organized with labels. Note: ThetemplateId field internally corresponds to the name column in the database. Despite this assignment, however, within the API you may not sort or filter by name, nor query or set the value explicitly. All operations are performed exclusively via templateId.
For all operations, corresponding read, write, create, or delete permissions are required.
GET vouchers/templates
This method returns a paginated list of all existing voucher blueprints (templates). Filter and sort parameters can be used to restrict and order the list. The blueprints define default values for vouchers or voucher charges that can later be created based on these blueprints. Read permissions are required for access.Example
Response
Filter fields
templateId, chargeId, labels, value, active, createdAt, updatedAt, validFrom, validUntil, maxUseCount
Sort fields
id, templateId, chargeId, createdAt, updatedAt, active, validFrom, validUntil, maxUseCount
Error codes
GET vouchers/templates/labels
This method returns a list of all labels assigned to voucher blueprints (templates). Labels are used for categorizing blueprints and are considered in the full-text search. Read permissions are required for access.Example
Response
Error codes
PUT vouchers/templates/{templateId}
This method updates the properties of an existing voucher blueprint (template) by its unique ID, where the ID corresponds to the name of the blueprint. Through the request body, fields such as name, status, values, types, or labels can be adjusted. On successful update, thetemplateId of the edited blueprint is returned.
Write permissions for voucher data are required.
Example
Request
Response
Error codes
POST vouchers/templates
This method creates a new voucher blueprint (template) based on the submitted configuration data. The request body must contain a uniquetemplateId and a data object with the relevant voucher settings. On successful creation, the ID of the new blueprint is returned.
Create permissions for voucher data are required.
Example
Request body
Response
Error codes
DELETE vouchers/templates/{templateId}
This method deletes an existing voucher blueprint (template) by its unique ID, where the ID corresponds to the name of the blueprint. On successful deletion, thetemplateId of the removed blueprint is returned as confirmation.
Delete permissions for voucher data are required for execution.
Example
Response
Error codes
Methods for voucher presets
This section describes all endpoints for managing voucher presets. In contrast to voucher blueprints, which can be flexibly created and adapted by users, voucher presets are standardized structures that define specific types or properties of vouchers. Presets serve as a basis for creating new vouchers according to fixed specifications and are often more tightly coupled to the system. Through the interface, these presets can be retrieved and adjusted as needed. For all operations, corresponding read and write permissions are required. Note: ThepresetId field internally corresponds to the name column in the database. Despite this assignment, however, within the API you may not sort or filter by name, nor query or set the value directly. All operations are performed exclusively via presetId.
GET vouchers/presets
This method returns a paginated list of all existing voucher presets. Filter and sort parameters can be used to restrict and order the list by properties such as system status or creation date. The presets contain predefined settings for creating new vouchers. Read permissions are required for access.Example
Response
Filter fields
presetId, system, createdAt, updatedAt
Sort fields
presetId, system, createdAt, updatedAt
Error codes
GET vouchers/presets/labels
This method returns a list of all labels assigned to voucher presets. Labels are used for categorizing presets and are considered in the full-text search. Read permissions are required for access to this information.Example
Response
Error codes
PUT vouchers/presets/{presetid}
This method updates the properties of an existing voucher preset by its unique ID, where the ID corresponds to the name of the preset. Through the request body, the new settings of the preset are provided, including discount types, values, terms of use, and further attributes. On successful update, the ID of the changed preset is returned. Write permissions for voucher data are required.Example
Request body
Response
Error codes
POST vouchers/presets
This method creates a new voucher preset based on the submitted configuration data. The request body must contain a uniquepresetId and a data object with the relevant voucher settings. On successful creation, the ID of the new preset is returned.
Create permissions for voucher data are required.
