What
Expose Rohlík's minimum order value (the threshold under which an order cannot be submitted) on a typed model, if any of the endpoints the client already calls returns it.
Why
The Home Assistant integration (HA-RohlikCZ) and the dashboard cards (rohlik-cz-HA-cards) currently have no way to tell a user whether the cart is above the minimum. The cards therefore fall back to a manually configured min_order option.
The only related field the client exposes today is Cart.can_make_order, taken from submitConditionPassed in Cart.from_api (rohlik_api/models.py). That flag only turns true once a delivery slot, address and payment are all set at checkout, so it is not usable as a minimum-order indicator.
Where it might be
Not verified against a live response yet, so this needs a look at the raw JSON of:
POST /services/frontend-service/login (client.login()), which the integration keeps raw; the user.premium.premiumLimits.ordersWithoutPriceLimit structure suggests a "price limit" concept exists somewhere in the account data.
GET /services/frontend-service/v2/cart (CartService.get_content()): Cart.from_api keeps only totalPrice, items and submitConditionPassed; the payload may carry a minimum / price-limit field (or a structured list of submit conditions) that is currently dropped.
GET /services/frontend-service/first-delivery?reasonableDeliveryTime=true (DeliveryService.get_info()).
Proposed shape
Cart.minimum_order_price: float | None (CZK), None when the API does not provide it, plus Cart.currency if available.
- Optionally the same value on whatever account/delivery model is the natural home for it, and a note in the README on which endpoint it comes from.
Once available, the integration can publish it as an attribute on the cart-price sensor and the cards will prefer it automatically over the manual option.
What
Expose Rohlík's minimum order value (the threshold under which an order cannot be submitted) on a typed model, if any of the endpoints the client already calls returns it.
Why
The Home Assistant integration (HA-RohlikCZ) and the dashboard cards (rohlik-cz-HA-cards) currently have no way to tell a user whether the cart is above the minimum. The cards therefore fall back to a manually configured
min_orderoption.The only related field the client exposes today is
Cart.can_make_order, taken fromsubmitConditionPassedinCart.from_api(rohlik_api/models.py). That flag only turns true once a delivery slot, address and payment are all set at checkout, so it is not usable as a minimum-order indicator.Where it might be
Not verified against a live response yet, so this needs a look at the raw JSON of:
POST /services/frontend-service/login(client.login()), which the integration keeps raw; theuser.premium.premiumLimits.ordersWithoutPriceLimitstructure suggests a "price limit" concept exists somewhere in the account data.GET /services/frontend-service/v2/cart(CartService.get_content()):Cart.from_apikeeps onlytotalPrice,itemsandsubmitConditionPassed; the payload may carry a minimum / price-limit field (or a structured list of submit conditions) that is currently dropped.GET /services/frontend-service/first-delivery?reasonableDeliveryTime=true(DeliveryService.get_info()).Proposed shape
Cart.minimum_order_price: float | None(CZK),Nonewhen the API does not provide it, plusCart.currencyif available.Once available, the integration can publish it as an attribute on the cart-price sensor and the cards will prefer it automatically over the manual option.