Cart & Checkout Attributes: Shop API
Shop API endpoints for the kill switch and the per-attribute display configuration, filters and error behaviour of the Sylius plugin.
Cart & Checkout Attributes: Shop API
Endpoints
| Method | Path | Description |
|---|---|---|
| GET | /api/v2/shop/cart-checkout-attributes-settings |
Returns the kill switch state |
| GET | /api/v2/shop/cart-checkout-attribute-display-configs |
Collection of all display configs, filterable |
| GET | /api/v2/shop/cart-checkout-attribute-display-configs/{id} |
A single display config |
All three endpoints are publicly reachable (PUBLIC_ACCESS, like any other Shop API resource) and strictly read-only - there is no POST/PUT, write access goes exclusively through the admin form.
Fields
cart-checkout-attributes-settings
| Field | Type | Description |
|---|---|---|
active |
bool | Kill switch state |
cart-checkout-attribute-display-configs
| Field | Type | Description |
|---|---|---|
attribute |
IRI | Reference to /api/v2/shop/product-attributes/{code} |
visibleInCart |
bool | Matches the admin field "Show in cart" |
checkoutVisibility |
string | not_visible | visible | mandatory |
Filtering
curl "https://shop.example.com/api/v2/shop/cart-checkout-attribute-display-configs?attribute.code=material"
The filter uses
#[ApiFilter(SearchFilter::class)], an attribute marked deprecated since API Platform 4.4 (superseded by#[QueryParameter]). It is kept deliberately for backward compatibility with API Platform 4.2.
Error behaviour
| Situation | Settings endpoint | Display-config endpoint |
|---|---|---|
| Table does not exist (migration missing) | degrades to active: false |
empty collection / 404 instead of 500 |
| Expected column missing (incomplete migration) | - | empty collection / 404 instead of 500 |
| Any other database error | degrades to active: false |
500 (deliberately, since "Mandatory" flags are legally relevant) |
curl "https://shop.example.com/api/v2/shop/cart-checkout-attributes-settings"
# {"active": true}