Create Cash Flow
POST /ws/rest/service/v1/cashflow/{project_number}
Purpose
Creates a cash flow from a template or by specifying the property values.
If a
template name is provided, cash flow properties are created from a template in combination with the parameters specified in the request.
If a
template_projectid is not provided, the company template will be fetched.
Prerequisites
Ensure the following:
- You have full access to the cash flow being created.
- project administrator/company administrator has full access to the cash flow created from this service.
- To change permissions, use the Update or Modify Cashflow Permission REST service.
Request Format
To create a cash flow, send a request with a project_number in the end-point URL as shown above.
To create a cash flow from a template, send a request in the following format:
{
"data":
{
"template":"<value>",
"template_project":"<value>",
"name": "<value>"
}
}
The following will be ignored if provided in the request:
- Period name, if provided in the request, will be ignored.
- Irrelevant attributes in the create/update service.
Note:
- All request parameters must be URL-encoded.
- For a cash flow to work, it is recommended to not duplicate leaf/child CBS codes that have been created under different parents in a cost sheet.
Request Parameters
The following parameter must be included in the request:
| Request Parameters | Required? | Data Type | Description |
|---|---|---|---|
| project_number | Yes | String | The P6 EPPM project ID configured in the Primavera Gateway application. |
Request Parameters For Cash Flow From Template
To create a cash flow from a template, additionally specify the following parameters:
| Request Parameters | Required? | Data Type | Description |
|---|---|---|---|
| template_name | Yes | ||
| template_project | No | The Project number of the template. |
Response Format
The REST service returns a JSON map in the following format:
{
"data": [],
"message": [],
"status": <REST status code value>,
"rest_audit_id": <value>
}
A successful response displays a status code 200.
A failed response displays a message with a status code.
Note:
- If the name, template, and schedule details are specified in the request, the cash flow will be created with template details, but the schedule will be as per the input request.
- Defaults are used if the data is not provided in the input request.
- You can provide the Effective_date in the Actuals Curve at CBS/Summary CBS level if Set Effective Date is selected as Yes. For more information, refer to the format of the Actuals Curve Request.