Sail

Get Expense Summary

GET/users/{user_id}/expenses/summary

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

Path Parameters

user_idstringrequired

The Sail user id.

Response

Aggregate expense statistics.

expenses_scannedinteger

Total number of expenses included in this summary.

eligible_totalnumber<float>

Sum of amounts for eligible expenses.

reimbursed_totalnumber<float>

Sum of amounts for reimbursed expenses.

currencystring

ISO 4217 currency code.

countsobject

Expense counts broken down by status.

Show counts properties
eligibleinteger

Number of eligible expenses.

needs_reviewinteger

Number of needs_review expenses.

ineligibleinteger

Number of ineligible expenses.

reimbursedinteger

Number of reimbursed expenses.

archivedinteger

Number of archived expenses.

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

errorobject

The error detail.

Show error properties
codestring

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.

messagestring

Human-readable error message. May change, so match on error.code instead.

paramstring

The request field that caused the error, when applicable. Null otherwise.

Request
curl -X GET "https://live.savewithsail.com/api/v1/users/<user_id>/expenses/summary" \
  -H "Authorization: Bearer <token>"
Response
{
  "expenses_scanned": 0,
  "eligible_total": 0,
  "reimbursed_total": 0,
  "currency": "string",
  "counts": {
    "eligible": 0,
    "needs_review": 0,
    "ineligible": 0,
    "reimbursed": 0,
    "archived": 0
  }
}