Get calendar data
Returns order counts and summaries grouped by date for a given date range. Used for calendar views to show how many orders are due or have deadlines on each day. Excludes drafts and archived orders. Supports searching by order number, patient name, doctor, or partner org.
Returns order counts and summaries grouped by date for a given date range. Used for calendar views to show how many orders are due or have deadlines on each day. Excludes drafts and archived orders. Supports searching by order number, patient name, doctor, or partner org.
Production session cookie set for the guidelab.co domain by Better Auth
In: cookie
Query Parameters
Start date (YYYY-MM-DD)
End date (YYYY-MM-DD)
Date field to use: dueDate (default) or deadline
Search term for order number, patient, doctor, or org name
Response Body
application/json
curl -X GET "https://example.com/orders/calendar?startDate=2025-01-01&endDate=2025-01-31"{ "days": { "property1": { "total": 0, "orders": [ { "id": "string", "orderNumber": "string", "patientName": "string", "status": "string" } ] }, "property2": { "total": 0, "orders": [ { "id": "string", "orderNumber": "string", "patientName": "string", "status": "string" } ] } }}Get most recent draft order GET
Returns the most recent draft order created by the authenticated user within their organization. Includes related clinic, lab, patient, and line item data. Returns null if no draft exists.
Get orders for a specific day GET
Returns a paginated list of orders for a specific date with full order details including phase summaries. Supports filtering by status and search. Used for the day detail view in the calendar.