Broadleaf API Map
The storefront is a thin wrapper over the publicly documented Broadleaf Commerce Catalog Browse and Cart Operations APIs. Gateway: https://broadleaf.example.com/api — not connected (set BROADLEAF_API_URL).
| Area | Broadleaf endpoint | Storefront | Current source |
|---|---|---|---|
| Catalog | GET /catalog-browse/products/details?productUris= | /p/[slug] | data/catalog/products.json |
| Catalog | GET /catalog-browse/categories/details | /c/[slug] | data/catalog/categories.json |
| Search | GET /catalog-browse/search/catalog?query= | /search?q= | data/search/search-results.json |
| Search | GET /catalog-browse/search/catalog/suggest | Header search box | Static suggestions |
| Cart | POST /cart-operations/cart/{cartId}/items | Add to Cart | POST /api/cart (op: add) |
| Cart | PATCH /cart-operations/cart/{cartId}/items/{itemId} | /cart quantity + fulfillment | POST /api/cart (op: update) |
| Cart | DELETE /cart-operations/cart/{cartId}/items/{itemId} | /cart remove | POST /api/cart (op: remove) |
Flat Files
Products follow the Broadleaf ProductDetails shape. Replace data/catalog/products.json with an export, or edit scripts/generate-catalog.mjs and run node scripts/generate-catalog.mjs.
Cart Business Rules
- Core deposit
- Batteries, alternators and starters carry a refundable core charge (corePrice), shown on PDP and summed in cart.
- Quantity cap
- Max 10 per line and 50 lines per cart, validated client-side and in the /api/cart BFF.
- Fulfillment
- Each line is PICKUP (store #3071) or SHIP, passed as itemAttributes.fulfillmentType.
- Free shipping
- Ship-to-home lines are free at $35+, otherwise $7.99.
- Fitment
- Products are UNIVERSAL or VEHICLE_SPECIFIC; the selected vehicle is kept in the browser.
