{"openapi":"3.1.0","info":{"title":"GET /api/v1/time-entries","version":"1.0.0","description":"List time entries"},"servers":[{"url":"https://api.ondayzero.com","description":"Production"}],"paths":{"/api/v1/time-entries":{"get":{"tags":["time-entries"],"summary":"List time entries","description":"List time entries, optionally filtered by customer/project/status.","operationId":"list_time_entries_api_v1_time_entries_get","parameters":[{"name":"customer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by customer.","title":"Customer Id"},"description":"Filter by customer."},{"name":"project_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by project.","title":"Project Id"},"description":"Filter by project."},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by status: unbilled, billed.","title":"Status"},"description":"Filter by status: unbilled, billed."},{"name":"include_inactive","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Inactive"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-business-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Business-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimeEntriesListResponse"}}}},"401":{"description":"Unauthorized - Authentication required","content":{"application/json":{"example":{"detail":"Not authenticated"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"detail":"Not enough permissions"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"TimeEntriesListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/TimeEntryResponse"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"TimeEntriesListResponse","description":"A flat list of time entries."},"TimeEntryResponse":{"properties":{"id":{"type":"string","title":"Id"},"business_id":{"type":"string","title":"Business Id"},"entry_date":{"type":"string","format":"date","title":"Entry Date"},"duration_minutes":{"type":"integer","title":"Duration Minutes"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"person_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Person Name"},"customer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Id"},"customer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Name"},"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id"},"project_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Name"},"catalog_item_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Catalog Item Id"},"billable":{"type":"boolean","title":"Billable"},"rate_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rate Cents"},"billable_amount":{"type":"integer","title":"Billable Amount","description":"Computed billable amount in cents.","default":0},"status":{"type":"string","title":"Status"},"invoice_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invoice Id"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","business_id","entry_date","duration_minutes","billable","status","is_active","created_at","updated_at"],"title":"TimeEntryResponse","description":"Response schema for a time entry."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Token","description":"API token authentication. Format: `Bearer dz_...`"}}},"security":[{"BearerAuth":[]}]}