GuideLab API

List orders

Returns a paginated list of orders for the authenticated user's organization. Supports filtering by status, date range, search, and other criteria. Labs see orders where they are the lab; clinics see orders where they are the clinic.

GET
/orders

Returns a paginated list of orders for the authenticated user's organization. Supports filtering by status, date range, search, and other criteria. Labs see orders where they are the lab; clinics see orders where they are the clinic.

Authorization

__Secure-guidelab-prod.session_token<token>

Production session cookie set for the guidelab.co domain by Better Auth

In: cookie

Query Parameters

page?integer

Page number

Range0 < value <= 10000
Default1
limit?integer

Items per page

Range0 < value <= 100
Default20
view?string

Response projection. The backward-compatible default returns the full order shape; compact omits detail-only fields for list UIs.

Default"full"

Value in

  • "full"
  • "compact"
cursor?string

Opaque cursor returned by the previous non-search page. Send it with the matching page, filters, and sort. Search results continue to use page-based pagination.

Length1 <= length <= 512
status?string

Comma-separated status filter

type?string

Comma-separated order type filter (digital, physical)

search?string

Search by order number, patient name, doctor name, or partner org

sortBy?string

Field to sort by

Default"createdAt"

Value in

  • "createdAt"
  • "dueDate"
  • "deadline"
  • "submittedAt"
  • "orderNumber"
  • "status"
sortOrder?string

Sort direction

Default"desc"

Value in

  • "asc"
  • "desc"
clinicId?string

Filter by clinic ID

patientId?string

Filter by patient ID

doctorUserId?string

Filter by doctor user ID

labId?string

Filter by lab ID

doctorName?string

Filter by doctor name

hasFiles?||

Filter orders that have files

hasAdvanceRequest?||

Filter orders with pending phase advance requests

includeAll?||

Include completed and cancelled orders. Archived orders are always excluded.

Defaultfalse
withBadgeCounts?||

Include submittedCount and onHoldCount in response metadata (org-wide, unfiltered)

Defaultfalse

Response Body

application/json

curl -X GET "https://example.com/orders"
{  "data": [    null  ],  "pagination": {    "page": 0,    "limit": 0,    "total": 0,    "totalPages": 0,    "hasMore": true,    "nextCursor": "string"  }}
Empty
Empty