Creating a request

A full payload

We covered these fields individually in the previous sections. This JSON shows how it looks like all together. We added in-line comments for your convenience.

{
  "employees": [ // The list of employees who takes shifts for the duration of the schedule
    {
      "id": 1, // This has to be a unique integer for every user
      "teams": [
        {
          "id": 1, // This has to be a unique integer for every team should be found the teams in the "shifts" part of the payload.
          "start": "2020-06-28T09:00:00+00:00", // In case the employee is only assigned to this team for a limited period, otherwise null
          "end": "2025-06-28T09:00:00+00:00" // In case the employee is only assigned to this team for a limited period, otherwise null
        }
      ],
      "skills": [
        {
          "id": 1,  // This has to be a unique integer for every skill should be found the skill in the "shifts" part of the payload.
          "start": "2020-06-28T09:00:00+00:00", // In case the employee has this skill for a limited period, otherwise null
          "end": "2025-06-28T09:00:00+00:00" // In case the employee has this skill for a limited period, otherwise null
        }
      ],
      "contract": {
        "hoursBetweenShift": 11, // If not relevant set to a LOW number such as 0.
        "maxHoursDay": 12, // If not relevant set to a HIGH number such as 999.
        "maxHoursWeek": 50, // If not relevant set to a HIGH number such as 999.
        "maxHoursMonth": 190, // If not relevant set to a HIGH number such as 999.
        "maxWorkDaysMonth": 20, // If not relevant set to a HIGH number such as 999.
        "maxConsecutiveDays": 4, // If not relevant set to a HIGH number such as 999.
        "minConsecutiveDays": 2, // If not relevant set to a LOW number such as 0.
        "weekendWorkFrequency": 4, // How often do you work weekends. If not relevant set to a LOW number, ie. 1
        "maxNhours": 144, // This one goes together with InKWeeks, so in this configuration the employee will never work more than 144 hours over a 4 week period.
        "InKWeeks": 4, // In most labour-unionized contracts you deduct parts of the maxNhours when there are vacations or national holidays.
        "maxConsecutiveLateShifts": 3, // If not relevant set to a HIGH number such as 999.
        "maxConsecutiveNightShifts": 4 // If not relevant set to a HIGH number such as 999.
      },
      "wishes": [ // The times periods where the employee cannot (or wants to) work
        {
          "type": "UNAVAILABLE", // UNAVAILABLE = cannot work, UNDESIRED =  would rather not work and DESIRED = wants to work.
          "start": "2020-06-28T09:00:00+00:00",
          "end": "2025-06-28T09:00:00+00:00"
        }
      ]
    }
  ],
  "shifts": [
    {
      "id": 1, // This has to be a unique integer for every shift.
      "spot": 1, // This has to be in the "spots" part of the payload.
      "start": "2020-06-28T09:00:00+00:00", // The time the shift starts.
      "end": "2020-06-28T16:00:00+00:00", // The time the shift end.
      "importance": "MANDATORY", // the importance of assigning this shift. Can be MANDATORY and OPTIONAL.
      "suggestedEmployees": [ // If you prefer certain employees to take the shift, suggest it to the AI here.
        1
      ],
       "allowedCollisionSpots": [ // If you want to circumvent employees.*.contract.hoursBetweenShift for a group of shifts
          1
       ],
      "fixed": true, // If fixed, you must assign an employee and we wont change that employee.
      "historic": false, // If historic, we will use this shift to seed the solver and won't change it. Use this flag if past shifts are important for contractual terms such as consecutive days of work. 
      "employee": 1, // If fixed is false, set this to null, and we will assign an employee.
      "foreignInt": 5 // To be able to assist you in the best way of potential issues/questions, this can help you and us the best way to track down the issues/questions. This field is OPTIONAL, if filled, make it a unique integer.
    }
  ],
  "spots": [
    {
      "id": 1, // This has to be a unique integer for every spot.
      "teams": [ // This has to be a unique integer for every team should be found the teams in the "employees.*.teams" part of the payload.
        1
      ],
      "skills": [ // This has to be a unique integer for every skill should be found the skills in the "employees.*.skills" part of the payload.
        1
      ],
      "foreignInt": 10 // To be able to assist you in the best way of potential issues/questions, this can help you and us the best way to track down the issues/questions. This field is OPTIONAL, if filled, make it a unique integer.
    }
  ],
  "settings": {}, // Unless you have worked with this API before just leave "settings" as an empty object, i.e {} and we will add the correct values. Otherwise, see the possible keys and values in the Swagger-documentation.
  "callbackUrl": "https://www.yourdomain.app/custom_callback_url",
  "callbackAuthenticationHeaderName": "X-Api-Key",
  "callbackAuthenticationHeaderValue": "SECRET"
}
Previous
Settings