Skip to content
You are reading the pinned copy of v1.0, which is also the latest release. Read the latest.

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.

Get automatic promotions

Request body: GetAutomaticPromotionsDto.

Responses:

  • 200: Promotions retrieved.

Validate coupon code

Request body: ValidateCouponDto.

Responses:

  • 200: Coupon validated.
  • 400: Invalid coupon.
  • productId (string, required).
  • categoryId (string, required).
  • quantity (number, min 1, required).
  • unitPrice (number, min 0, required).
  • subtotal (number, min 0, required).
  • items (array of CartItemDto, required).
  • userId (string, optional).
  • code (string, required).
  • subtotal (number, min 0, required).
  • items (array of CartItemDto, required).
  • userId (string, optional).
As seen on Open Source Alternatives The Merchant Engine badge