Create

Create Single Person

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

Required Properties

Property

Data Type

Description

first_name

String

First Name

last_name

String

Last Name

is_user

Boolean

Can the Person log into the app.

is_assignable

Boolean

Is the Person assignable

status

String

Valid 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_ids

Array of Strings

This 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

Property

Data Type

Description

password

String

If 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_id

String

UUID of the Notification Profile that you want tied to the user.

Optional Properties

Property

Data Type

Description

phone

String

Person'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_sms

Boolean

Allow 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

email

String

A 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_email

Boolean

Allow 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_mobile

Boolean

Allow 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_1

String

First part of Address

address_2

String

Second part of Address

state_province

String

State/Province

city_town

String

City/Town

zipcode

String

Zipcode/Postal

country

String

Country

job_title_id

String

A UUID reference to a Job Title in your LaborChart System

hourly_wage

Number

Hourly wage rate. This is used for automatic spend tracking on projects

employee_number

String

Any value you use internally as an employee identifier

emergency_contact_name

String

Emergency Contact Name

emergency_contact_number

String

Emergency Contact Number

emergency_contact_email

String

Emergency Contact Email

emergency_contact_relation

String

Person's relationship to Emergency Contact

dob

ISO Date String / UTC Date String / MS Numeric Representation of Epoch Time

Person's date of birth. This supports 3 ingestion methods to be as flexible as possible.

is_male

Boolean

Gender

hired_date

ISO Date String / UTC Date String / MS Numeric Representation of Epoch Time

Date of Person's hire

tag_instances

Array of Object

See Tag Instances section below

language

String

Valid 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 exists for an active user 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