Get calendar data
Returns calendar events grouped by date for a given date range: one delivery event per order due date and one surgery event per order surgery date (an order whose surgery day is its due date yields only the surgery event). Excludes drafts and archived orders. Supports searching by order number, patient name, doctor, or partner org.
Returns calendar events grouped by date for a given date range: one delivery event per order due date and one surgery event per order surgery date (an order whose surgery day is its due date yields only the surgery event). 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)
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", "kind": "delivery", "actionTypes": [ "approve_surgical_report" ] } ] }, "property2": { "total": 0, "orders": [ { "id": "string", "orderNumber": "string", "patientName": "string", "status": "string", "kind": "delivery", "actionTypes": [ "approve_surgical_report" ] } ] } }}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 whose due date or surgery date falls on 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.