Capstone: Integration Contract Review
Core Concepts (5)
- 1.Consumer-driven contracts catch breakage before release
- 2.Wrap third-party APIs behind your own interface
- 3.Timeouts, limits, and fallbacks protect you from partners
- 4.Rate limits and quotas need to be explicit in the contract
- 5.Documentation and examples are part of the API
Map to Your Experience
Which external service would hurt you most if it changed or went down tomorrow, and how prepared are you?
Design Brief: Review a Partner Integration
Learn
This final day brings the track together on a realistic problem: you both publish an API and depend on someone else's. The skills are mirror images. As a provider you promise stability. As a consumer you must assume the promise may break.
On the provider side, confirm the basics from earlier days. Resources are named consistently, errors are structured, lists are paginated with bounds, unsafe operations accept idempotency keys, and a written policy governs versions and deprecation. Add explicit rate limits and quotas to the contract, communicate them in response headers, and return 429 with a retry hint when exceeded.
To prevent accidental breakage, use consumer-driven contracts. Each consumer records the requests they make and the response parts they rely on. The provider runs those expectations in its build, so a change that would break a known consumer fails before release. This is far cheaper than discovering it from an angry email.
On the consumer side, never let a partner's model leak through your codebase. Put an adapter, sometimes called an anti-corruption layer, between your logic and their API. It translates their names and errors into yours, centralises timeouts, retries, and rate limit handling, and gives you a single place to swap vendors or add a fallback. Set timeouts shorter than your own caller's patience, and decide what the product does when the partner is down.
Good documentation completes the contract. Provide a getting started path that works in minutes, runnable examples for the main flows, a changelog, and a status page. Review the whole design as a consumer would: could a new developer integrate safely without asking you a single question?
Map
Draw two boxes: your marketplace and the shipping provider. List what each promises the other, what happens when each promise fails, and which failure the customer would notice first.
Design
Write a short design review: the public API surface, the idempotency and versioning choices, the adapter around the shipping provider with its timeout and rate limit handling, and the contract tests you would run. End with the single biggest risk and your mitigation. Keep your answer concrete: name real numbers, owners, and examples wherever you can, and note any assumption you had to make so a reviewer can challenge it.
Requirements
- •Present the public resource model, errors, and pagination
- •Describe idempotency and versioning choices
- •Describe how the shipping provider is isolated and monitored
Constraints
- •Shipping provider has strict rate limits
- •Sellers include small teams with basic tooling
Must Cover
Trade-off Axis
consumer convenience vs provider independence
Referenced Patterns
Competencies Advanced
Ready to Design?
Open this day in the Design Studio. The studio follows this track: its days, concepts, patterns and trade-offs are loaded, and you keep one design across the whole track.
Open in Studio →