Developer portal
POST /hospital/callout/solve
Run the hospital re-staffing pipeline: classical baseline, hybrid audit, scoreboard, and timeline.
PilotPOST /hospital/callout/solveAuth required
Summary
Run the hospital re-staffing pipeline: classical baseline, hybrid audit, scoreboard, and timeline.
Example
curl
curl -X POST "https://sparkling-vibrancy-production-1a7a.up.railway.app/optimize" \
-H "Authorization: Bearer 811f31d4-5b8e-4ed0-a7a2-8176e05eba63" \
-H "Content-Type: application/json" \
-d '{
"scenarioId": "callout-cath-acls",
"useFixture": true,
"seed": 1234
}'Request body
| Field | Type | Required | Description |
|---|---|---|---|
| scenarioId | string | No (callout-cath-acls) | Scenario to simulate. |
| useFixture | boolean | No (true) | Use bundled fixture data when true. |
| rosterSessionId | string | No | Session from upload-roster; overrides fixture roster when set. |
| seed | integer | No (1234) | Reproducibility seed for research comparisons. |
Response
| Field | Type | Required | Description |
|---|---|---|---|
| scoreboard | Scoreboard | Yes | Buyer-facing KPIs and method comparison. |
| classicalCandidate | CandidatePlan | Yes | CP-SAT baseline plan. |
| hybridCandidates | CandidatePlan[] | Yes | Bounded QAOA alternates when eligible. |
| auditPacks | AuditPack[] | Yes | Traceable decision artifacts. |
Errors
| Code | Meaning | Typical cause | Suggested fix |
|---|---|---|---|
| 400 | Bad request | Malformed JSON or missing required headers. | Validate Content-Type and JSON syntax before retrying. |
| 401 | Unauthorized | Missing or invalid API key in Authorization or x-api-key header. | Send Bearer <key> or x-api-key with a valid pilot token. |
| 422 | Unprocessable entity | Invalid payload shape, unsupported problem type, or infeasible constraints. | Fix field errors in the response detail; relax constraints and retry. |
| 429 | Too many requests | Per-key rate limit exceeded (default 120 requests per minute). | Backoff with jitter; cache results; request a higher limit for production. |
| 500 | Internal server error | Unexpected backend failure. | Retry with exponential backoff; contact support if persistent. |
| 501 | Not implemented | Problem type not yet supported on the live solver path (routing, allocation). | Use type schedule for live jobs, or follow the roadmap for routing/allocation. |
See the full errors reference.
Related
Found an issue? Report documentation feedback