Generate clear developer-facing documentation for an API endpoint from its code or spec.
Use when shipping a new endpoint and you need docs before other developers (internal or external) can consume it.
Write developer documentation for this API endpoint:
```
{endpoint_code_or_spec}
```
Include: a one-sentence summary, the HTTP method and path, request parameters (name, type, required/optional, description), a sample request, possible response codes with what each means, and a sample success response. Use a level of detail appropriate for internal team (e.g. internal team vs. public API consumers). Do not invent parameters or behavior not present in the code/spec.The audience field changes a lot — internal docs can assume shared context that public API docs can't.
Endpoint: POST /api/orders — code creating an order from a cart. Audience: public API consumers (third-party integrators).
## Create Order\n\n`POST /api/orders`\n\nCreates a new order from the items in a cart...
Last updated Jan 1, 2026