All pages
Powered by GitBook
1 of 1

Loading...

Create person financial data

Use case

In this example, we will show how to set up legal person financial data. We will modify New company Ltd and add assets as a currency worth 10000000 EUR.

Use case data
API parameters with values

The personId of the legal person. New company Ltd is ID-3394.

...persons/ID-3394/financial-data

The financial data type code is assets.

The financial data value type code is currency.

The currency code is EUR. The currencyCode follows ISO 4217 format.

The period presents the count of months for the validity range and is 12 months.

The financial value for the current period is 10000000.

Sample API call

To create financial data, call the following endpoint.

Sample request

Below is an example request body of the API call for creating person representation.

{
  "financialDataTypeCode": "ASSETS",
  "financialDataValueTypeCode": "CURRENCY",
  "currentPeriodValue": 10000000,
  "currencyCode": "EUR",
  "period": 12
}
curl --location 'https://person-api.sandbox.tuumplatform.com/api/v1/persons/ID-3394/financial-data' \
--header 'x-auth-token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHBpcnlEVGltZSI6IjIwMjQtMDUtMjBUMTE6NDY6MTMiLCJyb2xlcyI6WyJBRE1JTiJdLCJuYW1lIjoiSm9obiBPZmZpY2VyIiwiZW1wbG95ZWVJZCI6IjEiLCJ0ZW5hbnRDb2RlIjoiTUIiLCJleHAiOjE3MTYyMDU1NzN9.rhx33fBFHBGOlwWyXJKTtPh4u7J58F2SuvrIdhuA_3c' \
--header 'x-channel-code: SYSTEM' \
--header 'Content-Type: application/json' \
--data '{
  "financialDataTypeCode": "ASSETS",
  "financialDataValueTypeCode": "CURRENCY",
  "currentPeriodValue": 10000000,
  "currencyCode": "EUR",
  "period": 12
}'

Sample response

Below you will find an example response to the API call from above.

Response
{
    "errors": null,
    "validationErrors": null,
    "data": {
        "financialDataId": "ID-1017",
        "personId": "ID-3394",
        "financialDataTypeCode": "ASSETS",
        "financialDataValueTypeCode": "CURRENCY",
        "currentPeriodValue": 10000000,
        "currencyCode": "EUR",
        "period": 12,
        "periodRange": null,
        "nextPeriodEstimateValue": null,
        "description": null,
        "valueRange": null,
        "validityRange": {
            "startTime": "2024-05-20T10:49:58.556Z",
            "endTime": null
        }
    }
}

Result

Assets as a currency worth 10000000 EUR are added to the legal person.

Learn more about the endpoint details in the Tuum developer portal.

https://person-api.sandbox.tuumplatform.com/api/v1/persons/ID-3394/financial-data

"financialDataTypeCode": "ASSETS"
"financialDataValueTypeCode": "CURRENCY"
"currencyCode": "EUR"
"period": 12
"currentPeriodValue": 10000000
create person financial data