Question 1
Topic: API Design Best Practices
Skill tested: Applies facade and resource-oriented design to shield clients from backend changes.
A logistics company is exposing shipment information through a new API. Its existing warehouse service uses database-oriented endpoints, returns internal field names, and is scheduled for replacement next year. Mobile and partner clients need stable resources, while the engineering team wants to avoid exposing backend implementation details or requiring clients to change when the service is replaced. Which design is most appropriate?
A facade provides a stable, client-oriented contract while isolating consumers from backend schemas and replacement plans. The API layer can map public shipment resources to the current service and later change that mapping without forcing client changes. Directly exposing backend endpoints or database records couples clients to implementation details. Publishing separate APIs transfers migration complexity to every client rather than managing the transition behind a durable interface.