# Get Expense Summary

**GET** `/users/{user_id}/expenses/summary`

Base URL: `https://live.savewithsail.com/api/v1`

Returns aggregate expense statistics for the user, including totals and counts by status.

## Authorization

- PartnerKey (http, bearer)

## Path parameters

- `user_id` (string, required)
  The Sail user id.

## Responses

### 200

Aggregate expense statistics.

- `expenses_scanned` (integer)
  Total number of expenses included in this summary.
- `eligible_total` (number<float>)
  Sum of amounts for `eligible` expenses.
- `reimbursed_total` (number<float>)
  Sum of amounts for `reimbursed` expenses.
- `currency` (string)
  ISO 4217 currency code.
- `counts` (object)
  Expense counts broken down by status.
  - `eligible` (integer)
    Number of `eligible` expenses.
  - `needs_review` (integer)
    Number of `needs_review` expenses.
  - `ineligible` (integer)
    Number of `ineligible` expenses.
  - `reimbursed` (integer)
    Number of `reimbursed` expenses.
  - `archived` (integer)
    Number of `archived` expenses.

Example:

```json
{
  "expenses_scanned": 0,
  "eligible_total": 0,
  "reimbursed_total": 0,
  "currency": "string",
  "counts": {
    "eligible": 0,
    "needs_review": 0,
    "ineligible": 0,
    "reimbursed": 0,
    "archived": 0
  }
}
```

### default

Standard error envelope covering 400, 401, 403, 404, 429, and 500.

- `error` (object)
  The error detail.
  - `code` (string)
    Machine-readable code, e.g. `not_found`, `token_scope_mismatch`, `product_not_enabled`, `insufficient_key_scope`, `insufficient_token_scope`, `user_token_required`, `user_token_expired`, `invalid_user_token`, `invalid_key_configuration`, `connection_not_reconnectable`, `rate_limited`.
  - `message` (string)
    Human-readable error message. May change, so match on `error.code` instead.
  - `param` (string)
    The request field that caused the error, when applicable. Null otherwise.

Example:

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "param": "string"
  }
}
```