v1

latestOpenAPI 3.0.02026-07-2412592575.3 KB
spending goals

Create a single spending goal for a user

Requires spending_goals:read and spending_goals:write:all scopes.

post/spending-goals

Request body

categoryIdstring required

The id of the category for the spending goal, either from the /categories endpoint or std:all

periodType'monthly' | 'annual'

The period type of the goal, can be annual or monthly

periodStartstring

You can set a goal period to start on a certain date. DD when periodType is monthly, DD-MM when periodType is annual

Example request

{
  "categoryId": "std:379c7ed2-27f3-401f-b581-f6507934f0f0",
  "amount": {
    "value": 50000
  }
}

Response

Successful Spending Goal Response

metaobject

Example response

{
  "data": {
    "categoryId": "std:4b0255f0-0309-4509-9e05-4b4e386f9b0d",
    "dateCreated": "2018-07-11T00:00:00.000Z",
    "periodType": "monthly",
    "periodStart": "01",
    "id": "0b4e6488-6de0-420c-8f56-fee665707d57",
    "amount": {
      "value": 40000,
      "majorUnits": 400,
      "currency": "GBP"
    },
    "spending": [
      {
        "date": "2018-07",
        "spent": -35000
      }
    ]
  }
}