{"openapi":"3.1.0","info":{"title":"PUT /api/v1/time-entries/{time_entry_id}","version":"1.0.0","description":"Update time entry"},"servers":[{"url":"https://api.ondayzero.com","description":"Production"}],"paths":{"/api/v1/time-entries/{time_entry_id}":{"put":{"tags":["time-entries"],"summary":"Update time entry","description":"Update a time entry. All fields optional.","operationId":"update_time_entry_api_v1_time_entries__time_entry_id__put","parameters":[{"name":"time_entry_id","in":"path","required":true,"schema":{"type":"string","title":"Time Entry Id"}},{"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"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimeEntryUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimeEntryResponse"}}}},"400":{"description":"Bad Request - Invalid input","content":{"application/json":{"example":{"detail":"Invalid request parameters"}}}},"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"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"detail":"Resource not found"}}}},"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"},"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."},"TimeEntryUpdateRequest":{"properties":{"entry_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Entry Date"},"duration_minutes":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"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"},"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id"},"catalog_item_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Catalog Item Id"},"billable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Billable"},"rate_cents":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Rate Cents"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"TimeEntryUpdateRequest","description":"Request schema for updating a time entry (all fields optional)."},"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":[]}]}