latestSwagger 2.02026-08-20196638916.1 KB

23d8982b533d

Finance Management.Savings Goals
ENTERPRISE

Deposit to Savings Goal

Deposit amount to a Savings Goal. If this is the first deposit to this Savings Goal the status will transition from <code>CREATED</code> to <code>IN_PROGRESS</code>.

post/api/v1/savings-goals/{id}/allocations/fund:deposit

Path parameters

idstring required

The Savings Goal ID

Request body

currencyCodestring required

The ISO 4217 currency code of the amount

scaleinteger required

The scale of the amount. <br/>The unscaledValue is used with scale to accurately represent floating point values. <br/>The formula is unscaledValue * (10^-scale). For example, if scale is 1 and unscaledValue is 1230, the end result would be 123.0.

unscaledValueinteger required

The unscaled value of the amount. <br/>The unscaledValue is used with scale to accurately represent floating point values. <br/>The formula is unscaledValue * (10^-scale). For example, if scale is 1 and unscaledValue is 1230, the end result would be 123.0.

Example request

{
  "currencyCode": "EUR",
  "scale": 2,
  "unscaledValue": 2000
}

Response

The deposit Allocation.

createTimestring

Date and time in UTC in which the Allocation was made.

destinationIdstring

The ID of the Destination.

destinationType'SAVINGS_GOAL' | 'ACCOUNT'

The type of the destination.<br />- ACCOUNT: Destination of type Account.<br />- SAVINGS_GOAL: Destination of type Savings Goal.

idstring

The ID of the new allocation.

sourceIdstring

The ID of the Source.

sourceTypestring

The type of the source.<br />- ACCOUNT: Source of type Account.<br />- SAVINGS_GOAL: Source of type Savings Goal.

Example response

{
  "amount": {
    "currencyCode": "EUR",
    "scale": 2,
    "unscaledValue": 2000
  },
  "createTime": "2020-05-14T13:30:45Z",
  "destinationId": "d9f134ee2eb44846a4e02990ecc8d32e",
  "id": "d9f134ee2eb44846a4e02990ecc8d32e",
  "sourceId": "d9f134ee2eb44846a4e02990ecc8d32e"
}