Sparky Expenses API

Read expense claims. Approving and reimbursing stay in the app.

Address
https://expenses.sparkyli.com/api/v1
Plan
Plus and Max, with API access switched on for the organization

Endpoints

GET /expenses

Expenses, newest first.

Your own claims, unless your role can approve (then the organization's).

Inputs

NameTypeWhat it is
statuslogged, submitted, approved, rejected or reimbursedOnly expenses in this state.
project_id, client_idtextOnly this project or client.
from, todate, YYYY-MM-DDEarliest and latest expense date.
limit, offsetwhole numbersPaging: limit 1 to 100 (default 50); offset from next_offset.

Answer: expenses (a list) and next_offset

NameTypeWhat it is
id, user_idtextThe expense and who claimed it.
expense_numbertext or nullLike EXP-0012.
client_id, project_idtext or null
categorytextFor example travel or meals; an organization can add its own.
amountwhole number, minor unitsThe gross total paid.
currency3 letters
expense_datedate
descriptiontext or null
is_billable0 or 11 when it can be billed to a client.
statuslogged, submitted, approved, rejected or reimbursed
submitted_at, approved_at, reimbursed_attext or nullUTC time.
created_at, updated_attextUTC time.

GET /expenses/{id}

One expense. The receipt file stays in the app.

Inputs

NameTypeWhat it is
id*textThe expense's id.

Answer: expense

NameTypeWhat it is
(all the list fields, and these)
tagtext or nullA free-text label, like a trip name.
tax_ratenumber or nullPercent, where tax was captured.
taxable_value, tax_amountwhole number or null, minor units
rejection_notetext or nullWhy it was rejected.
receipt_filenametext or nullThe name of the attached receipt. The file itself is never returned.

Errors (besides the common ones)

  • 404 not_found: No such expense, or it is not yours to see.

Example

curl -s -H "authorization: Bearer $TOKEN" "https://expenses.sparkyli.com/api/v1/expenses?status=submitted"

New here? Start with the three things first, then sign in. Errors are explained under errors and limits.