{"components":{"schemas":{"Assignment":{"properties":{"cost_per_hour":{"nullable":true,"type":"string"},"cost_source":{"type":"string"},"daily_hours":{"type":"number"},"end_date":{"format":"date","type":"string"},"id":{"type":"integer"},"inserted_at":{"format":"date-time","type":"string"},"project_id":{"type":"integer"},"project_title":{"nullable":true,"type":"string"},"resource_id":{"type":"integer"},"resource_name":{"nullable":true,"type":"string"},"start_date":{"format":"date","type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":[],"type":"object"},"Contract":{"properties":{"annual_convention_hours":{"nullable":true,"type":"integer"},"cost_per_hour":{"nullable":true,"type":"string"},"daily_hours":{"type":"integer"},"end_date":{"format":"date","nullable":true,"type":"string"},"id":{"type":"integer"},"inserted_at":{"format":"date-time","type":"string"},"start_date":{"format":"date","type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":[],"type":"object"},"Error":{"properties":{"errors":{"additionalProperties":true,"type":"object"}},"required":[],"type":"object"},"Project":{"properties":{"budgeted_cost":{"nullable":true,"type":"string"},"budgeted_hours":{"type":"integer"},"end_date":{"format":"date","type":"string"},"external_id":{"nullable":true,"type":"string"},"id":{"type":"integer"},"inserted_at":{"format":"date-time","type":"string"},"start_date":{"format":"date","type":"string"},"status":{"type":"string"},"tags":{"items":{"$ref":"#/components/schemas/Tag"},"type":"array"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":[],"type":"object"},"ProjectCreate":{"properties":{"budgeted_cost":{"nullable":true,"type":"string"},"budgeted_hours":{"type":"integer"},"end_date":{"format":"date","type":"string"},"external_id":{"nullable":true,"type":"string"},"start_date":{"format":"date","type":"string"},"tag_ids":{"items":{"type":"integer"},"type":"array"},"title":{"type":"string"}},"required":["title","start_date","end_date","budgeted_hours"],"type":"object"},"ProjectMonthlyHours":{"properties":{"grand_total":{"type":"number"},"months":{"items":{"pattern":"^\\d{4}-\\d{2}$","type":"string"},"type":"array"},"resources":{"items":{"$ref":"#/components/schemas/ProjectMonthlyHoursResource"},"type":"array"},"totals":{"additionalProperties":{"type":"number"},"type":"object"}},"required":[],"type":"object"},"ProjectMonthlyHoursResource":{"properties":{"months":{"additionalProperties":{"type":"number"},"type":"object"},"resource_id":{"type":"integer"},"resource_name":{"nullable":true,"type":"string"},"total_hours":{"type":"number"}},"required":[],"type":"object"},"ProjectWithAssignments":{"properties":{"assignments":{"items":{"$ref":"#/components/schemas/Assignment"},"type":"array"},"budgeted_cost":{"nullable":true,"type":"string"},"budgeted_hours":{"type":"integer"},"end_date":{"format":"date","type":"string"},"external_id":{"nullable":true,"type":"string"},"id":{"type":"integer"},"inserted_at":{"format":"date-time","type":"string"},"monthly_hours":{"$ref":"#/components/schemas/ProjectMonthlyHours"},"start_date":{"format":"date","type":"string"},"status":{"type":"string"},"tags":{"items":{"$ref":"#/components/schemas/Tag"},"type":"array"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":[],"type":"object"},"Resource":{"properties":{"contracts":{"items":{"$ref":"#/components/schemas/Contract"},"type":"array"},"external_id":{"nullable":true,"type":"string"},"id":{"type":"integer"},"inserted_at":{"format":"date-time","type":"string"},"name":{"type":"string"},"tags":{"items":{"$ref":"#/components/schemas/Tag"},"type":"array"},"updated_at":{"format":"date-time","type":"string"}},"required":[],"type":"object"},"ResourceCreate":{"properties":{"contract":{"properties":{"annual_convention_hours":{"nullable":true,"type":"integer"},"cost_per_hour":{"type":"string"},"daily_hours":{"type":"integer"},"end_date":{"format":"date","nullable":true,"type":"string"},"start_date":{"format":"date","type":"string"}},"required":["start_date","daily_hours","cost_per_hour"],"type":"object"},"external_id":{"nullable":true,"type":"string"},"name":{"type":"string"},"tag_ids":{"items":{"type":"integer"},"type":"array"}},"required":["name"],"type":"object"},"ResourceMonthlyHours":{"properties":{"grand_total":{"type":"number"},"months":{"items":{"pattern":"^\\d{4}-\\d{2}$","type":"string"},"type":"array"},"projects":{"items":{"$ref":"#/components/schemas/ResourceMonthlyHoursProject"},"type":"array"},"totals":{"additionalProperties":{"type":"number"},"type":"object"}},"required":[],"type":"object"},"ResourceMonthlyHoursProject":{"properties":{"months":{"additionalProperties":{"type":"number"},"type":"object"},"project_id":{"type":"integer"},"project_title":{"nullable":true,"type":"string"},"total_hours":{"type":"number"}},"required":[],"type":"object"},"ResourceWithAssignments":{"properties":{"assignments":{"items":{"$ref":"#/components/schemas/Assignment"},"type":"array"},"contracts":{"items":{"$ref":"#/components/schemas/Contract"},"type":"array"},"external_id":{"nullable":true,"type":"string"},"id":{"type":"integer"},"inserted_at":{"format":"date-time","type":"string"},"monthly_hours":{"$ref":"#/components/schemas/ResourceMonthlyHours"},"name":{"type":"string"},"tags":{"items":{"$ref":"#/components/schemas/Tag"},"type":"array"},"updated_at":{"format":"date-time","type":"string"}},"required":[],"type":"object"},"Tag":{"properties":{"color":{"type":"string"},"for_projects":{"type":"boolean"},"for_resources":{"type":"boolean"},"id":{"type":"integer"},"name":{"type":"string"}},"required":[],"type":"object"}},"securitySchemes":{"ApiKeyAuth":{"bearerFormat":"Kordia API key","scheme":"bearer","type":"http"}}},"info":{"description":"API for third-party integrations. Assignments are read-only and must be managed inside Kordia.","title":"Kordia Integration API","version":"1.0.0"},"openapi":"3.0.3","paths":{"/projects":{"get":{"parameters":[{"in":"query","name":"external_id","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Project"},"type":"array"}},"required":[],"type":"object"}}},"description":"Project list"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error"}},"summary":"List projects"},"post":{"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"data":{"$ref":"#/components/schemas/Project"}},"required":[],"type":"object"}}},"description":"Created project"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error"}},"summary":"Create project"}},"/projects/{id}":{"get":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Comma-separated optional expansions. Use `monthly_hours` to include the monthly hours matrix.","in":"query","name":"include","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"$ref":"#/components/schemas/ProjectWithAssignments"}},"required":[],"type":"object"}}},"description":"Project"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error"}},"summary":"Get project with assignments and optional monthly hours"}},"/resources":{"get":{"parameters":[{"in":"query","name":"external_id","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Resource"},"type":"array"}},"required":[],"type":"object"}}},"description":"Resource list"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error"}},"summary":"List resources"},"post":{"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"data":{"$ref":"#/components/schemas/Resource"}},"required":[],"type":"object"}}},"description":"Created resource"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error"}},"summary":"Create resource with optional initial contract"}},"/resources/{id}":{"get":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"description":"Comma-separated optional expansions. Use `monthly_hours` to include the monthly hours matrix.","in":"query","name":"include","required":false,"schema":{"type":"string"}},{"description":"Start date for resource monthly hours. Must be used with `to`.","in":"query","name":"from","required":false,"schema":{"format":"date","type":"string"}},{"description":"End date for resource monthly hours. Must be used with `from`.","in":"query","name":"to","required":false,"schema":{"format":"date","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"$ref":"#/components/schemas/ResourceWithAssignments"}},"required":[],"type":"object"}}},"description":"Resource"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error"}},"summary":"Get resource with contracts, assignments and optional monthly hours"}}},"security":[{"ApiKeyAuth":[]}],"servers":[{"url":"/api/v1"}]}