Skip to content
StackDecode
System Design
10. API Design and ManagementAnimated

Response Formatting

Shaping consistent responses.

The idea

Standard envelopes, error formats and content negotiation make APIs predictable.

Watch it work

Press play, pause, or step through. Some animations have settings you can change.

ClientAPI gatewayAuthOrdersCatalogData
  • client
  • gateway / proxy
  • service
  • cache
  • data store
  • queue / stream

Every client request enters through the gateway.

step:
1/4
at:
Client
1/9

The green dot is a request moving through the system.

Step by step

  1. 1Choose a consistent structure
  2. 2Use standard error fields
  3. 3Include pagination metadata
  4. 4Support content types

Where it is used

Developer experience.

Watch out for

Leaking internal errors or stack traces.

Related