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
/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
| Name | In | Type |
|---|---|---|
idrequiredThe id of the order. | path | string |
expandoptionalAdd related records: items, customer. | query | string[] |
AuthorizationrequiredBearer and your API key. | header | string |
Example request
curl https://api.example.com/v1/orders/SO-2026-0417?expand=items \
-H 'Authorization: Bearer sk_demo_42'
Responses
The order.
{
"id": "SO-2026-0417",
"state": "paid",
"total": {
"amount": 1250000,
"currency": "IDR"
},
"items": 3
}
methodandpathname the endpoint. Path parameters in braces, such as{id}, are underlined and in italics.summaryis one line, anddescriptionis the longer text. Line breaks in it stay.paramsis the list of parameters. Each has aname, where it goes (in: path, query, header, or body), atype, and optionalrequiredanddescription. Each parameter says "required" or "optional" in words.exampleis a request in a code block with a copy button.example-langsets its language (defaultsh).responsesis the list of answers. Each has astatus, adescription, and an examplebody. Each status gets a tab.- Change the words with
labelsor a label pack. The API table lists the keys.
Usage
ts
import { BlessApiEndpoint } from "blessing-ui";API
Props
| Name | Type | Default | Description |
|---|---|---|---|
method* | string | — | |
path* | string | — | with path parameters in braces, for example /orders/{id} |
summary | string | — | |
description | string | — | |
params | BlessApiParam[] | — | |
example | string | — | an example request, for example a curl command |
exampleLang | string | — | |
responses | BlessApiResponse[] | — | |
labels | Partial<{ params: string; name: string; type: string; where: string; required: string; optional: string; example: string; responses: string; }> | — |