An operation flow is an ordered sequence of API calls that a consumer performs to achieve a use case. Its quality affects developer effort, UI freedom, end-user experience, error rates, and interoperability. A strong flow uses understandable data and operations, works as a coherent whole, minimizes steps, and remains flexible across consuming applications. section 10.1 section 10.5
Design an operation flow by checking the entire sequence rather than judging each operation in isolation:
- Use interoperable inputs and outputs: identifiers returned by one operation should be valid inputs for the next, and failures should explain how consumers can recover. section 10.1.1
- Keep the flow concise and flexible. Remove unnecessary steps, make searches optional when consumers already have the needed information, and avoid imposing one UI sequence. section 10.1.3
- Make operations fit the use case. Return the data needed for the decision at hand instead of forcing consumers to filter broad results or transform incomplete outputs. section 10.1.4
- Let earlier operations prevent later errors. Include constraints in results and provide filtering that matches the final operation’s requirements. section 10.1.5
- Reuse recognizable patterns across similar flows, including predictable HTTP operations, file uploads, and credential-acquisition sequences. section 10.1.6
Optimize flows after improving the participating data, operations, inputs, outputs, and errors. Review every call for duplication, avoidable consumer-side processing, and preventable errors. Then remove redundant calls, add contextual features or data, create focused operations, or aggregate operations when aggregation preserves clarity and scope. section 10.2.1 section 10.2.2 section 10.3.2
From constrained car rental to flexible search
A six-step rental sequence creates a request, finds a shop, adds the shop, searches its cars, adds a car, and validates the request. A simpler design searches shops, searches cars in a shop, and rents the car; consumers who already know the shop and car can begin with renting. A single “Search cars across shops” operation can remove the forced shop-first order, while availability filtering and maximum-rental-day information reduce invalid rental attempts. section 10.1.2 section 10.1.3 section 10.1.5
Data-saving flows need the same flexibility. Allow consumers to save partial data in the order that suits their application, preserve the minimal information needed to initiate the process, separate validation from final completion, and support either a single complete save or multiple partial saves. These choices let applications shape their own UI flows and let end users verify information before finishing. section 10.4 section 10.5
Figure 10.1 We’ll enhance the “Renting a car” operation flow by reducing the number of steps, avoiding constraining the order of operations, creating use-case-focused operations, and preventing error and data processing.
Use the renting-a-car flow diagram to compare step reduction, flexible ordering, use-case-focused operations, and error prevention. section 10.1.2
