POST /ws/rest/service/v1/fund/consumption/{project_number}
Purpose:
This API is used to perform the manual fund consumption on a record that is either in terminal state or non-terminal state. In case of transient state, this service can be used at both view only or action form of the BP.
Notes:
- Commitment funding is not supported by this service.
- Will support remove and replace of fund similar to UI.
- The Udesigner settings regarding funding option will also be validated as part of the service.
- All the BP records will be processed even if there are any failures in one of the record. Within the BP records all the line items will be processed. Failed record and line items will be reported in the response.
- The order of processing of the lineitem will be based on li_num value.
- This service will not rollup the amount to the fund sheet. Use update BP service or from UI when the BP is sent to next step or finish editing in case of Non workflow BP then the amount will be rolled up to the fund sheet.
- The integration user should have "Full Access" or "Update" permission under "Business Process Services" to run this service.
Input:
All parameters should be URL encoded.
Path Parameter
project_number(Required): Specify the project/shell number of the funding sheet.
POST body contains the JSON object with array of BP assignments.
"data" is a JSON array which can have one or more BP records fund consumption data.
"bpname" (Required): Name of the BP corresponding to the BP record.
"record_no" (Required): The BP record number for which the fund consumption has to be processed.
"funds" is a JSON array which contains one or more fund consumption details.
"code" (Required) : Specify the fund code associated with project/shell or CBS.
"amount" (Required) : Datatype is Double. Specify the assignment value to be consumed from the fund.
"_bp_lineitems" : JSON Array to specify the BP lineitems. Required for "Project Level - Manual(Assign by BP Line Item)" and "CBS Level - Manual" assignment setting.
"li_num" (Required) : Use the "li_num" in "_bp_lineitems" from the response to "GET /ws/rest/service/v1/bp/record/" REST call with lineitem":"yes" as part of the request.
"uuu_tab_id" (Required) : Use the "uuu_tab_id" in"_bp_lineitems" from the response to "GET /ws/rest/service/v1/bp/record/" REST call with lineitem":"yes" as part of the request.
"group_id" (Required if lineitem has group else optional) : Use the "group_id" in"_bp_lineitems" from the response to "GET /ws/rest/service/v1/bp/record/" REST call with lineitem":"yes" as part of the request.
Sample Input Request
//Spends BP data is an example for Project Level - Manual(Assign by BP Record Total) assignment and //Payments BP data is an example for Manual (Assign by BP Line Item)" and "CBS Level - Manual" assignment.
{
"data":[
{
"bpname":"Spends",
"record_no":"uxsp-001",
"funds":[
{
"code":"grants",
"amount":300.25
},
{
"code":"bonds",
"amount":750.30
}
]
},
{
"bpname":"Payments",
"record_no":"uxpa-001",
"_bp_lineitems":[
{
"uuu_tab_id":"List of Contacts",
"li_num":1,
"group_id":60,
"funds":[
{
"code":"grants",
"amount":250.80
},
{
"code":"bonds",
"amount":750.40
}
]
},
{
"uuu_tab_id":"List of Contacts",
"li_num":2,
"group_id":60,
"funds":[
{
"code":"grants",
"amount":250.40
},
{
"code":"bonds",
"amount":750.16
}
]
},
{
"uuu_tab_id":"List of Contacts",
"li_num":3,
"group_id":60,
"funds":[
{
"code":"fedral",
"amount":650.45
}
]
}
]
}
]
}
Output:
JSON object containing 'status', 'data', 'message'
"data" will be empty in the response.
"message" This will be an array of JSON object containing
"record_no" and "status". This will "success" or error message for the failure.
"status" contains:
- 200 when all the record's fund consumption completed successfully and
- 3000 if any one record fund consumption has failed.
Sample Output Response
{
"data":[
{
"record_no":"uxsp-001",
"fund_consumed":500.0
},
{
"record_no":"uxpa-001",
"_bp_lineitems":[
{
"uuu_tab_id":"List of Contacts",
"li_num":1,
"cbs_code":"1_D_D",
"fund_consumed":500.0
},
{
"uuu_tab_id":"List of Contacts",
"li_num":2,
"cbs_code":"2_D_D",
"fund_consumed":450.0
}
]
}
],
"message":[
{
"record_no":"uxsp-001",
"funds":[
{
"code":"grants",
"status":1214,
"message":"Fund assignment amount is required."
},
{
"code":"bonds",
"status":200,
"message":"Success"
}
]
},
{
"record_no":"uxpa-001",
"_bp_lineitems":[
{
"uuu_tab_id":"List of Contacts",
"li_num":1,
"funds":[
{
"code":"grants",
"status":1214,
"message":"Fund assignment amount is required."
},
{
"code":"bonds",
"status":200,
"message":"Success"
}
]
},
{
"uuu_tab_id":"List of Contacts",
"li_num":2,
"funds":[
{
"code":"grants",
"status":200,
"message":"Success"
},
{
"code":"bonds",
"status":200,
"message":"Success"
}
]
}
]
}
],
"status":3000
}