Pagination and Filtering
List format
List endpoints return:
json
{
"object": "list",
"data": [ { "…": "resource" } ],
"has_more": true,
"next_cursor": "eyJ…"
}| Field | Type | Description |
|---|---|---|
object | string | Always list |
data | array | The resources on this page. See Resources and Fields |
has_more | boolean | Whether more data follows |
next_cursor | string or null | The cursor for the next page. null when has_more is false |
Pagination parameters
| Parameter | Description |
|---|---|
limit | Items per page, an integer from 1 to 100. Default 25 |
cursor | The next_cursor from the previous page |
- To get the next page, pass the previous page's
next_cursorascursor. cursoraccepts only anext_cursorreturned by this API. If the cursor cannot be decoded, has been modified, orsortdiffers from when the cursor was created, the request returns 400 withparamset tocursor.- Single-resource endpoints (
/{id}) andGET /merchantaccept no query parameters;limitorcursoralso returns 400.
bash
curl -G https://api.dolyu.com/v1/customers \
-H "Authorization: Bearer dolyu_sk_..." \
-d limit=100 \
--data-urlencode "cursor=eyJ…"Sorting
Lists are sorted by the sort field in ascending order, then by id in ascending order.
| Endpoint | sort values | Default |
|---|---|---|
GET /appointments | start_at, updated_at | start_at |
GET /customers | created_at, updated_at | created_at |
GET /services | sort not accepted | By created_at, id |
GET /staff | sort not accepted | By id |
GET /payments, GET /refunds | sort not accepted | By created_at, id |
GET /events | sort not accepted | By created_at, id |
Filters
Appointments
GET /appointments
| Parameter | Description |
|---|---|
status | Only this status: pending, confirmed, completed, cancelled, no_show |
start_at[gte] | Start time is at or after this time |
start_at[lt] | Start time is before this time |
updated_at[gte] | Last updated at or after this time |
customer_id | Appointments of this customer. The value is a UUID |
staff_id | Appointments where any item's staff member is this staff member. The value is a UUID |
reference | Appointment reference number, case-insensitive. A series' main reference also matches appointments numbered "main reference-sequence" |
- If
customer_idorstaff_idbelongs to another merchant, the list is empty. - If
referencedoes not match the reference number format, the list is empty.
Customers
GET /customers
| Parameter | Description |
|---|---|
email | Exact email match, case-insensitive |
phone | Phone number match. Different ways of writing the same number are treated as the same; customers who share the number are listed together |
updated_at[gte] | Last updated at or after this time |
Payments and refunds
GET /payments and GET /refunds
| Parameter | Description |
|---|---|
appointment_id | Payments or refunds recorded on this appointment. The value is a UUID |
created_at[gte] | Recorded at or after this time |
created_at[lt] | Recorded before this time |
- If
appointment_idbelongs to another merchant, the list is empty.
Services and staff
GET /services and GET /staff accept only limit and cursor.
Events
For GET /events parameters, see Events.
Time parameters
- The format is ISO 8601 and must include
Zor an offset, e.g.2026-11-20T00:00:00Z,2026-11-20T08:00:00+08:00. A date only, or a time with no time zone, returns 400. - An unencoded
+in a URL becomes a space; a space before the offset is treated as+. gteincludes the given time;ltdoes not.
bash
curl -G https://api.dolyu.com/v1/appointments \
-H "Authorization: Bearer dolyu_sk_..." \
--data-urlencode "start_at[gte]=2026-11-20T00:00:00+08:00" \
--data-urlencode "start_at[lt]=2026-11-21T00:00:00+08:00" \
-d status=confirmed \
-d limit=50Parameter errors
These cases return 400 parameter_invalid, with param set to the parameter name. Nested parameters are written as start_at[gte]:
- A parameter the endpoint does not accept.
- An invalid value, such as an unknown
status, acustomer_idthat is not a UUID, a blankreference, or alimitout of range. - An unsupported operator, such as
start_at[lte]orupdated_at[lt]. - A single-value parameter sent as an array, such as
status[]=confirmed. - A list request sent with a JSON body.
json
{
"error": {
"type": "invalid_request",
"code": "parameter_invalid",
"message": "A request parameter is invalid.",
"param": "start_at[gte]",
"request_id": "req_..."
}
}