Update expenditure
This endpoint allows users to update an expenditure for a household.
Body
Required
-
Not set directly. Can be set as belonging to: the main client (ClientGUID from Household) ; the related client (RelatedClientGUID from Household); jointly owned by the main client and the related client. To set owned by the main client set ClientGUID as ClientGUID. To set owned by the related client set ClientGUID as RelatedClientGUID. To set as jointly owned set ClientGUID as ClientGUID, set JointOwnerClientGUID as RelatedClientGUID.
-
ClientGUID must be in the household. See Owner for details on what to set.
-
The following characters are not permitted: \:*"<>|
Maximum length is
50
. -
To retrieve a comprehensive list of acceptable values and their corresponding formatted values, you may make a request to the designated endpoint: /api/v2/household/{HouseholdGUID}/expenditure/options
Expenditure type can not be changed if expenditure is back office linked.
-
This field is required if the value of ExpenditureType = 6.
-
Only used if the value of ExpenditureType is not equal to 6 and both ClientGUID and JointOwnerClientGUID are not NULL.
-
To retrieve a comprehensive list of acceptable values and their corresponding formatted values, you may make a request to the designated endpoint: /api/v2/household/{HouseholdGUID}/expenditure/options
-
JointOwnerClientGUID must be different from ClientGUID and must be in the household. See Owner for details on what to set.
-
To retrieve a comprehensive list of acceptable values and their corresponding formatted values, you may make a request to the designated endpoint: /api/v2/household/{HouseholdGUID}/expenditure/options
-
This field is required if the value of StartBasis = 4.
To retrieve a comprehensive list of acceptable values and their corresponding formatted values, you may make a request to the designated endpoint: /api/v2/household/{HouseholdGUID}/expenditure/options
-
This field is required if the value of StartBasis = 2 or 7.
Minimum value is
0
, maximum value is130
. -
This field is required if the value of StartBasis = 3.
Dates should be provided in the format "Y-m-d", where "Y" represents the year, "m" represents the month and "d" represents the day. For example, "2023-07-24" represents 24th July, 2023.
-
This field is required if the value of Frequency is not equal to 120.
To retrieve a comprehensive list of acceptable values and their corresponding formatted values, you may make a request to the designated endpoint: /api/v2/household/{HouseholdGUID}/expenditure/options
-
This field is required if the value of EndBasis = 4.
Event end must be after starting.
If FutureChangeLevel = 1 then ending must be after future date of change.
EventGUID must belong to the Household.
To retrieve a comprehensive list of acceptable values and their corresponding formatted values, you may make a request to the designated endpoint: /api/v2/household/{HouseholdGUID}/expenditure/options
-
This field is required if the value of EndBasis = 2 or 7.
EndAge must be after starting.
If FutureChangeLevel = 1 then ending must be after future date of change.
Minimum value is
0
, maximum value is130
. -
This field is required if the value of EndBasis = 3.
EndDate must be after starting.
If FutureChangeLevel = 1 then ending must be after future date of change.
Dates should be provided in the format "Y-m-d", where "Y" represents the year, "m" represents the month and "d" represents the day. For example, "2023-07-24" represents 24th July, 2023.
-
Percentage of ownership attributed to client 1.
- Client 1 corresponds to the “ClientGUID” in the household record.
- This is not a required field (and NULL is accepted) unless Client2PercentageOwned is greater than 0.
- When set, the value must be greater than 0 and not exceed 100. Values can include 2 decimal places.
- The total of Client1PercentageOwned + Client2PercentageOwned cannot exceed 100.
Maximum value is
100
. -
Percentage of ownership attributed to client 2. This is only applicable for joint households.
- Client 2 corresponds to the “RelatedClientGUID” in the household record.
- This is not a required field (and NULL is accepted) unless Client1PercentageOwned is greater than 0.
- When set, the value must be greater than 0 and not exceed 100. Values can include 2 decimal places.
- The total of Client2PercentageOwned + Client1PercentageOwned cannot exceed 100.
- This field should not be set for single-client households.
Maximum value is
100
. -
Maximum length is
255
. -
An integer representing the status of the back office sync:
- 1: Yes
- 2: No
- 3: Only update from back office
-
To retrieve a comprehensive list of acceptable values and their corresponding formatted values, you may make a request to the designated endpoint: /api/v2/household/{HouseholdGUID}/incomes/options
-
This field is required if the value of FutureLevelChange = 1.
-
To retrieve a comprehensive list of acceptable values and their corresponding formatted values, you may make a request to the designated endpoint: /api/v2/household/{HouseholdGUID}/incomes/options
-
This field is required if the value of FutureLevelChange = 1 and FutureDateOfChangeBasis = 4.
If FutureChangeLevel = 1 then ending must be after future date of change.
To retrieve a comprehensive list of acceptable values and their corresponding formatted values, you may make a request to the designated endpoint: /api/v2/household/{HouseholdGUID}/incomes/options
-
This field is required if the value of FutureLevelChange = 1 and FutureDateOfChangeBasis = 2 or 7.
FutureDateOfChangeAge must be in the future.
If FutureChangeLevel = 1 then ending must be after future date of change.
Minimum value is
0
, maximum value is130
. -
This field is required if the value of FutureLevelChange = 1 and FutureDateOfChangeBasis = 3.
FutureDateOfChangeDate must be in the future.
If FutureChangeLevel = 1 then ending must be after future date of change.
Dates should be provided in the format "Y-m-d", where "Y" represents the year, "m" represents the month and "d" represents the day. For example, "2023-07-24" represents 24th July, 2023.
-
To retrieve a comprehensive list of acceptable values and their corresponding formatted values, you may make a request to the designated endpoint: /api/v2/household/{HouseholdGUID}/savings/withdrawals/options
-
Chose one of the preselected font awesome icons. If you do not enter an icon then a default icon will be applied.
To retrieve a comprehensive list of acceptable values and their corresponding formatted values, you may make a request to the designated endpoint: /api/v2/household/{HouseholdGUID}/events/options
-
Enter a colour code that is 6 characters long, like "C3A1F6." You can include "#" at the beginning, like "#C3A1F6," or leave it out. If you do not enter a value then a default value will be applied.
-
If you do not enter a value then a default value will be applied.
Minimum value is
1
, maximum value is5
. -
If set to any value, formatted values will be excluded from the response.
curl \
--request PUT 'https://api.fincalc.co.uk/api/v2/household/{HouseholdGUID}/expenditure/{ExpenditureGUID}' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{"ClientGUID":"3F0B1C88-6D80-4C17-BB3E-1D68E6D26405","ExpenditureDescription":"API Expenditure","ExpenditureType":1,"ExpenditureAmount":1500,"SumAssured":1500,"AmountAfterDeath":1250,"Frequency":12,"JointOwnerClientGUID":"3F0B1C88-6D80-4C17-BB3E-1D68E6D26405","StartBasis":4,"StartEventGUID":"F3AAED8D-3A5F-44B5-BC6D-9E8C7646C9D7","StartAge":42,"StartDate":"2023-05-04","EndBasis":3,"EndEventGUID":"1A58F6C8-90BD-4D2D-9B22-3E1F9C8E15E7","EndAge":65,"EndDate":"2069-02-01","Client1PercentageOwned":50,"Client2PercentageOwned":50,"BackOfficeID":13573,"BackOfficeSync":1,"FutureLevelChange":1,"FutureGrossAmount":100000,"FutureDateOfChangeBasis":3,"FutureDateOfChangeEventGUID":"1A58F6C8-90BD-4D2D-9B22-3E1F9C8E15E7","FutureDateOfChangeAge":68,"FutureDateOfChangeDate":"2069-02-01","IsGoal":1,"EventIcon":"fa-solid fa-rings-wedding","EventColour":"C3A1F6","GoalPriority":3,"ExcludeFormattedValues":1}'
{
"ClientGUID": "3F0B1C88-6D80-4C17-BB3E-1D68E6D26405",
"ExpenditureDescription": "API Expenditure",
"ExpenditureType": 1,
"ExpenditureAmount": 1500,
"SumAssured": 1500,
"AmountAfterDeath": 1250,
"Frequency": 12,
"JointOwnerClientGUID": "3F0B1C88-6D80-4C17-BB3E-1D68E6D26405",
"StartBasis": 4,
"StartEventGUID": "F3AAED8D-3A5F-44B5-BC6D-9E8C7646C9D7",
"StartAge": 42,
"StartDate": "2023-05-04",
"EndBasis": 3,
"EndEventGUID": "1A58F6C8-90BD-4D2D-9B22-3E1F9C8E15E7",
"EndAge": 65,
"EndDate": "2069-02-01",
"Client1PercentageOwned": 50,
"Client2PercentageOwned": 50,
"BackOfficeID": 13573,
"BackOfficeSync": 1,
"FutureLevelChange": 1,
"FutureGrossAmount": 100000,
"FutureDateOfChangeBasis": 3,
"FutureDateOfChangeEventGUID": "1A58F6C8-90BD-4D2D-9B22-3E1F9C8E15E7",
"FutureDateOfChangeAge": 68,
"FutureDateOfChangeDate": "2069-02-01",
"IsGoal": 1,
"EventIcon": "fa-solid fa-rings-wedding",
"EventColour": "C3A1F6",
"GoalPriority": 3,
"ExcludeFormattedValues": 1
}
{
"success": true,
"data": {
"ExpenditureGUID": "E3AEEF8D-3A6F-44B5-BA6D-8E8C7646C9D6",
"ClientGUID": "3F0B1C88-6D80-4C17-BB3E-1D68E6D26405",
"ExpenditureDescription": "API Expenditure",
"ExpenditureType": 1,
"ExpenditureAmount": 1500,
"SumAssured": 1500,
"AmountAfterDeath": 1250,
"Frequency": 12,
"JointOwnerClientGUID": "3F0B1C88-6D80-4C17-BB3E-1D68E6D26405",
"StartBasis": 4,
"StartEventGUID": "F3AAED8D-3A5F-44B5-BC6D-9E8C7646C9D7",
"StartAge": 42,
"StartDate": "2023-05-04",
"EndBasis": 3,
"EndEventGUID": "1A58F6C8-90BD-4D2D-9B22-3E1F9C8E15E7",
"EndAge": 65,
"EndDate": "2069-02-01",
"Client1PercentageOwned": 50,
"Client2PercentageOwned": 50,
"BackOfficeID": "F7FBB6B1-2D90-485C-AE89-9F9FA0426F1E",
"BackOfficeSync": 1,
"FutureLevelChange": 1,
"FutureGrossAmount": 10000,
"FutureDateOfChangeBasis": 4,
"FutureDateOfChangeEventGUID": "F3AAED8D-3A5F-44B5-BC6D-9E8C7646C9D7",
"FutureDateOfChangeAge": 55,
"FutureDateOfChangeDate": "2069-05-04",
"IsGoal": 1,
"EventIcon": "fa-solid fa-rings-wedding",
"EventColour": "#C3A1F6",
"GoalPriority": 3,
"FormattedValues": {
"IsGoal": "Yes",
"EndDate": "01/02/2069",
"EndBasis": "Specific Date",
"EventIcon": "rings-wedding",
"Frequency": "per month",
"StartBasis": "Event",
"SumAssured": "£1,500",
"GoalPriority": "Medium",
"StartEventGUID": "Tom's State Pension Age",
"ExpenditureType": "Essential",
"AmountAfterDeath": "£1,250",
"ExpenditureAmount": "£1,500",
"FutureGrossAmount": "£10,000",
"FutureLevelChange": "Yes",
"Client1PercentageOwned": "50%",
"Client2PercentageOwned": "50%",
"FutureDateOfChangeDate": "04/05/2069",
"FutureDateOfChangeBasis": "Event",
"FutureDateOfChangeEventGUID": "API's State Pension Age"
}
}
}
{
"success": false,
"message": "You do not have permission to edit the household."
}
{
"success": false,
"message": "Household not found."
}
{
"success": false,
"message": "Validation Error.",
"data": {
"ClientGUID": [
"The client guid field is required."
]
}
}
{
"success": false,
"message": "Failed to update the expenditure."
}