Skip to content
Calm motion: animations on this site only fade, with no movement

API endpoint ​

One endpoint of an API with the method, the path, the parameters, and the responses

Builds a page of API reference docs, one endpoint at a time.

Basic
GET

/v1/orders/{id}

Get one order
Returns the order with its state and total. Add expand to get the items or the customer in the same call.
Parameters
NameInType
idrequiredThe id of the order.pathstring
expandoptionalAdd related records: items, customer.querystring[]
AuthorizationrequiredBearer and your API key.headerstring
Example request
sh
curl https://api.example.com/v1/orders/SO-2026-0417?expand=items \
  -H 'Authorization: Bearer sk_demo_42'
Responses
The order.
json
{
  "id": "SO-2026-0417",
  "state": "paid",
  "total": {
    "amount": 1250000,
    "currency": "IDR"
  },
  "items": 3
}
  • method and path name the endpoint. Path parameters in braces, such as {id}, are underlined and in italics.
  • summary is one line, and description is the longer text. Line breaks in it stay.
  • params is the list of parameters. Each has a name, where it goes (in: path, query, header, or body), a type, and optional required and description. Each parameter says "required" or "optional" in words.
  • example is a request in a code block with a copy button. example-lang sets its language (default sh).
  • responses is the list of answers. Each has a status, a description, and an example body. Each status gets a tab.
  • Change the words with labels or a label pack. The API table lists the keys.

Usage ​

ts
import { BlessApiEndpoint } from "blessing-ui";

API ​

Props

NameTypeDefaultDescription
method*string—
path*string—with path parameters in braces, for example /orders/{id}
summarystring—
descriptionstring—
paramsBlessApiParam[]—
examplestring—an example request, for example a curl command
exampleLangstring—
responsesBlessApiResponse[]—
labelsPartial<{ params: string; name: string; type: string; where: string; required: string; optional: string; example: string; responses: string; }>—

Released under the MIT License. Character names and artwork belong to their owners.