Create Fund

POST /ws/rest/service/v1/fund/{project_number}

Purpose

Create Fund Codes.

If the project number is specified and the fund does not exist at the company level, an error message is displayed.

Request Format

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, the fund code will be created in company.

POST body is a JSON

Data JSON is a list of fund codes attributes.

Note:

POST call has input & output both as JSON in the body

For Company:

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 For 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.

Sample Success Response For 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

}

Sample Request For Create Fund - Project

For projects, the list of fund codes are required to create fund codes.

{"data":{

"codes": ["Fund1","Fund2","Fund3"]

}

}

Sample Partial Success Response For 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.