Intermediate Writing #api-contract #rest

Writing API Contracts

5 exercises on describing endpoints, request/response shapes, error cases and versioning notes in precise prose.

Key patterns
  • Name the method, path, request fields (with types), status code and response shape.
  • Document each error case: trigger, HTTP status, and a stable machine-readable code.
  • Versioning prose: introduced in, deprecated in, removed in, with a dated window.
  • State side effects and idempotency for any endpoint that mutates state.
0 / 5 completed
1 / 5
You are documenting an endpoint in prose for a spec. Which description of POST /v1/orders is the most precise and complete?