Skip to main content

API Reference

Automatic Rostering (json_alpha)

Download OpenAPI specification:Download

Visma Connect Token Retrieval

  1. Create a POST request to the Visma Connect API:

  2. In the header of your request, specify Content-Type: application/x-www-form-urlencoded.

  3. In the request body, specify the following parameters:

    • grant_type: client_credentials
    • client_id: YOUR_ID_FROM_STEP_1.3
    • client_secret: YOUR_SECRET_FROM_STEP_1.9
    • scope: SCOPE_FROM_STEP_1.7
  4. Send the request and retrieve the access_token from the response.

  5. Include the Authorization header with the Bearer YOUR_ACCESS_TOKEN for all your requests to the Automatic Rostering API.

  6. You are now ready to make requests to the Automatic Rostering API.

For more information about Visma Connect OAuth 2.0 Bearer Token Authentication, refer to Visma Connect Confluence.

Feasibility

Endpoints for checking feasibility of jobs

Feasibility Check

Check jobs feasibility.

Authorizations:
vismaConnectBearer
header Parameters
CUSTOMER_ID
required
string
Example: resolve
USER_ID
required
string
Example: dev_team
Request Body schema: application/json
required
required
object (jobInfo)

Details about the job that the solver will solve.

Array of objects (shift)

List of shifts that employees can be assigned to.

Array of objects (shiftTemplate)

List of shift templates that the solver can use to generate shifts.

required
Array of objects (employee) non-empty

List of employees to be used in this roster.

Array of objects (taskGroup)

List of task groups used in this roster.

Array of objects (task)

List of tasks used in this roster.

Array of objects (timeSlot)

List of time slots for which demand can be specified (only if using TIME_DEMAND)

required
Array of objects (demand)

List of demands used in this roster.

object

Constraints that should be active for this solver run. Used to specify all sorts of preferences, rules and restrictions.

required
object (configuration)

Configurations for this solver run.

Responses

Request samples

Content type
application/json
{
  • "jobInfo": {
    },
  • "shifts": [
    ],
  • "employees": [
    ],
  • "timeSlots": [
    ],
  • "demands": [
    ],
  • "constraints": { },
  • "configuration": {
    }
}

Response samples

Content type
application/json
{
  • "version": "string",
  • "status": [
    ],
  • "warnings": [
    ],
  • "infeasibilities": [
    ],
  • "errors": [
    ],
  • "timeouts": [
    ]
}

Feasibility Check V2 Deprecated

[WILL BE REMOVED]. Use /feasibility instead. Both feasibility endpoints have the same functionality and schema.

Authorizations:
vismaConnectBearer
header Parameters
CUSTOMER_ID
required
string
Example: resolve
USER_ID
required
string
Example: dev_team
Request Body schema: application/json
required
required
object (jobInfo)

Details about the job that the solver will solve.

Array of objects (shift)

List of shifts that employees can be assigned to.

Array of objects (shiftTemplate)

List of shift templates that the solver can use to generate shifts.

required
Array of objects (employee) non-empty

List of employees to be used in this roster.

Array of objects (taskGroup)

List of task groups used in this roster.

Array of objects (task)

List of tasks used in this roster.

Array of objects (timeSlot)

List of time slots for which demand can be specified (only if using TIME_DEMAND)

required
Array of objects (demand)

List of demands used in this roster.

object

Constraints that should be active for this solver run. Used to specify all sorts of preferences, rules and restrictions.

required
object (configuration)

Configurations for this solver run.

Responses

Request samples

Content type
application/json
{
  • "jobInfo": {
    },
  • "shifts": [
    ],
  • "employees": [
    ],
  • "timeSlots": [
    ],
  • "demands": [
    ],
  • "constraints": { },
  • "configuration": {
    }
}

Response samples

Content type
application/json
{
  • "version": "string",
  • "status": [
    ],
  • "warnings": [
    ],
  • "infeasibilities": [
    ],
  • "errors": [
    ],
  • "timeouts": [
    ]
}

Optimization

Endpoints for starting, stopping, and retrieving jobs

Start Job

Start a new solver job.

Authorizations:
vismaConnectBearer
header Parameters
CUSTOMER_ID
required
string
Example: resolve
USER_ID
required
string
Example: dev_team
Request Body schema: application/json
required
required
object (jobInfo)

Details about the job that the solver will solve.

Array of objects (shift)

List of shifts that employees can be assigned to.

Array of objects (shiftTemplate)

List of shift templates that the solver can use to generate shifts.

required
Array of objects (employee) non-empty

List of employees to be used in this roster.

Array of objects (taskGroup)

List of task groups used in this roster.

Array of objects (task)

List of tasks used in this roster.

Array of objects (timeSlot)

List of time slots for which demand can be specified (only if using TIME_DEMAND)

required
Array of objects (demand)

List of demands used in this roster.

object

Constraints that should be active for this solver run. Used to specify all sorts of preferences, rules and restrictions.

required
object (configuration)

Configurations for this solver run.

Responses

Request samples

Content type
application/json
{
  • "jobInfo": {
    },
  • "shifts": [
    ],
  • "employees": [
    ],
  • "timeSlots": [
    ],
  • "demands": [
    ],
  • "constraints": { },
  • "configuration": {
    }
}

Response samples

Content type
application/json
{
  • "jobId": "78f0aawf13a0436f916cd6gf468afc61",
  • "statusCode": "starting",
  • "link": {
    }
}

Get Job Status

Get a job status.

Authorizations:
vismaConnectBearer
path Parameters
id
required
string

Job ID

Responses

Response samples

Content type
application/json
{
  • "jobId": "78f0bb4312a04d6f906bd6afe68afa61",
  • "statusCode": "stopped",
  • "duration": 7274,
  • "links": [
    ]
}

Stop Job

Stops a running solver job.

Authorizations:
vismaConnectBearer
path Parameters
id
required
string

Job ID

Responses

Delete Job Deprecated

[WILL BE REMOVED]. Delete a stopped solver job. Expects the job in question to be in the stopped state.

Authorizations:
vismaConnectBearer
path Parameters
id
required
string

Job ID

Responses

Get Result

Returns result for job

Authorizations:
vismaConnectBearer
path Parameters
id
required
string

Job ID

Responses

Response samples

Content type
application/json
{
  • "jobInfo": {
    },
  • "infeasibleConstraints": [
    ],
  • "id": "string",
  • "organisationId": "string",
  • "scheduleType": {
    },
  • "solution": {
    }
}

Get Request

Returns the same payload as was sent to the API when starting job.

Authorizations:
vismaConnectBearer
path Parameters
id
required
string

Job ID

Responses

Response samples

Content type
application/json
{
  • "jobInfo": {
    },
  • "shifts": [
    ],
  • "employees": [
    ],
  • "timeSlots": [
    ],
  • "demands": [
    ],
  • "constraints": { },
  • "configuration": {
    }
}

Get Visualization

Get XLSX spreadsheet visualizing job results. Only available after job has some results.

Authorizations:
vismaConnectBearer
path Parameters
id
required
string

Job ID

Responses

Problem

required
object (jobInfo)

Details about the job that the solver will solve.

Array of objects (shift)

List of shifts that employees can be assigned to.

Array of objects (shiftTemplate)

List of shift templates that the solver can use to generate shifts.

required
Array of objects (employee) non-empty

List of employees to be used in this roster.

Array of objects (taskGroup)

List of task groups used in this roster.

Array of objects (task)

List of tasks used in this roster.

Array of objects (timeSlot)

List of time slots for which demand can be specified (only if using TIME_DEMAND)

required
Array of objects (demand)

List of demands used in this roster.

object

Constraints that should be active for this solver run. Used to specify all sorts of preferences, rules and restrictions.

required
object (configuration)

Configurations for this solver run.

{
  • "jobInfo": {
    },
  • "shifts": [
    ],
  • "employees": [
    ],
  • "timeSlots": [
    ],
  • "demands": [
    ],
  • "constraints": { },
  • "configuration": {
    }
}