Create Savings Goal
The POST goals/v1/savings
endpoint allows a savings goal to be created against a given account_id
. The provided account_id
must be present in the Bud platform.
The target_amount
, target_date
, and recurrent_amount
are also validated to ensure the savings goal is achievable within these constraints. At least two of these parameters must be supplied, the third is calculated if not present. When only two parameters are supplied, it is assumed that no payment will be made towards the goal within the month of creation.
This endpoint will return the created savings goal with its id
and created_at
time. An example of a 201
response can be seen below.
{
"operation_id": "goals_v1_savings_post",
"data": {
"id": "f46d76c4-56d3-11ee-ac69-d6df71eb5902",
"account_id": "RxsYshVGded4JeilkXgWKdXA",
"name": "Car Savings",
"target_amount": {
"currency": "GBP",
"value": "3000.00"
},
"recurrent_amount": {
"currency": "GBP",
"value": "750.00"
},
"target_date": "2023-12-30",
"saved_amount": {
"currency": "GBP",
"value": "0.00"
},
"created_at": "2023-09-19T10:04:43Z"
}
}
curl --request POST \
--url https://api-sandbox.thisisbud.com/goals/v1/savings \
--header 'X-Client-Id: ecfa9b53-963b-4f8a-9811-e09a79ff7019' \
--header 'X-Customer-Id: 2a7a1f1c-18b9-4af1-8424-91c5848e8037' \
--header 'X-Customer-Secret: 2efbed02ac697a80354e0a792bbe733aed904820d030321a0b50b51c1dd05bd3' \
--header 'accept: application/json' \
--header 'authorization: Bearer dddd' \
--header 'content-type: application/json' \
--data '
{
"target_amount": {
"value": "3000",
"currency": "GBP"
},
"recurrent_amount": {
"value": "750",
"currency": "GBP"
},
"name": "Car Savings",
"account_id": "RxsYshVGded4JeilkXgWKdXA",
"target_date": "2023-12-30"
}
'
In the case that the provided account_id
does not exist within the Bud platform, 404
HTTP response will be given
If you receive a 400
response, please check the headers and body you're sending in the request before trying again.
If you receive a 401
response from either of the endpoints this would indicate that you are not authorised to make this request, if you believe this to be a mistake or are receiving persistent 500
responses please raise a support request.
If you have any questions, please contact us via the chatbot (bottom-right of screen 👉) or via a support request or check our FAQs.
Updated about 1 year ago