Shopify has established a robust API versioning strategy to ensure stability and predictability for its partners. This involves releasing new API versions quarterly with date-based names (e.g., 2020-01). The platform team builds the infrastructure and tooling to enforce this strategy, which includes managing breaking and non-breaking changes. Breaking changes require thorough impact analysis and stakeholder agreement, while non-breaking changes are tested for forward compatibility. This post discusses the challenges of applying RESTful thinking to processes, advocating for transaction-specific URIs (e.g., POST /orders/42/pay) over generic updates (PATCH /orders/42) to improve clarity, authorization, and validation. It emphasizes modeling processes as state machines and avoiding direct `update_attributes` calls in controllers to enhance security and prevent mass-assignment vulnerabilities.
All Shopify trails