Update Work Package
PUT /ws/rest/service/v2/projectcostsheet/workpackage
Purpose
Update one or more work packages per request, per project.
Prerequisites
Ensure you have Full Access or Update permissions for CBS services to update work packages in the shell cost sheet log.
Request Format
Send an API request as a JSON map with the following structure:
{
"options":{ }
...."data": []
}
Request Parameters
Specify the following parameters in the request:
Request Parameter | Required? | Data Type | Description |
---|---|---|---|
project_number | Yes | String | A valid 'Active' shell number. |
workpackage_identifier | Yes | String | Identify a work package by its name or an identifier. Valid values include: "name", "ref_no". |
name | Yes, if you chose "name" as the workpackage_identifier. | String | A unique alphanumeric name for a work package, with a maximum of 100 characters. |
ref_no | Yes,if you chose "ref_no" as the workpackage_identifier. | String | A unique reference number, with a maximum of 100 characters. |
Response Format
A JSON object is returned in the following format.
{
"data": [],
"message": [<list of messages>],
"status": <REST status code value>,
"rest_audit_id": <id from the audit table>
}
A successful response displays a status code 200.
A failed response displays a message with a status code.
Sample Success Request
To update a work package using its reference number, send a request in the following format:
{
"options": {
"project_number" : "P-0021",
"workpackage_identifier" : "ref_no"
},
"data": [
{
"owner": "Company Administrator",
"comments": "111",
"vendor": "IDC Company",
"name": "111",
"description": "description",
"ref_no": "111",
"status": "Active"
}
]
}
Sample Success Response
{
"data": [
{
"owner": "Company Administrator",
"comments": "111",
"_record_status": "success",
"vendor": "IDC Company",
"name": "111",
"description": "description",
"ref_no": "111",
"status": "Active"
}
],
"message": [],
"status": 200,
"rest_audit_id": 3886
}
Sample Failed Response
A failed response displays the corresponding status code in the following format:
{
"data": [],
"message": [
{
"owner": "Company Administrator",
"comments": "111",
"_record_status": "Work Package Reference No. is required field",
"vendor": "IDC Company",
"name": "111",
"description": "description",
"status": "Active"
}
],
"status": 3000,
"rest_audit_id": 3887
}
Supported Validation Messages and Status Codes
The following validation messages and status codes display in the response when incorrect values are provided in the request.
Field Name | Use-case Scenario | Status Code | Error Message |
---|---|---|---|
project_number | project_number is not included in the request. | 13001 | Project/Shell number is mandatory and is missing in the input request |
project_number | project number is invalid. | 602 | Project/Shell Number is not correct. |
project_number | Project/Shell is not active. | 1245 | Create/Update/Delete cannot be performed when project/shell status is Inactive or View-Only or On-Hold. |
project_number | Cost sheet does not exist in the specified shell. | 707 | Cost sheet does not exist |
name | Duplicate work package name. | 1805 | Work package name is already used. |
name | Work package name is not included in the request. | 1809 | Provide a work package name |
name | Work Package name exceeds 100 characters. | 1812 | Work package name cannot have more than 100 characters |
ref_no | Duplicate ref_no. | 1806 | Work Package Reference No. already exists. |
ref_no | ref_no is not included in the request. | 1810 | Work Package Reference No. is required field |
ref_no | ref_no exceeds 100 characters. | 1813 | Work Package Reference No. cannot have more than 100 characters |
status | Status is not provided or incorrect status is provided. | 1811 | Provide a valid status value - Active or Inactive |
vendor | vendor is inactive. | 1807 | Vendor provided is not an active member company or sponsor company name. |
owner | owner is inactive. | 1808 | Owner provided is not an active user in Shell |
comments | comments exceeds 3950 characters. | 1813 | Comments cannot have more than 3950 characters |
description | description exceeds 3950 characters. | 1814 | Description cannot have more than 3950 characters |
All fields | Any other exception | 1815 | Exception encountered during processing |
Related Topics
Get Names of Cost Sheet Snapshots
Update Lock Status of Cost Sheet
Last Published Tuesday, July 1, 2025