Skip to content

API reference

API: Expenses

Markdown version

MethodPathWhat it doesScope
GET/v1/work/expensesThe latest expenses, or those between two days: your own, and others' if you may see themexpenses:read
POST/v1/work/expensesAdd an expense to a projectexpenses:write
DELETE/v1/work/expenses/:idRemove an expense and its receiptexpenses:write
PATCH/v1/work/expenses/:idCorrect an expense, or mark the person paid backexpenses:write
DELETE/v1/work/expenses/:id/receiptTake off an expense's receiptexpenses:write
GET/v1/work/expenses/:id/receiptAn expense's receiptexpenses:read
POST/v1/work/expenses/:id/receiptAdd or replace an expense's receipt: send the photo or PDF itself, up to 8 MBexpenses:write
GET/v1/work/expenses/categoriesKinds of expenseexpenses:read
POST/v1/work/expenses/categoriesAdd a kind of expenseexpenses:write
PATCH/v1/work/expenses/categories/:idChange a kind of expense, archive it or bring it back. Expenses already added stay as they areexpenses:write

Examples

GET /v1/work/expenses

The latest expenses, or those between two days: your own, and others' if you may see them

curl -s "https://api.hourfinch.com/v1/work/expenses" \
  -H "Authorization: Bearer $TK_API_KEY"
const res = await fetch(`https://api.hourfinch.com/v1/work/expenses`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.TK_API_KEY}` },
});
const data = await res.json();

POST /v1/work/expenses

Add an expense to a project

curl -s -X POST "https://api.hourfinch.com/v1/work/expenses" \
  -H "Authorization: Bearer $TK_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.hourfinch.com/v1/work/expenses`, {
  method: "POST",
  headers: { authorization: `Bearer ${process.env.TK_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();

DELETE /v1/work/expenses/$ID

Remove an expense and its receipt

curl -s -X DELETE "https://api.hourfinch.com/v1/work/expenses/$ID" \
  -H "Authorization: Bearer $TK_API_KEY"
const res = await fetch(`https://api.hourfinch.com/v1/work/expenses/${id}`, {
  method: "DELETE",
  headers: { authorization: `Bearer ${process.env.TK_API_KEY}` },
});
const data = await res.json();

PATCH /v1/work/expenses/$ID

Correct an expense, or mark the person paid back

curl -s -X PATCH "https://api.hourfinch.com/v1/work/expenses/$ID" \
  -H "Authorization: Bearer $TK_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.hourfinch.com/v1/work/expenses/${id}`, {
  method: "PATCH",
  headers: { authorization: `Bearer ${process.env.TK_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();

DELETE /v1/work/expenses/$ID/receipt

Take off an expense's receipt

curl -s -X DELETE "https://api.hourfinch.com/v1/work/expenses/$ID/receipt" \
  -H "Authorization: Bearer $TK_API_KEY"
const res = await fetch(`https://api.hourfinch.com/v1/work/expenses/${id}/receipt`, {
  method: "DELETE",
  headers: { authorization: `Bearer ${process.env.TK_API_KEY}` },
});
const data = await res.json();

GET /v1/work/expenses/$ID/receipt

An expense's receipt

curl -s "https://api.hourfinch.com/v1/work/expenses/$ID/receipt" \
  -H "Authorization: Bearer $TK_API_KEY"
const res = await fetch(`https://api.hourfinch.com/v1/work/expenses/${id}/receipt`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.TK_API_KEY}` },
});
const data = await res.json();

POST /v1/work/expenses/$ID/receipt

Add or replace an expense's receipt: send the photo or PDF itself, up to 8 MB

curl -s -X POST "https://api.hourfinch.com/v1/work/expenses/$ID/receipt" \
  -H "Authorization: Bearer $TK_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.hourfinch.com/v1/work/expenses/${id}/receipt`, {
  method: "POST",
  headers: { authorization: `Bearer ${process.env.TK_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();

GET /v1/work/expenses/categories

Kinds of expense

curl -s "https://api.hourfinch.com/v1/work/expenses/categories" \
  -H "Authorization: Bearer $TK_API_KEY"
const res = await fetch(`https://api.hourfinch.com/v1/work/expenses/categories`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.TK_API_KEY}` },
});
const data = await res.json();

POST /v1/work/expenses/categories

Add a kind of expense

curl -s -X POST "https://api.hourfinch.com/v1/work/expenses/categories" \
  -H "Authorization: Bearer $TK_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.hourfinch.com/v1/work/expenses/categories`, {
  method: "POST",
  headers: { authorization: `Bearer ${process.env.TK_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();

PATCH /v1/work/expenses/categories/$ID

Change a kind of expense, archive it or bring it back. Expenses already added stay as they are

curl -s -X PATCH "https://api.hourfinch.com/v1/work/expenses/categories/$ID" \
  -H "Authorization: Bearer $TK_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.hourfinch.com/v1/work/expenses/categories/${id}`, {
  method: "PATCH",
  headers: { authorization: `Bearer ${process.env.TK_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();

Request and response schemas: https://www.hourfinch.com/openapi.json. All resources: API reference.

Send feedback

Tell us what's broken, confusing or missing on this page, or an idea. It goes to the team that builds the product.
Please don't include passwords or card numbers.
Only to reply about this. Never added to any mailing list.