Step 2: list all budgets

When your account is created, we automatically create a parent budget (accountBalance) for you. There is only ever one parent budget on an account, but you can have as many sub-budgets (and sub-sub-budgets) as you'd like.

Let's get a list of your budgets, so that we can retrieve the ID of the parent budget.

SandboxProduction
Copy
Copied
curl -i -X GET 'https://api-sandbox.equalsmoney.com/v2/budgets?accountId={accountId}' \ # Your account ID
-H 'Authorization: ApiKey {apiKey}' \ # Your API key
-H 'Content-Type: application/json'
Copy
Copied
curl -i -X GET 'https://api.equalsmoney.com/v2/budgets?accountId={accountId}' \ # Your account ID
-H 'Authorization: ApiKey {apiKey}' \ # Your API key
-H 'Content-Type: application/json'

If your request is successful, you'll receive a 200 response containing a list of all the budgets on your account. Look for the budget with the accountBalance type and make note of its id. In this example, the account is new so there is only one budget.

Copy
Copied
{
  "count": 1,
  "limit": 100,
  "offset": 0,
  "rows": [
    {
      "id": "6e08e7f7-f906-469e-b061-3dcb6def9b20",
      "accountId": "F12345",
      "parentId": null,
      "boxId": "19581e27de",
      "name": "Account balance",
      "type": "accountBalance",
      "status": "active",
      "allowCurrencyAlignment": false,
      "createdAt": "2023-08-29T15:15:04.000Z",
      "updatedAt": "2023-08-29T15:15:04.000Z",
      "feature": [
        {
          "id": "4cf0102e-cf6b-4980-a60f-a3e6e1fdf617",
          "budgetId": "6e08e7f7-f906-469e-b061-3dcb6def9b20",
          "payments": true,
          "budgetCards": false,
          "peopleCards": false,
          "forwardDeposits": false,
          "createdAt": "2023-08-29T15:15:04.000Z",
          "updatedAt": "2023-08-29T15:15:12.000Z",
          "BudgetId": "6e08e7f7-f906-469e-b061-3dcb6def9b20"
        }
      ],
      "currency": [
        {
          "createdAt": "2023-08-29T15:15:04Z",
          "updatedAt": "2023-08-29T15:15:04Z",
          "id": "fc6c42b9-ea54-4dfc-ad98-39894ec1b95b",
          "budgetId": "6e08e7f7-f906-469e-b061-3dcb6def9b20",
          "boxCurrencyId": null,
          "currencyCode": "GBP",
          "local": "unique",
          "international": "unique", 
          "BudgetId": "6e08e7f7-f906-469e-b061-3dcb6def9b20"
        }
      ],
      "balance": []
    }
  ]
}

Next