{"openapi":"3.1.0","info":{"title":"POST /api/v1/inventory/import/analyze","version":"1.0.0","description":"Analyze spreadsheet (async)"},"servers":[{"url":"https://api.ondayzero.com","description":"Production"}],"paths":{"/api/v1/inventory/import/analyze":{"post":{"tags":["inventory:import"],"summary":"Analyze spreadsheet (async)","description":"Upload an Excel or CSV file. Returns a task_id immediately; the AI analysis runs in the background. Poll GET /analyze/{task_id} for the result.","operationId":"analyze_spreadsheet_api_v1_inventory_import_analyze_post","parameters":[{"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":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_analyze_spreadsheet_api_v1_inventory_import_analyze_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyzeTaskResponse"}}}},"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"}}}},"422":{"description":"Validation Error - Invalid data format","content":{"application/json":{"example":{"detail":[{"loc":["body","field"],"msg":"field required","type":"value_error.missing"}]}}}}}}}},"components":{"schemas":{"AnalyzeTaskResponse":{"properties":{"task_id":{"type":"string","title":"Task Id","description":"Poll GET /analyze/{task_id} for results."}},"type":"object","required":["task_id"],"title":"AnalyzeTaskResponse","description":"Immediate response from POST /analyze — analysis runs in background."},"Body_analyze_spreadsheet_api_v1_inventory_import_analyze_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_analyze_spreadsheet_api_v1_inventory_import_analyze_post"}},"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Token","description":"API token authentication. Format: `Bearer dz_...`"}}},"security":[{"BearerAuth":[]}]}