# Workspace Budgets

This API lets you get insights into available account budget for a Workspace. Please see [documentation](/version/openapi/account-budget) for more details.

```shell curl
curl -i -X GET \
  https://api-demo.guusto.io/api/v1/balances/workspaces/currencies/CAD \
  -H 'Authorization: Bearer <YOUR_ApiToken_HERE>' \
  -H 'X-Workspace-id: 444'
```

```json 200 application/json
{
  "balance": 10000
}
```

```json 400 application/json
{
  "status": 400,
  "message": "Bad Request - Input could be invalid",
  "type": "invalid_field"
}
```

```json 401 application/json
{
  "status": 401,
  "message": "You do not have the right authentication to access this resource.",
  "type": "security_error"
}
```

```json 403 application/json
{
  "status": 403,
  "message": "You do not have authorization to access this resource.",
  "type": "security_error"
}
```

```json 500 application/json
{
  "status": 500,
  "message": "Something happened on our side",
  "type": "server_error"
}
```

br
### Get an Employee's Available Budget

This API lets you get insights into an employee's available budget for a Workspace. Please see [documentation](/version/openapi/account-budget/fetchmemberbalancebyemployeenumberandcurrency) for more details.

```shell curl
curl -i -X GET \
  https://api-demo.guusto.io/api/v1/balances/members/29392/currencies/CAD \
  -H 'Authorization: Bearer <YOUR_ApiToken_HERE>' \
  -H 'X-Workspace-id: 444'
```

```json 200 application/json
{
  "amount": 100,
  "currency": "CAD"
}
```

```json 400 application/json
{
  "status": 400,
  "message": "Bad Request - Input could be invalid",
  "type": "invalid_field"
}
```

```json 401 application/json
{
  "status": 401,
  "message": "You do not have the right authentication to access this resource.",
  "type": "security_error"
}
```

```json 403 application/json
{
  "status": 403,
  "message": "You do not have authorization to access this resource.",
  "type": "security_error"
}
```

```json 500 application/json
{
  "status": 500,
  "message": "Something happened on our side",
  "type": "server_error"
}
```

br
### Get all Employees and their Available Budget

This API lets you get insights into all employees within a Workspace and their available budget. Please see [documentation](/version/openapi/account-budget/fetchmembersbalancebycurrency) for more details.

```shell curl
curl -i -X GET \
  https://api-demo.guusto.io/api/v1/balances/members/currencies/CAD \
  -H 'Authorization: Bearer <YOUR_ApiToken_HERE>' \
  -H 'X-Workspace-id: 444'
```

```json 200 application/json
{
  "memberBalanceResponses": [
    {
      "amount": 10,
      "employeeNumber": "E393",
      "user": 4131
    },
    {
      "amount": 585,
      "employeeNumber": "E84901",
      "user": 5331
    }
  ]
}
```

```json 400 application/json
{
  "status": 400,
  "message": "Bad Request - Input could be invalid",
  "type": "invalid_field"
}
```

```json 401 application/json
{
  "status": 401,
  "message": "You do not have the right authentication to access this resource.",
  "type": "security_error"
}
```

```json 403 application/json
{
  "status": 403,
  "message": "You do not have authorization to access this resource.",
  "type": "security_error"
}
```

```json 500 application/json
{
  "status": 500,
  "message": "Something happened on our side",
  "type": "server_error"
}
```