23 lines
946 B
Markdown
23 lines
946 B
Markdown
# Documenter — F-020 Shipping module
|
|
|
|
## Summary
|
|
Shipping module exposes server-side shipping quotation behind `ShippingService.calculate(cartTotalCents, address)`. Selection uses country plus most specific postal code prefix and the cheapest active method wins.
|
|
|
|
## Public API notes
|
|
|
|
| Route | Access | Result |
|
|
|---|---|---|
|
|
| POST /shipping/zones | admin | Creates a zone with country and optional postal-code prefix |
|
|
| POST /shipping/methods | admin | Creates a method under a zone with optional free-shipping threshold |
|
|
| POST /shipping/calculate | public | Returns cheapest active method cost with free shipping applied when threshold met |
|
|
|
|
## Errors
|
|
- `SHIPPING_ZONE_NOT_FOUND` — HTTP 422
|
|
- `INVALID_SHIPPING_ADDRESS` — HTTP 400
|
|
|
|
## Evidence
|
|
- `work/artifacts/F-020/architect.md`
|
|
- `work/artifacts/F-020/implementer.md`
|
|
- `work/artifacts/F-020/reviewer.json`
|
|
- `work/artifacts/F-020/security.json`
|
|
- `work/artifacts/F-020/qa.json` |