POST /ws/rest/service/v1/fund/{project_number}
Purpose:
Create Fund Codes.
If project number is specified and the fund doesn't exist at company level, throw Error.
Input:
All parameters should be URL encoded.
Path Parameter
project_number: Specify the project/shell number to create the fund codes from company fund sheet. If no value is specified then the fund code will be created in company.
POST body is a JSON
Data JSON will be list of fund codes attributes.
Note: POST call has input & output both as JSON in the body
For Company:
Create Fund - Company
{"data":[{
"name":"MiscFund",
"category":"Grants",
"description":"Miscellaneous Fund",
"upermitIssuerURL": "http://google.com test",
}
]
}
Parentid is not accepted for tree mode. If provided, will be ignored.
Output:
JSON object containing 'status', 'data', 'message'
A message will be present if the status is not 200 otherwise it will be "success".
Create Fund - Company
{
"data": [
{
"id":4,
"code":Fund6,
"name":"Fund6",
"category":"Grants",
"description":"MiscellaenousFund",
"upermitIssuerURL": "http://google.com test",
"status":"active"
}
],
"message":
[
{ code: "Fund5","status": "1206","message":"Fund Code is referenced in lineitems"},
{ code: "Fund6","status": "200","message":"success"}
],
"status": 200
}
For Projects, the list of fund codes are required to create fund codes.
Create Fund - Project
{"data":{
"codes": ["Fund1","Fund2","Fund3"]
}
}
Output:
JSON object containing 'status', 'data', 'message'
A message will be present if the status is not 200 otherwise it will be "success".
Create Fund - Project
{
"data": {
{
"code": "Fund1",
"id":31
}
},
"message": [
{ code: "Fund2","status": "1201","message":"Fund Code used already exists."},
{ code: "Fund1","status": "200","message":"success"} ,
{ code: "Fund2","status": "1201","message":"Fund Code used already exists."}
],
"status": 3000
}
Multiple fund codes can be created in a single request. For Partial Success/Failure, status will be 3000.