Update Cash Flow Data

PUT /ws/rest/service/v1/cashflow/data/{project_number}

Purpose

This service will update the cash flow detail curve data.

Request Format

All parameters should be URL encoded.

Specify the PUT body is in JSON format.

Request Parameters

The following parameters can be included in the request.

  • project_number: Specify the project/shell number.
  • "options": (Optional) Specify if curve "setup" or "distribution" data has to be updated. If no data is provided, the default will be setup = "yes".
  • "setup": (Optional) Default is "yes". Specify "yes" if you need to update the curve setup data (From Date, To Date, Profile and Total ), "no" if curve setup is not required to be updated.
  • "distribution": (Optional) Default is "no". Specify "yes" if you need to update the distribution data (distribution values of the Total amount entered in the date period), "no" if the distribution is not required to be updated.
  • "data": Specify the curve data which needs to be updated. Use the response from the REST API, "/cashflow/data". Use the "details" part of the response.

    Note:

    • If both setup and distribution are set to "yes" then only "setup" data will be updated.
    • If both setup and distribution are set to "no" then no data will be updated.
    • The "From Date" and "To Date" uses your preferred data format.

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

{

"options":{

"setup":"yes",

"distribution":"no"

},

"data":[

{

"Name":"cashflow 1",

"curves":[

{

"Type":"Forecast",

"Name":"Forecast",

"details":[

{

"Number":"TestProj-C",

"Name":"TestProj-C-TestProj-C Name",

"From Date":"05-31-2019 00:00:00",

"To Date":"10-25-2019 00:00:00",

"Profile":"",

"Total":"230.00",

"Unassigned":"-48.00",

"5 2019":"450.00",

"6 2019":"40.00",

"7 2019":"10.00",

"8 2019":"-44.00",

"9 2019":"-44.00",

"10 2019":"-44.00"

}

]

},

{

"Type":"Baseline",

"Name":"Baseline",

"details":[

{

"Number":"TestProj-C",

"Name":"TestProj-C-TestProj-C Name",

"From Date":"05-01-2019 00:00:00",

"To Date":"10-25-2019 00:00:00",

"Profile":"",

"Total":"100.00",

"Unassigned":"90.00",

"5 2019":"5.00",

"6 2019":"0.00",

"7 2019":"0.00",

"8 2019":"0.00",

"9 2019":"10.00",

"10 2019":"0.00"

}

]

}

]

}

]

}

Sample Success Response

This is an example of a successful response with status code 200.

{

"data": [],

"message": [

{

"curve_name": "Baseline",

"status_code": 200,

"name": "cashflow 1",

"message": "success"

}

],

"status": 200

}