Create Distribution Profiles

POST /ws/rest/service/v1/cashflow/profile

Purpose

Create distribution profiles of company.

Request Format

Both input & output in JSON format in the body.

Request Parameters

The "distribution" must be a list of at least 20 elements, and the sum of all elements must total 100.

If the "distribution" is not provided, the "distribution" with 20 elements, all with value 5, will be considered.

Supported values for "status" is "Active" or "Inactive".

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

This is an example of a request.

{

"data": [

{

"name": "S Curve new",

"status": "Active",

"distribution": [

"0.5",

"0.5",

"1.5",

"1.5",

"4.0",

"4.0",

"7.5",

"7.5",

"11.5",

"11.5",

"11.5",

"11.5",

"7.5",

"7.5",

"4.0",

"4.0",

"1.5",

"1.5",

"0.5",

"0.5"

]

},

{

"name": "Front Loaded",

"status": "Active",

"distribution": [

"6.5",

"6.5",

"6.5",

"6.5",

"6.5",

"6.5",

"6.5",

"6.5",

"6.5",

"6.5",

"3.5",

"3.5",

"3.5",

"3.5",

"3.5",

"3.5",

"3.5",

"3.5",

"3.5",

"3.5"

]

}

]

}

Sample Partial Success Response

This is an example of a partially successful response with a status code 200, and a failed status code 3000.

{

"data": [

{

"id": 5,

"name": "S Curve new"

}

],

"message": [

{

"name": "S Curve new",

"status": 200,

"message": "success"

},

{

"name": "Front Loaded",

"status": 1337,

"message": "Distribution Profile already exist"

}

],

"status": 3000

}