Create contribution
This endpoint allows users to create a new savings contribution.
When the parent savings has the DefaultAccount set to 1, you cannot create savings contributions.
Path parameters
-
The HouseholdGUID of the client.
-
The SavingsGUID you want to create a contribution for.
Body Required
-
If SavingsType is any of the following: 7, 8, 9, 10, 14, 16, 21 or 22 then the allowed types are 2, 3, 12 and 13. Otherwise, if SavingsType is any of the following: 11, 12, 17, 18, 19 then the allowed types are 2, 3 and 12. Otherwise, if SavingsType = 3 then the allowed types are 2, 11, and 12. Otherwise, if SavingsType = 6 then the allowed types are 2, 3, 11, and 12. Finally, if none of the above conditions are met then the allowed types are 2 and 12.
-
LinkedSavingsGUID string(uuid) | null
This field is required if the value of TransactionType = 11 or the value of TransactionType = 12. The value of LinkedSavingsGUID can not be the same as the SavingsGUID that this contribution is linked to.
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/contributions/options
-
TransactionAmount number(float) | null
This field is required unless one of the following conditions is met:
- 'TransactionType' is '11', or
- 'TransactionType' is '3' and 'TransactionPercentage' is not '0' or 'NULL', or
- 'TransactionType' is '12', 'LinkedSavingsGUID' is not equal to '00000000-0000-0000-0000-000000000000', and 'TransactionPercentage' is not 0 or NULL.
If none of these conditions are met, the field is required and must be greater than 0.
-
TransactionPercentage number(float) | null
This field is required and must be greater than 0 if any of the following conditions are met:
TransactionType
is3
andTransactionAmount
is not '0' or 'NULL', orTransactionType
is12
,LinkedSavingsGUID
is not equal to00000000-0000-0000-0000-000000000000
, andTransactionAmount
is not '0' or 'NULL'.
-
Frequency integer | null
This field is required if TransactionType is not = 11.
This field must be set to 1 if TransactionType = 13.
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/contributions/options
-
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/contributions/options
-
StartEventGUID string(uuid) | null
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}/savings/contributions/options
-
StartAge integer | null
This field is required if the value of StartBasis = 2 or 7.
Minimum value is
0
, maximum value is130
. -
StartDate string | null
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.
-
EndBasis integer | null
This field is required if the value of Frequency is not = 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}/savings/contributions/options
-
EndEventGUID string(uuid) | null
This field is required if the value of EndBasis = 4 and the value of Frequency is not = 120 and the value of TransactionType is not = 8. Event end must be after starting.
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/contributions/options
-
EndAge integer | null
This field is required if the value of EndBasis = 2 or 7 and the value of Frequency is not = 120 and the value of TransactionType is not = 8. EndAge must be after starting.
Minimum value is
0
, maximum value is130
. -
EndDate string | null
This field is required if the value of EndBasis = 3 and the value of Frequency is not = 120 and the value of TransactionType is not = 8. EndDate must be after starting.
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.
-
BackOfficeID string | null
Maximum length is
255
. -
BackOfficeSync integer | null
An integer representing the status of the back office sync:
- 1: Yes
- 2: No
- 3: Only update from back office
curl \
--request POST https://api.fincalc.co.uk/api/v2/household/{HouseholdGUID}/savings/{SavingsGUID}/contributions \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{"TransactionType":2,"LinkedSavingsGUID":"F3AAED8D-3A5F-44B5-BC6D-9E8C7646C9D7","TransactionAmount":5000.1,"TransactionPercentage":12,"Frequency":26,"StartBasis":3,"StartEventGUID":"F3AAED8D-3A5F-44B5-BC6D-9E8C7646C9D7","StartAge":42,"StartDate":"2024-01-01","EndBasis":3,"EndEventGUID":"F3AAED8D-3A5F-44B5-BC6D-9E8C7646C9D7","EndAge":65,"EndDate":"2025-01-01","BackOfficeID":13573,"BackOfficeSync":1}'
{
"TransactionType": 2,
"LinkedSavingsGUID": "F3AAED8D-3A5F-44B5-BC6D-9E8C7646C9D7",
"TransactionAmount": 5000.1,
"TransactionPercentage": 12,
"Frequency": 26,
"StartBasis": 3,
"StartEventGUID": "F3AAED8D-3A5F-44B5-BC6D-9E8C7646C9D7",
"StartAge": 42,
"StartDate": "2024-01-01",
"EndBasis": 3,
"EndEventGUID": "F3AAED8D-3A5F-44B5-BC6D-9E8C7646C9D7",
"EndAge": 65,
"EndDate": "2025-01-01",
"BackOfficeID": 13573,
"BackOfficeSync": 1
}
{
"success": true,
"data": {
"TransactionGUID": "055CAE9F-6167-4186-8DE2-EC994D2222A2",
"TransactionType": 2,
"SavingsGUID": "246C6E3A-3A3D-42A6-BEA3-85A8E3272C2C",
"LinkedSavingsGUID": "G3AAED8E-3A5G-66B5-BC6D-3E8C7646C9D9",
"TransactionAmount": 5000.1,
"TransactionPercentage": 12,
"Frequency": 26,
"StartBasis": 3,
"StartEventGUID": "F3AAED8D-3A5F-44B5-BC6D-9E8C7646C9D7",
"StartAge": 42,
"StartDate": "2024-01-01",
"EndBasis": 3,
"EndEventGUID": "F3AAED8D-3A5F-44B5-BC6D-9E8C7646C9D7",
"EndAge": 65,
"EndDate": "2025-01-01",
"BackOfficeID": "F7FBB6B1-2D90-485C-AE89-9F9FA0426F1E",
"BackOfficeSync": 1,
"FormattedValues": {
"EndDate": "01/01/2025",
"EndBasis": "Specific Date",
"Frequency": "Paid Fortnightly",
"StartDate": "01/01/2024",
"StartBasis": "Specific Date",
"SavingsGUID": "API Test",
"EndEventGUID": "Terry's State Pension Age",
"StareEventGUID": "Tom's State Pension Age",
"TransactionType": "Savings Contribution",
"LinkedSavingsGUID": "Current Account",
"TransactionAmount": "£5,000",
"TransactionPercentage": "12%"
}
}
}
{
"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 create savings contribution in household"
}