v2 keeps the same core rostering concepts, but the API surface has been
cleaned up considerably.
Before you migrate
Before updating your v1 integration code, make sure your v2 access is in place.- Request a new
Automatic Rosteringintegration in the Visma Developer Portal. See Authentication for the full application setup, integration request, and credential flow. - Regenerate your API types or client code from the current v2 OpenAPI specification at
/openapi.yaml. This helps catch renamed fields such asjobInfo→contextandconstraints→rulesearly in your migration.
/jobsbecomes the/roster/*workflowjobInfobecomescontextconstraintsbecomerulesconfigurationmoves intoextensions
API workflow
| v1 | v2 | What changed |
|---|---|---|
POST /jobs | POST /roster/start | Starts a roster job |
GET /jobs/{id} | GET /roster/status/{jobId} | Status response shape changed |
GET /jobs/{id}/result | GET /roster/result/{jobId} | Can now return 202 Accepted while processing |
PUT /jobs/{id} | POST /roster/stop/{jobId} | Stop endpoint moved and changed method |
Start response
Start response
Start calls return only the
jobIdStatus response
Status response
Status calls return
updatedAt, status, and hasResult. hasResult indicates whether calling the result endpoint will produce anything.Result polling
Result polling
Result calls can return
202 Accepted while no result is available yetRequest payload
The fastest way to understand the migration is to compare the top-level payloads.v1 payload shape
v1 payload shape
v2 payload shape
v2 payload shape
Top-level field mapping
| v1 | v2 | Notes |
|---|---|---|
jobInfo.id | context.planId | planId is used to indicate that multiple jobs solved for the same plan |
customer_id and user_id headers | context.identity.tenantId context.identity.userId | Identity context is now sent in body instead of headers |
jobInfo.planningHorizon | context.horizon | Horizon is now grouped under context |
jobInfo.demandType | context.demandType | Same concept, new location |
constraints | rules | All rule collections were renamed |
configuration.labels | extensions.labeling | Label definitions moved into extensions |
configuration.bonusTimeRules | extensions.timeAccounting.bonusTimeSettings | Time-accounting settings moved under extensions |
configuration.defaultTimeRules | extensions.timeAccounting.defaultTimeSettings | Same semantics, new location |
configuration.fteBelongsToShift | extensions.timeAccounting.horizon.includeFullShifts | Same intent, more explicit naming |
jobInfo.planningHorizon.fteStartDay | extensions.timeAccounting.horizon.startDay | Moved out of jobInfo.horizon |
jobInfo.planningHorizon.fteEndDay | extensions.timeAccounting.horizon.endDay | Moved out of jobInfo.horizon |
The v1 field
planningHorizon.nrOfWeeks does not exist in the v2 contract.
Build your v2 solve horizon with startDate, endDate, and scheduleType.
Note that this now makes it possible to create recurring schedules that start
on different days than Monday (though the horizon should still be a multiple
of 7 days).Constraints are now rules
Most of the solver model is still familiar, but the terminology has changed consistently fromconstraint to rule.
| v1 collection | v2 collection |
|---|---|
employeeAvailabilityConstraints | availabilityRules |
employeeUtilizationConstraints | utilizationRules |
cooldownConstraints | cooldownRules |
consecutiveConstraints | consecutiveRules |
patternConstraints | patternRules |
periodicRestConstraints | periodicRestRules |
periodDistributionConstraints | periodDistributionRules |
layoutConstraints | layoutRules |
rotationConstraints | rotationRules |
fairnessConstraints | fairnessRules |
STRICT.
Rule payload changes to watch
Beyond theconstraint to rule rename, v2 also uses grouped fields more
consistently. The main pattern is that target values now live under targets
and advanced configuration now lives under options.
Utilization
Utilization
bonusTime→options.bonusTimeoverlapRules→options.overlapSettings
Pattern
Pattern
emptyDayBehaviours→options.emptyDayBehaviours
Periodic Rest
Periodic Rest
blockedPeriods→options.blockedPeriodsperiodGroups→options.periodGroups
Period Distribution
Period Distribution
minWorkedPeriods→targets.minWorkedPeriodsmaxWorkedPeriods→targets.maxWorkedPeriodsmaxConsecutiveWorkedPeriods→targets.maxConsecutiveWorkedPeriodsminSurroundingFreePeriods→targets.minSurroundingFreePeriodsoverlapRules→options.overlapSettings
Fairness
Fairness
filters.constraints→filters.rulesapplyConstraintImportanceScaling→applyRuleImportanceScalingconstraintFactors→ruleFactors
Concepts being reworked for v2
Treat these concepts as temporarily unavailable rather than permanently gone:shiftTemplatesare not yet exposed in the current v2 OpenAPI contractconnectedShiftsPreviousDayandconnectedShiftsNextDayare also not part of the current v2 OpenAPI contract- If your v1 integration depends on these concepts, keep your migration layer flexible so you can adopt the new v2 implementation once it lands
Continue with v2
Quickstart
Build a fresh v2 roster request from scratch.
Rules
Browse the v2 rule model in more detail.
