{"openapi":"3.1.0","info":{"title":"VitinitySuite API","version":"1","description":"Read-only access to assignments. The tenant is always taken from the API key; a tenant_id parameter has no effect."},"servers":[{"url":"https://vitinitysuite-frontend.vercel.app"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"API key, format vit_live_…"}},"schemas":{"Assignment":{"type":"object","required":["id","tenant_id","assignment_number","scheduled_date","start_time","end_time","duration_min","status","location_id","customer_name","location_name","location_street","location_house_number","location_postal_code","location_city","crew"],"properties":{"id":{"type":"string","format":"uuid"},"tenant_id":{"type":"string","format":"uuid"},"assignment_number":{"type":["string","null"]},"scheduled_date":{"type":"string","format":"date"},"start_time":{"type":["string","null"]},"end_time":{"type":["string","null"]},"duration_min":{"type":["integer","null"]},"status":{"type":"string","enum":["planned","confirmed","in_progress","completed","cancelled","issue","ready_billing","billed"]},"location_id":{"type":"string","format":"uuid"},"customer_name":{"type":"string"},"location_name":{"type":"string"},"location_street":{"type":"string"},"location_house_number":{"type":["string","null"]},"location_postal_code":{"type":"string"},"location_city":{"type":"string"},"crew":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"First name and initial of the last name"},"status":{"type":"string"},"checked_in_at":{"type":["string","null"],"format":"date-time"},"checked_out_at":{"type":["string","null"],"format":"date-time"}}}}}},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"detail":{"type":"string"}}}}},"paths":{"/api/v1/assignments":{"get":{"operationId":"listAssignments","summary":"Assignments of a day or a period","parameters":[{"name":"date","in":"query","schema":{"type":"string","format":"date"},"description":"A single day. Default: today (Europe/Berlin)."},{"name":"from","in":"query","schema":{"type":"string","format":"date"},"description":"Start of a period, only together with to. At most 31 days."},{"name":"to","in":"query","schema":{"type":"string","format":"date"},"description":"End of a period, inclusive."},{"name":"status","in":"query","schema":{"type":"string"},"description":"Comma separated: planned, confirmed, in_progress, completed, cancelled, issue, ready_billing, billed"},{"name":"location_id","in":"query","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Assignments. At most 2000 rows; meta.truncated marks a capped answer.","headers":{"ETag":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Assignment"}},"meta":{"type":"object","properties":{"date":{"type":"string","format":"date"},"from":{"type":"string","format":"date"},"to":{"type":"string","format":"date"},"count":{"type":"integer"},"truncated":{"type":"boolean"}}}}},"example":{"data":[{"id":"6f1c2a90-4b7e-4d21-9a3f-2c8e5b7d1a04","tenant_id":"0b9e4c3a-1d2f-4e5a-8b6c-7d8e9f0a1b2c","assignment_number":"E-10042","scheduled_date":"2026-07-01","start_time":"15:00:00","end_time":"17:00:00","duration_min":120,"status":"completed","location_id":"3d5e7f9a-2b4c-4d6e-8f0a-1b3c5d7e9f2a","customer_name":"Bäckerei Sonnenschein GmbH","location_name":"Filiale Lindenallee","location_street":"Lindenallee","location_house_number":"12","location_postal_code":"12345","location_city":"Musterstadt","crew":[{"name":"Mia B.","status":"completed","checked_in_at":"2026-07-01T13:00:00+00:00","checked_out_at":"2026-07-01T15:02:11+00:00"}]}],"meta":{"date":"2026-07-01","count":1}}}}},"304":{"description":"Not modified since the ETag sent in If-None-Match."},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}