Promotions (storefront API)
Storefront and customer routes of the promotions module. Send Accept-Language (or X-Locale from a browser) on every call; a customer route needs the session cookie.
POST /v1/promotions/automatic
Section titled “POST /v1/promotions/automatic”Get automatic promotions
Request body: GetAutomaticPromotionsDto.
Responses:
200: Promotions retrieved.
POST /v1/promotions/validate-coupon
Section titled “POST /v1/promotions/validate-coupon”Validate coupon code
Request body: ValidateCouponDto.
Responses:
200: Coupon validated.400: Invalid coupon.
Schemas
Section titled “Schemas”CartItemDto
Section titled “CartItemDto”productId(string, required).categoryId(string, required).quantity(number, min 1, required).unitPrice(number, min 0, required).
GetAutomaticPromotionsDto
Section titled “GetAutomaticPromotionsDto”subtotal(number, min 0, required).items(array of CartItemDto, required).userId(string, optional).
ValidateCouponDto
Section titled “ValidateCouponDto”code(string, required).subtotal(number, min 0, required).items(array of CartItemDto, required).userId(string, optional).