Minor Rule and School Calendar Assignments

Minor Rules are legally binding scheduling rules and penalties that regulate minor employees, who are typically aged 14 to 18. The age range may vary by jurisdiction. School calendars define a minor employee's school schedule and work in conjunction with Minor Rules to meet a jurisdiction's rules and regulations concerning the employment of minors.

Scheduler and the Auto-Scheduler can schedule minor employees according to labor laws in their jurisdiction. Different Minor Rule sets can be configured for each jurisdiction.

You can assign, update, delete, and retrieve details about minor rule and school calendar assignments using operations against the /v1/commons/persons/minor_rules resource.

Prerequisites

A person's person ID is the same as the personKey and employee ID, and is not the same as the person number.

The person in this example has a person ID of 100 and a person number of 20190.

Example

In this example, we retrieve a list of available minor rules and then assign, verify, update, and delete a person's minor rule assignments.

Retrieve available minor rule sets

Call GET /v1/scheduling/minor_rule_sets to retrieve a list of all available minor rule sets. The response returned will resemble the example below.

[
    {
        "id": 1,
        "name": "USNJPP",
        "description": "US New Jersey Parental Permission Minor Rule 16 17",
        "active": true
    },
    {
        "id": 10,
        "name": "USOR",
        "description": "US Oregon Minor Rule 16 17",
        "active": true
    },
    {
        "id": 9,
        "name": "USNY",
        "description": "US New York Minor Rule 16 17",
        "active": true
    },
    {
        "id": 7,
        "name": "USNJ",
        "description": "US New Jersey Minor Rule 16 17",
        "active": true
    },
    {
        "id": 6,
        "name": "USMN",
        "description": "US Minnesota Minor Rule 16 17",
        "active": true
    },
    {
        "id": 8,
        "name": "USNV",
        "description": "US Nevada Minor Rule 16 17",
        "active": true
    },
    {
        "id": 4,
        "name": "USWIHS",
        "description": "US Wisconsin Home Schooled Minor Rule 16 17",
        "active": true
    },
    {
        "id": 5,
        "name": "USMD",
        "description": "US Maryland Minor Rule 16 17",
        "active": true
    },
    {
        "id": 3,
        "name": "USWASV",
        "description": "US Washington Special Variance Minor Rule 16 17",
        "active": true
    },
    {
        "id": 2,
        "name": "USNYPP",
        "description": "US New York Parental Permission Minor Rule 16 17",
        "active": true
    }
]

Retrieve available school calendars

Call GET /v1/scheduling/school_calendars to retrieve a list of all available school calendars. The response returned will resemble the example below.

[
    {
        "id": 1,
        "name": "Universal School Calendar",
        "description": "Universal school calendar where school is in session all year",
        "active": true
    }
]

Create the assignment

The create request:

  • uses personIdentity to identify the person using their person key
  • uses minorRule to define the minor rule to assign
  • uses schoolCalendar to define the school calendar to assign

Example request

Call PUT /v1/commons/persons/minor_rules with the following request payload.

{ 
   "personIdentity":{ 
      "personKey":100
   },
   "minorRule":{ 
      "qualifier":"USWIHS"
   },
   "schoolCalendar":{ 
      "qualifier":"Universal School Calendar"
   }
}

Example response

A success response returns HTTP status code 200 and a response body similar to the following example.

{
    "personIdentity": {
        "personKey": 100
    },
    "minorRule": {
        "qualifier": "USWIHS"
    },
    "schoolCalendar": {
        "qualifier": "Universal School Calendar"
    },
    "emancipatedMinor": false
}

Verify the assignment

To verify, you can call GET /v1/commons/persons/minor_rules?person_number={personNumber} or GET /v1/commons/persons/minor_rules/{personId}.

Calling GET /v1/commons/persons/minor_rules?person_number=20190 or GET /v1/commons/persons/minor_rules/100 returns:

{
    "personIdentity": {
        "personKey": 100,
        "personNumber": "20190"
    },
    "minorRule": {
        "id": 4,
        "qualifier": "USWIHS"
    },
    "schoolCalendar": {
        "id": 1,
        "qualifier": "Universal School Calendar"
    },
    "emancipatedMinor": false
}

Update the assignment

To update a person's minor rule and school calendar assignment, call PUT /v1/commons/persons/minor_rules with the following request payload.

Example request

{ 
   "personIdentity":{ 
      "personKey":100
   },
   "minorRule":{ 
      "qualifier":"USMD"
   },
   "schoolCalendar":{ 
      "qualifier":"Maryland School Calendar"
   }
}

Example response

{
    "personIdentity": {
        "personKey": 100
    },
    "minorRule": {
        "qualifier": "USMD"
    },
    "schoolCalendar": {
        "qualifier": "Maryland School Calendar"
    },
    "emancipatedMinor": false
}

Delete an assignment

To delete a person's minor rule and school calender assignment, call PUT /v1/commons/persons/minor_rules and remove the unwanted minor rule and school calendar assignment from the request. You may remove the assignment of only the minor rule or only the school calendar.

For our example, to remove the Maryland School Calendar assignment, submit the following request payload. Passing an empty object for minorRule will likewise remove the minor rule assignment.

Example request

{ 
   "personIdentity":{ 
      "personKey":100
   },
   "minorRule":{ 
      "qualifier":"USMD"
   },
   "schoolCalendar":{}
}

Example response

{
    "personIdentity": {
        "personKey": 100
    },
    "minorRule": {
        "qualifier": "USMD"
    },
    "schoolCalendar": {}
}