Update Lock Status of Cost Sheet

PUT /ws/rest/service/v2/projectcostsheet/lockstatus

Purpose

Update the lock status of the cost sheet for a specific shell.

Note:

The default scope is set to "budget_scope" if the scope is not defined in the Business Distribution window.

Prerequisites

Ensure you have:

  • Full Access or Update permissions for CBS Services
  • Created the Unifier shell

Request Format

Send an API request as a JSON Map with the following structure:

{

"options":{"project_number": "<value>},

"data":["action":"<value>",

"explanation" : "<value>"]

}

Request Parameters

Specify the following parameter in the Options JSON map:

Request Parameter Required? Data Type Description
project_number Yes String A valid 'Active' shell number associated with the cost sheet whose lock status is to be determined.
action Yes String Specify the action to be taken on the cost sheet. Valid values include: "lock" and "unlock".
explanation Yes String Provide your comments for the action taken on the cost sheet.

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 the lock status of a cost sheet, send a request in the following format:

{

"options": {"project_number" : "P-0008"},

"data": [{

"action": "lock",

"explanation": "cost sheet locked for budget assignment"

}]

}

Sample Success Response

A successful response with status code 200 displays in the following format:

{

"data": [

{

"_recor d_status": "succe ss",

"action": "l ock",

"expla nation": "cost shee t locked for budget assi gn ment"

}

],

"message": [],

"status": 200,

"rest_audit_id": 4214

}

Sample Failed Response

A response to the above request displays the corresponding status code in the following format:

{

"data": [],

"message": [

{

"_record_status": "Field explanation is mandatory to lock and is missing in the input request",

"action": "lock",

"explanation": ""

}

],

"status": 3000,

"rest_audit_id": 4215

}

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 specified. 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 an active shell. 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
action action is not specified. 3000 Field action is mandatory and is missing in the input request.
action action is specified with an invalid value. 3000 The valid values for field action is lock or unlock.
explanation explanation is not specified. 3000 Field explanation is mandatory to lock the sheet and is missing in the input request.
explanation explanation exceeds 4000 characters. 3000 Explanation cannot have more than 4000 characters.
not applicable No body tag. 1101 Empty or Invalid JSON data.
not applicable No data tag 1059 Invalid JSON input.
not applicable No options tag 3002 Invalid input.