Delivery Promise API
REST contract of the delivery-promise bounded context (Core, commerce tier) of the retail network, derived from retail-network-docs model/model.yaml (contexts[delivery-promise].rest) and the FINAL cross-context decisions (contracts-delta E7, E8, E9; gap register G8, G9, G19, G21, G22). The quote route is an Open Host Service for the storefront and an in-organization Customer/Supplier contract for customer-ordering; POST /promises, POST /promises/{promiseId}/confirmations and POST /promises/{promiseId}/cancellations (checkout compensation) are called only by customer-ordering inside checkout. The promise hot path makes no synchronous call to any other context: every input is an event-fed local read model. No authentication, consistent with the fleet. No personal data appears in any schema: the destination is a postal prefix, never an address. Errors are RFC 9457 application/problem+json whose type is https://retailnetwork.example/problems/<slug>. Shared slugs: not-found (404), illegal-transition (409), concurrent-update (409), validation-failed (422). Model slugs (kebab-case of the Err name): offer-not-quotable, promise-capacity-exhausted, book-closed, promise-hold-expired, promise-closed, revision-moves-earlier (409); group-spans-nodes, invalid-promise-terms, nominal-basis-not-allowed-for-tier (422). Infrastructure slugs: malformed-request, idempotency-key-required, idempotency-key-invalid (400), idempotency-key-reused (409), resource-not-found (404), internal-error (500). Every POST requires Idempotency-Key (fleet REST API guideline); a repeat with the same key, method, path and body replays the first response for 24 hours with the Idempotency-Replayed header when that response is final: a 2xx, or a refusal the same request cannot pass later. A refusal that depends on state that can change is not stored: the key is released and the same request retried under the same key runs again (a different body under a released key is a new request, not idempotency-key-reused). The problem types that release the key (RETRYABLE): not-found, promise-capacity-exhausted, book-closed, offer-not-quotable, illegal-transition, concurrent-update, group-spans-nodes, revision-moves-earlier. A 5xx is never stored. The one exception is the safe POST /delivery-estimates, which stores nothing: it needs no key and ignores one that is sent (ADR 0019). The read-only analytics reports (tag reports, ADR 0018) are served by cmd/dp-reports on its own port (per-path server) from the separate analytical database; their range errors are invalid-report-range (400).
Contact delivery-promise maintainers: