Shop discounts
Discount codes and automatic discounts.
Module: Online shop (shop).
Endpoints
Section titled “Endpoints”GET /api/v1/shop_discounts- List with filters, sorting and pagination (scopeshop:read)GET /api/v1/shop_discounts/{id}- A record by id (scopeshop:read)POST /api/v1/shop_discounts- Create a record (scopeshop:write)PATCH /api/v1/shop_discounts/{id}- Modify the submitted fields (scopeshop:write)DELETE /api/v1/shop_discounts/{id}- Delete or deactivate (scopeshop:write)
Fields
Section titled “Fields”id(string, uuid; read): Unique identifier (UUID).code(string; write)type(string; write, required)value(number; write)applicability(string; write)target_ids(array; write)min_order(number; write)starts_at(string, date-time; write)ends_at(string, date-time; write)max_uses(number; write)max_per_customer(number; write)channel_ids(array; write)is_active(boolean; write): Whether the record is active.created_at(string, date-time; read): Creation date (ISO 8601).updated_at(string, date-time; read): Last modification date (ISO 8601).customer_ids(array; write)customer_emails(array; write)
Events
Section titled “Events”shop_discounts.createdshop_discounts.updatedshop_discounts.deleted