Frontend | Backend | Api

Discounts routes (Backend)

Name Request Response variables Description
addDiscount

GET /cdna-admin/discounts/add-discount

Name Type Description
discount Discount Single (empty) Discount record
Add a new record. Assigns an empty record to the template.
editDiscount

GET /cdna-admin/discounts/discount/{id}

id \d+
Name Type Description
discount Discount Retrieved Discount record
Retrieve a single record and display the edit page for the record
manageDiscounts

GET /cdna-admin/discounts/discounts

Name Type Description
discounts Collection (Discount) Collection of Discounts
Retrieve available records and assign them to the template for editing.
addRule

GET /cdna-admin/discounts/add-rule/{discount.id}

discount.id \d+
Name Type Description
rule Rule Single (empty) Rule record
Add a new record. Assigns an empty record to the template.
editRule

GET /cdna-admin/discounts/rule/{id}

id \d+
Name Type Description
rule Rule Retrieved Rule record
Retrieve a single record and display the edit page for the record
manageRules

GET /cdna-admin/discounts/rules/{discount.id}

discount.id \d+
Name Type Description
rules Collection (Rule) Collection of Rules
Retrieve available records and assign them to the template for editing.
addCode

GET /cdna-admin/discounts/add-code/{discount.id}

discount.id \d+
Name Type Description
code Code Single (empty) Code record
Add a new record. Assigns an empty record to the template.
editCode

GET /cdna-admin/discounts/code/{id}

id \d+
Name Type Description
code Code Retrieved Code record
Retrieve a single record and display the edit page for the record
manageCodes

GET /cdna-admin/discounts/codes/{discount.id}

discount.id \d+
Name Type Description
codes Collection (Code) Collection of Codes
Retrieve available records and assign them to the template for editing.
addCondition

GET /cdna-admin/discounts/add-condition/{type}/{rule.id}

type [a-zA-Z]+
rule.id \d+
Add a new record. Assigns an empty record to the template.
addAction

GET /cdna-admin/discounts/add-action/{type}/{rule.id}

type [a-zA-Z]+
rule.id \d+
Add a new record. Assigns an empty record to the template.