---
title: "Submit a stateless solve job"
method: POST
path: "/api/v1/solve"
tags: ["Stateless Solve"]
---

# Submit a stateless solve job

`POST /api/v1/solve`

## Request

- Base URL: `https://api.vigotime.com`
- URL: `https://api.vigotime.com/api/v1/solve`
- Auth: none declared

Accept a self-contained payload and start an async solve. Returns a job id to poll.

## Request body

- SolveRequest: Self-contained solve request — all data travels in the payload, no server-side lookups.
  - `area_groups` object[], nullable: Area groups (vigotime entity format)
  - `availability` object, nullable: Verfügbarkeit je Mitarbeiter und Datum: {employeeId: {'2026-09-01': true}}. false = an dem Tag nicht einsetzbar.
  - `collective_agreements` object, nullable: Collective agreements (agreement_id -> agreement; vigotime entity format). Carries the FR-239 tariff working-time limits so a tariff-bound stateless solve enforces them (DEF-BRAVO-STATELESS-COLLECTIVE-AGREEMENT-01).
  - `config` GenerationConfigSchema: Configuration for schedule generation.
    - `enabled_constraints` string[], nullable: List of constraint names to enable (None = all)
    - `enabled_objectives` string[], nullable: List of objective names to enable (None = all)
    - `max_solutions` integer: Number of alternative solutions to generate (1-5)
    - `num_workers` integer: Number of solver threads (0 = auto)
    - `objective_weights` object, nullable: Custom weights for objectives
    - `timeout_seconds` integer: Maximum solving time in seconds (5-600)
  - `department` object, required: Department as JSON object in the vigotime entity format (camelCase)
  - `employee_boundary_week_hours` object, nullable: Bereits gearbeitete Stunden in der ISO-Woche des Fensterstarts, VOR dem Start, je MA. Für die Wochenkappe der angeschnittenen Woche.
  - `employee_history` object, nullable: Gearbeitete Tage vor dem Fenster je MA (ISO-Daten). Für Folgetage- und datums-gekoppelte Regeln über die Plangrenze.
  - `employee_last_shift_end` object, nullable: Endzeitpunkt der letzten Schicht vor dem Fenster je MA (ISO-Datetime, tz-aware empfohlen). Für die Mindestruhe am ersten Plantag.
  - `employee_prior_night_run` object, nullable: Länge der am Vortag endenden Nachtserie je MA. Für Nachterholung über die Plangrenze.
  - `employees` object[], required: Employees as JSON objects in the vigotime entity format (camelCase)
  - `end_date` string, date, required: Last day of the planning window (inclusive)
  - `holiday_dates` string[], nullable: Feiertage als ISO-Datumsliste (z. B. ['2026-12-25']). Steuert holiday/isHoliday-Regeln; ohne Angabe gilt der eingebaute deutsche Feiertags-Superset.
  - `hourly_rates` object, nullable: Per-employee hourly rate
  - `locked_assignments` object[], nullable: Vorbelegte/handgesetzte Schichten, die fix bleiben. Je Eintrag {employeeId, shiftDefinitionId, date}. Der Solver plant um sie herum.
  - `planning_rules` object[], nullable: Planning rules (vigotime entity format)
  - `preferences` object, nullable: Per-employee preferences
  - `previous_assignments` object[], nullable: Zuweisungen des Vorplans (Stabilität/Replan): {employeeId, shiftId, date}. Der Solver bleibt möglichst nah daran (minimale Änderung).
  - `qualifications` object, nullable: Employee qualifications (employee_id -> qualification ids); derived from employees if omitted
  - `shifts` object[], required: Shift definitions as JSON objects in the vigotime entity format (camelCase)
  - `sick_leaves` object, nullable: Sick-leave dates per employee
  - `social_points` object, nullable: Social-Points-GUTHABEN je Mitarbeiter: {employeeId: 100}. Die Punkte, die eine Person für Wunscherfüllungen 'ausgeben' kann. Überschreibt ein ggf. am Mitarbeiter gesetztes socialPoints-Feld. Zusammen mit wish_costs aktiv → weiches Budget: die Summe der gewährten Wunschkosten SOLL das Guthaben nicht übersteigen (Überschreitung = Strafe, nie unlösbar). Ohne wish_costs wirkungslos.
  - `soft_code_assignments` object, nullable: Kürzel als weiche Vorgaben, gruppiert nach {'should': [...], 'may': [...]}. Je Eintrag {employeeId, date, ...}.
  - `staffing_rules` object[], nullable: Staffing rules (vigotime entity format)
  - `start_date` string, date, required: First day of the planning window (inclusive)
  - `vacations` object, nullable: Vacation dates per employee
  - `webhook_secret` string, nullable: Optional shared secret. If set, the webhook request carries an HMAC-SHA256 signature in the X-Vigotime-Signature header.
  - `webhook_url` string, nullable: Optional https URL that is POSTed once the solve finishes (completed or failed).
  - `wish_costs` object, nullable: KOSTEN (pointCost) einer Wunscherfüllung je Mitarbeiter und Datum: {employeeId: {'2026-09-03': 20}}. Der bezahlte Preis eines gewünschten freien Tages (z. B. baseCostPerDay × dayTypeMultiplier × priorityMultiplier). Wenn gesetzt, gewichtet der Solver das Honorieren PROPORTIONAL zum Preis (mehr bezahlt → stärker honoriert), statt nur nach grobem low/normal/high-Label. Speist zudem das Social-Points-Budget.
  - `wish_priorities` object, nullable: Wunsch-Priorität je Mitarbeiter und Datum: {employeeId: {'2026-09-03': 'high'}}. low/normal/high → Gewicht 0.5/1.0/2.0 (Social-Points-Gewichtung).
  - `wish_specs` object, nullable: Differenzierte Wunsch-Spezifikationen je MA (z. B. Wochenend-Atomarität, Serien). Feinere Steuerung als die flache wishes-Map.
  - `wishes` object, nullable: Wished dates per employee
  - `workplace_duration_rules` object[], nullable: Workplace duration rules (vigotime entity format): target/covered duration per person at a workplace on the wp_assign axis. severity 'must' -> HARD bound, 'should' -> SOFT target. Omitted/empty -> inert (B0 Phase 3, Issue #57 Feature-2/B1).
  - `workplaces` object[], nullable: Workplaces (vigotime entity format)

## Response `202`

Successful Response

- SolveSubmitResponse: Response when a solve job is accepted.
  - `job_id` string, required
  - `prechecks` object[]: #275 Rückfrage-Kanal: Warnungen VOR dem Solve, z. B. RULE_NEEDS_FUTURE_CONTEXT — eine Kopplungsregel blockt Tage nach dem Fenster, aber die Anfrage enthält keine Abwesenheiten dafür. Der Job läuft trotzdem; KI-Clients sollen die Rückfrage an den Nutzer weiterreichen und fehlende Daten nachliefern.
  - `status` string, required
  - `tier` string, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/vigotime/apis/vigotime-public-api.md) · [All operations](https://skmtc.dev/vigotime/apis/vigotime-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/vigotime/apis/vigotime-public-api/revisions/bf944033e400?raw)
