Update
Update Project
POST - /v2/companies/<company_id>/projects/<project_id>
Valid Update Properties
All Properties outlined on the Projects - Create page are valid properties to send across the Project update endpoint except those listed below for which there are additional convenience routes. It is only necessary to send key/val pairs for properties that are being updated. No need to send values for properties that aren't being changed.
Properties with special endpoints:
Responses:
Successful Response
Returns full JSON object of the updated Project
{
"address_1": "1111 S Figueroa St" ,
"address_2": "Building 17" ,
"bid_rate": 20 ,
"city_town": "Los Angeles" ,
"closed_date": null ,
"color": "#53A9FF" ,
"categories": [
{
"subcategories": [
{
"name": "North Lot"
},
{
"name": "South Lot"
}
] ,
"name": "Phase 1" ,
} ,
{
"subcategories": [] ,
"name": "Finishing" ,
} ,
] ,
"country": "United States" ,
"created_at": 1508251600000 ,
"customer_name": "City of Los Angeles" ,
"daily_end_time": "3:30 pm" ,
"daily_start_time": "7:30 am" ,
"est_end_date": null ,
"group_ids": [
"9be574ab-fbe3-4839-a3b4-2e4bccb617ab" ,
"2ec02e52-8a14-4689-adec-bbd6161e37a4"
] ,
"project_number": "1zx212ms" ,
"name": "Airport Concourse" ,
"percent_complete": 30 ,
"project_type": "Airport" ,
"roles": [
{
"person_id": "572a480a-637e-4d0e-a02e-246b0181562c" ,
"job_title_id": "38f2a244-365f-409e-8e94-60bbae1097a6"
} ,
{
"person_id": "56f96a61-b0d2-489e-981c-572da8cf9ba1"
}
] ,
"start_date": 1509771600000 ,
"state_province": "KS" ,
"status": "active" ,
"tag_instances": [
{
"tag_id": "3f447732-33ec-4b8e-a5d0-6462c12e18e6"
} ,
{
"tag_id": "66cecf20-b095-4f65-a386-06bc25d34d94"
}
] ,
"timezone": "America/Los_Angeles" ,
"updated_at": 1509251600000 ,
"wage_overrides": [
{
"job_title_id": "38f2a244-365f-409e-8e94-60bbae1097a6" ,
"rate": 35
} ,
{
"job_title_id": "e70d45dd-27dc-43ad-ab1a-abd4c54bbe3a" ,
"rate": 122
}
] ,
"zipcode": "66085"
}
Add Project to Group
POST - /v2/companies/<company_id>/projects/<project_id>/groups
To make a Project available to a new Group simply hit this endpoint with the group_id
of the new Group in the POST body.
{"group_id": "3f447732-33ec-4b8e-a5d0-6462c12e18e6"}
Responses:
Successful Response
When a Project has successfully been associated with a new Group, all (including the new UUID) of its current Group IDs are returned so you can keep mappings up to date in your system if you desire.
{
"group_ids": [
"ea8fac53-e05f-49bc-a630-dd0c7739570b",
"aeee8fc5-b8ee-4bf0-bca9-86f751f99795",
"3f447732-33ec-4b8e-a5d0-6462c12e18e6"
]
}
Remove Project from Group
DELETE - /v2/companies/<company_id>/projects/<project_id>/groups/<group_id>
Responses:
Successful Response
When a Project has successfully been removed from a Group, all (without the removed UUID) of its current Group IDs are returned so you can keep mappings up to date in your system if you desire.
{
"group_ids": [
"ea8fac53-e05f-49bc-a630-dd0c7739570b",
"aeee8fc5-b8ee-4bf0-bca9-86f751f99795"
]
}
Add Tag Instance to Project
POST - /v2/companies/<company_id>/projects/<project_id>/tags
The POST body of this request will must contain a specified tag_id
referencing the Tag you want to apply to the Project.
{
"tag_id": "94186279-fa66-42c6-a2ca-f44dde84f584"
}
Responses:
Successful Response
A successful addition of a Tag will return a UUID representing the newly added Tag Instances.
{"id": "3f447732-33ec-4b8e-a5d0-6462c12e18e6"}
Tag ID vs Tag Instance ID
Something that can be a bit confusing is having both an
id
andtag_id
value in each Tag Instance object. The best way to keep it straight is theid
property references specifically the applied instance of the Tag where as thetag_id
actually references the Tag entity in your LaborChart system. The reason both must exist is so you can use the Tag Instance ID to remove applied tags from Projects as you will see with the endpoint below. This structure also allows for the flexibility of having two different instances of the same Tag on a single Project should you want to per the way your organization is using Tags.
Remove Tag Instance from Project
DELETE - /v2/companies/<company_id>/projects/<project_id>/tags/<tag_instance_id>
Responses:
Successful Response
If the Tag Instance was successfully removed from the Project you will receive a response with the removed Tag Instance ID
{"id": "3f447732-33ec-4b8e-a5d0-6462c12e18e6"}
Add Category to Project
POST - /v2/companies/<company_id>/projects/<project_id>/categories
The POST body should contain the below data structure. If no Subcategories are desired for this Category, the subcategories
property can be set to a empty array.
New Category Sequence
As Categories have relevant display sequence within the LaborChart Application, Categories added to a Project after it's creation will be placed at the last sequence position of the existing Categories at the time of the request.
{
"name": "Phase 1",
"subcategories": [
{"name": "Night Shift"},
{"name": "Temp"}
]
}
Responses:
Successful Response
The successful addition of a new Category to a project will return the UUID representing the Category.
{"id": "bc107873-b2fe-4f8f-9879-6d95b4a0684f"}
Update Category Name
POST - /v2/companies/<company_id>/projects/<project_id>/categories/<category_id>
To provide a new name for a Category, hit this endpoint with the the new name
value in the POST body.
{"name": "Phase 1a"}
Successful Response
Successful update of the Category will return a record of all the Categories as they now stand in the Project.
{
"categories": [
{
"id": "bc107873-b2fe-4f8f-9879-6d95b4a0684f",
"subcategories": [
{
"id": "3f447732-33ec-4b8e-a5d0-6462c12e18e6",
"name": "North Lot"
},
{
"id": "aeee8fc5-b8ee-4bf0-bca9-86f751f99795",
"name": "South Lot"
}
] ,
"name": "Phase 1a" ,
} ,
{
"id": "2d2ad78e-c6de-467e-8413-c616b55294a5",
"subcategories": [] ,
"name": "Finishing" ,
} ,
]
}
Delete Category
DELETE - /v2/companies/<company_id>/projects/<project_id>/categories/<category_id>
Warning
It should be noted that when you delete a Category that has assignments, those assignments will be stripped of their category specification and fall into the default "None" bucket for the project.
Responses:
Successful Response
When a Category is successfully removed you will be returned the UUID of the removed Category.
{
"id": "bc107873-b2fe-4f8f-9879-6d95b4a0684f"
}
Add Subcategory to Category
POST - /v2/companies/<company_id>/projects/<project_id>/categories/<category_id>/subcategories
To add a Subcategory to a Category, hit the above endpoint with a value for the name
property for the Subcategory in the POST body.
Subcategory Sequences
As the display sequence of Subcategories is relevant to the end user of the LaborChart app, new Subcategories in Categories added after creation will automatically be placed at the last sequence position behind the existing Subcategories.
{"name": "Temp Workers"}
Responses:
Successful Response
When a Subcategory is successfully added to a Category, the UUID of the new Subcategory will be returned.
{"id": "3f447732-33ec-4b8e-a5d0-6462c12e18e6"}
Update Subcategory Name
POST - /v2/companies/<company_id>/projects/<project_id>/categories/<category_id>/subcategories/<subcategory_id>
To give an existing Subcategory a new name, hit the above endpoint with the new value for the name
in the POST body.
{"name": "Temp Workers"}
Responses:
Successful Response
When a Subcategory has been successfully updated, the UUID for the updated Subcategory will be returned.
{"id": "3f447732-33ec-4b8e-a5d0-6462c12e18e6"}
Delete Subcategory from Category
DELETE - /v2/companies/<company_id>/projects/<project_id>/categories/<category_id>/subcategories/<subcategory_id>
Warning
It should be noted that when you delete a Subcategory that has assignments, those assignments will be stripped of their subcategory specification. This will not impact their category specifications.
Responses:
Successful Response
When a Subcategory is successfully removed from a Category, you will be returned the UUID of the deleted Subcategory.
{
"id": "3f447732-33ec-4b8e-a5d0-6462c12e18e6"
}
Add Wage Override
POST - /v2/companies/<company_id>/projects/<project_id>/wage-overrides
To add a new Wage Override to a Project, simply hit the above endpoint with the below POST body. The job_title_id
here needs to reference the UUID of a Job Title in your LaborChart account.
{
"rate": 35,
"job_title_id": "3f447732-33ec-4b8e-a5d0-6462c12e18e6"
}
Responses:
Successful Response
When a Wage Override is successfully added to a Project, the newly created UUID for it will be returned.
{"id": "aeee8fc5-b8ee-4bf0-bca9-86f751f99795"}
Delete Wage Override
DELETE - /v2/companies/<company_id>/projects/<project_id>/wage-overrides/<wage_override_id>
Responses:
Successful Response
When a Wage Override has been successfully removed from a Project you will receive back the ID of the removed Wage Override as confirmation.
{"id": "aeee8fc5-b8ee-4bf0-bca9-86f751f99795"}
Add Role to Project
POST - /v2/companies/<company_id>/projects/<project_id>/roles
To add a new Role to a Project you need to hit the above endpoint with a person_id
referencing a Person in your LaborChart system and optionally a job_title_id
. If you do not provide a value for the job_title_id
, our system will attempt to fetch the registered Job Title for the specified Person. If this Person has no job title your request will receive an error.
{
"person_id": "bc107873-b2fe-4f8f-9879-6d95b4a0684f",
"job_title_id": "aeee8fc5-b8ee-4bf0-bca9-86f751f99795"
}
Responses:
Successful Response
When a new Role has successfully been added to the Project you will received the UUID representing that Role back as confirmation.
{"id": "3f447732-33ec-4b8e-a5d0-6462c12e18e6"}
[400] Failed Response - Invalid Job Title
If you provide a invalid value for job_title_id
or don't provide a value and the Person you specified has no registered Job Title you will receive the below error.
{
"code": "BadRequestError",
"message": {
"detailCode": "invalidJobTItleId",
"details": "No valid Job Title was found for this Role"
}
}
Remove Role from Project
DELETE - /v2/companies/<company_id>/projects/<project_id>/roles/<role_id>
Responses:
Successful Response
When a Role has been successfully removed from the Project, you will receive the removed Role's ID back as confirmation.
{"id": "d7852dc1-f466-467b-8e64-4fa74ac16e4a"}
Shift an entire Project (Including Assignments and Requests)
PATCH - /v2/companies/<company_id>/projects/<project_id>/shift_
Shifting an entire project will update the Project start_date
and est_end_date
, as well as the start_date
and end_date
of each assignment and request in the project. For example, if a Project started on June 1, 2023 and ended on July 1, 2023 and was shifted by one week to June 8, 2023 the new start_date
would be June 8, 2023 and the new est_end_date
would be July 8, 2023. The assignments and requests would each. be shifted forward by seven days.
A project can also be shifted backwards, but the new start_date
cannot be in the past. The project must be active and not yet started in order to be shifted. The optionalest_end_date
parameter may be provided in the case a project needs to be shifted and extended. Both start_date
and est_end_date
must be provided in YYYY-MM-DD
format.
{
"start_date": "2023-06-08",
"est_end_date": "2023-07-08"
}
Responses:
Successful Response
When a project has been successfully shifted, you will get a 200
response with the following body:
{success: true}
Updated about 1 year ago