Create Savings Goal Action

The POST goals/v1/savings{goal_id}/actions endpoint allows an action to be created against a given savings goal. An action is an indication from the customer that they have paid a contribution into the given account towards their savings goal.

The amount can be a debit or a credit, denoted by the credit_debit_indicator, should a customer withdraw or add money from or to the associated account.

The amount is validated against the balance of the account to ensure it is possible that this contribution has been paid into the account.

This endpoint will return the created action with its id and created_at time. An example of a 201 response can be seen below.

{
  "operation_id": "goals_v1_savings_actions_post",
  "data": {
    "id": "23267253-5860-11ee-99e5-9ed0600d2630",
    "amount": {
      "currency": "GBP",
      "value": "10.00"
    },
    "credit_debit_indicator": "credit",
    "created_at": "2023-09-21T09:20:42Z"
  },
  "metadata": {
    "goal_id": "19d1def3-5860-11ee-9342-3e1d60bc76f9"
  }
}
curl --request POST \
     --url https://api-sandbox.thisisbud.com/goals/v1/savings/goal_id/actions \
     --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 '
{
  "amount": {
    "value": "10",
    "currency": "GBP"
  },
  "credit_debit_indicator": "credit"
}
'

In the case that the action cannot have been made as it is not valid against the account's balance, then 400 is returned.

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.