Create CBS Codes
POST /ws/rest/service/v1/cost/cbs/{project_number}
Purpose
Create CBS Codes for the specified Project
Request Format
All parameters should be URL encoded. Both the input & output are in JSON format, in the body.
Path Parameter
project_number: (Required) Specify the project number.
In the input request, "code" is a Required field.
Notes:
- If the CBS code is given in this format 'A~~B', CBS code B will be created under A. If the cost code A does not exist, the CBS code A will be created first, before creating the CBS code B under it.
- If the input code does not contain delimiter '~~', that CBS code will be created under valid 'parentid'. If the 'parentid' is not available in the input request, the code will be created under root.
- If the input code has delimiter '~~', and the 'parentid' is included in input request, the 'parentid' will be ignored, and the code will be created as per hierarchy in the code.
- If multiple codes are sent in one request, and if the creation of one of the codes fails, the entire request will be canceled.
Response Format
A JSON object is returned in the following format.
{
"data": [],
"message": [],
"status": <REST status code value>
}
A successful response displays a status code 200.
A failed response displays a message with a status code.
Sample Request
{
"data": [
{
"code": "CostB~~Cost1",
"description": "Creating Cost Code using REST webservice",
"item": " Cost Item",
"uResProgressAmount": 10,
"status": "Active",
"cost_type": "Food"
},
{
"code": "Cost1",
"description": "Creating Cost Code using REST webservice",
"item": "Cost1 Item",
"uResProgressAmount": 10,
"status": "Active",
"cost_type": "Capital"
}
]
}
Sample Success Response
{
"data":[
{
"bitemid" : 24,
"code": "CostB",
"description": "Creating Cost Code using REST webservice",
"item": " Cost Item",
"uResProgressAmount": 10,
"status": "Active",
"cost_type": "Food",
"parentid": "23",
"orderid": "1",
"budgetid": "6"
},
{
"bitemid" : 25,
"code": "CostB~~Cost1",
"description": "Creating Cost Code using REST webservice",
"item": " Cost Item",
"uResProgressAmount": 10,
"status": "Active",
"cost_type": "Food",
"parentid": "24",
"orderid": "2",
"budgetid": "6"
},
{
"bitemid" : 26,
"code": "Cost1",
"description": "Creating Cost Code using REST webservice",
"item": " Cost1 Item",
"uResProgressAmount": 10,
"status": "Active",
"cost_type": "Capital",
"parentid": "1",
"orderid": "0",
"budgetid": "6"
}
],
"message":[ "success" ],
"status":200
}
Related Topics
Last Published Wednesday, April 9, 2025