300

Multiple Choices

3xx Redirection

Back to list

Server perspective

Use 300 when more than one representation or target is valid and the client should pick the preferred one.

When to use

  • Return 300 for reactive negotiation when the response should list alternatives instead of choosing for the client
  • If there is a preferred target, you may also include Location to point at that preference

How to respond

  • Include a machine- or human-readable list of alternatives in the response body
  • Keep each alternative specific enough that the client can make a meaningful choice

Headers to consider

  • Location

Response body

  • Include a list of alternative representations or URIs; Location is optional, not mandatory

Server-side pitfalls

  • Do not use 300 as a generic redirect when there is only one real target
  • Do not expect clients to understand an undocumented custom alternatives format automatically

Examples

Format negotiation by choice

Request:GET /invoice/123
Response:300 Multiple Choices listing HTML, PDF, and JSON variants

The server defers the final representation choice to the client.

References

Related 3xx Redirection Codes