Create

Create Single Person

POST - /v2/companies/<company_id>/people

Required Properties

PropertyData TypeDescription
first_nameStringFirst Name
last_nameStringLast Name
is_userBooleanCan the Person log into the app.
is_assignableBooleanIs the Person assignable
statusStringValid Options:
active, inactive
Active People are visible on all pages, Inactive people are hidden unless filtered on but not removed from the system unlike deleting a Person. Inactive People DO NOT count against billing plans.
group_idsArray of StringsThis is an array of Group IDs that the person belongs to/has access to. The only time this can be left empty is if a Person is a Admin

Required Properties if is_user = true

PropertyData TypeDescription
emailStringThe email that a Person will log in with.
permission_level_idStringUUID of the Permission Level that you want for the user's access.
no_inviteBooleanOPTIONAL. If you would like to setup the person to have all of their user properties but not yet receive a user invite to the platform, you can include this property with a true value. You can then allow an Admin to manually trigger the user's invitation via a invite button on the users profile in the platform.

Optional Properties if is_user = true

PropertyData TypeDescription
passwordStringIf provided, this will be the password for the Person to log in with. If not provided, the Person will be sent an email to join their account and set a password.

LaborChart passwords must be complex. They require at least 1 uppercase, 1 lowercase, 1 number and must be 8 characters or longer.
notification_profile_idStringUUID of the Notification Profile that you want tied to the user.

Optional Properties

PropertyData TypeDescription
phoneStringPerson's phone number. Needs to include country code and area code and be unique amongst all of phone numbers registered to People in your company.

Note: sending an empty string can result in unexpected errors. Pass in null or do not define the field at all if the person should not have a phone number.
can_recieve_smsBooleanAllow the Person to receive SMS notifications. Useful if you want to store someone's phone number but don't want to hit them with SMS for any reason.

Default: false
emailStringA Person's email. If a person can log in this is already populated per above. Emails must be unique amongst People within your company.
can_recieve_emailBooleanAllow the Person to receive Email notifications. Useful if you want to store someone's email but don't want to hit them with Emails for any reason.

Default: false
can_recieve_mobileBooleanAllow the Person to receive push notifications on their mobile device if someone has the LaborChart app installed. This field is only relevant for people that are enabled as a user.

Default: true
address_1StringFirst part of Address
address_2StringSecond part of Address
state_provinceStringState/Province
city_townStringCity/Town
zipcodeStringZipcode/Postal
countryStringCountry
job_title_idStringA UUID reference to a Job Title in your LaborChart System
hourly_wageNumberHourly wage rate. This is used for automatic spend tracking on projects
employee_numberStringAny value you use internally as an employee identifier
emergency_contact_nameStringEmergency Contact Name
emergency_contact_numberStringEmergency Contact Number
emergency_contact_emailStringEmergency Contact Email
emergency_contact_relationStringPerson's relationship to Emergency Contact
dobISO Date String / UTC Date String / MS Numeric Representation of Epoch TimePerson's date of birth. This supports 3 ingestion methods to be as flexible as possible.
is_maleBooleanGender
hired_dateISO Date String / UTC Date String / MS Numeric Representation of Epoch TimeDate of Person's hire
tag_instancesArray of ObjectSee Tag Instances section below
languageStringValid Options: english - future roadmap includes more global locale support

Tag Instances

In your LaborChart System you can set up Tags to act as categorical labels or expiring certifications. To apply them to a Person while creating follow the formatting below.

To add a tag to the initial creation data for a Person you simply need to include an object like the one below in the tag_instances array per tag you would like to apply. In these Tag Instance objects, the tag_id will reference the UUID for the Tag you are referencing. If the Tag you are referencing requires an expiration date, you will provide the expr_date key/val pair in this object as well. If the Tag doesn't require an expiration date, you can leave that property out. The expr_date can handle 1 of 3 date types for ingesting per the LaborChart API Conventions. These types are ISO String, UTC String, MS numeric representation of Epoch Time.

Ex:

{
  "tag_instances": [
    {
      "tag_id": "2d2ad78e-c6de-467e-8413-c616b55294a5"
    },
    {
      "tag_id": "94186279-fa66-42c6-a2ca-f44dde84f584",
      "expr_date": 1511223730847
    }
  ]
}

Responses:

Successful Response

A successful creation of a Person will return the newly created UUID for that record.

{"id": "aeee8fc5-b8ee-4bf0-bca9-86f751f99795"}

[409] Failed Response - Duplicate Phone or Email

If you try to create a new Person and include a phone or email value that already exist in your company, you will get a 409 error with the following JSON body.

{
   "code": "ConflictError",
   "message": {
      "detailCode": "personEmailOrPhoneConflict",
      "details": "An already existing email or phone was found"
   }
}

What’s Next