POST /ws/rest/service/v1/cost/cbs/{project_number}
Purpose:
Create CBS Codes for the specified Project
Input:
All parameters should be URL encoded.
Path Parameter
project_number: Specify the Project number. Project number is mandatory.
Both input & output in JSON format in the body
In the input request: "code" is Required field
Notes:
- If the CBS code is given in this format 'A~~B', then CBS code B will be created under A. If the cost code A does not exist, then the CBS code A will be created first, before creating the CBS code B under it.
- If the input code does not contain delimiter '~~', then that CBS code will be created under valid 'parentid'. If the 'parentid' is not available in the input request, then the code will be created under root.
- If the input code has delimiter '~~', and the 'parentid' is included in input request, then 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, then the entire request will be cancelled.
Create CBS code input JSON
{
"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"
}
]
}
Output:
JSON object containing 'status', 'data', 'message'
Create CBS Code output JSON
{
"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
}