Skip to content

API reference

API: Invoices

Markdown version

MethodPathWhat it doesScope
GET/v1/work/invoicesInvoices or estimates, newest firstinvoices:read
POST/v1/work/invoicesMake a draft invoice or estimate: from the work that isn't billed yet (work), from lines of your own, or both. Nothing is sentinvoices:write
DELETE/v1/work/invoices/:idRemove a draft or a repeating invoice. Its time and expenses can be billed againinvoices:write
GET/v1/work/invoices/:idOne invoice or estimate, with its lines, payments and emailsinvoices:read
PATCH/v1/work/invoices/:idChange a draft. Lines, when given, replace all of them; taking one off lets its time be billed againinvoices:write
POST/v1/work/invoices/:id/approveApprove a draft so it can be sent. Without that permission, asks someone who has it (web app only)invoices:write
GET/v1/work/invoices/:id/booksWhether this invoice is in your QuickBooks Online or Xero books: not sent, waiting, sent, failed or voidedinvoices:read
POST/v1/work/invoices/:id/booksSend one sent invoice, with its payments, to your QuickBooks Online or Xero books now. Sending it again changes nothing unless it changedinvoices:write
POST/v1/work/invoices/:id/copyMake a new draft from this one: another invoice, or an invoice from an estimate. Time isn't copied twiceinvoices:write
POST/v1/work/invoices/:id/correctCorrect a sent invoice: it's cancelled, and a new draft has its lines, time and expensesinvoices:write
GET/v1/work/invoices/:id/e-invoiceA sent invoice as a Peppol e-invoice file (UBL)invoices:read
POST/v1/work/invoices/:id/linkMake a new link for the client. The old one stops workinginvoices:write
POST/v1/work/invoices/:id/paymentsRecord a payment, all of what's owed unless you say how much. how: balance uses money the client paid ahead, credit lowers what they oweinvoices:write
DELETE/v1/work/invoices/:id/payments/:paymentRemove a payment recorded by mistakeinvoices:write
POST/v1/work/invoices/:id/payments/:payment/refundGive back part or all of an online payment, through Stripe (web app only)invoices:write
POST/v1/work/invoices/:id/projectStart a project from an accepted estimate, at its priceinvoices:write
PUT/v1/work/invoices/:id/repeatMake an invoice again every week, month or year, as a draft to look at unless auto_send is on. On a repeating invoice, change or pause itinvoices:write
POST/v1/work/invoices/:id/sendSend it by email, or (with nobody to write to) mark it as sent. From then on it never changesmessages:send
POST/v1/work/invoices/:id/statusCancel a sent invoice, write it off or bring it back, or mark an estimate accepted or declinedinvoices:write
GET/v1/work/invoices/accounts.csvInvoices sent between two days, as the file Xero or QuickBooks Online reads, or the payments receivedinvoices:read
GET/v1/work/invoices/booksYour link to QuickBooks Online or Xero: which company it writes to, whether invoices go across by themselves, what's waiting and the last failureinvoices:read
PUT/v1/work/invoices/booksTurn sending invoices across by themselves on or off (only invoices sent from then on), choose the Xero organisation, set the account and tax names, or try failed ones againinvoices:write
POST/v1/work/invoices/connectConnect your own Stripe account: answers with Stripe's page to open (web app only)invoices:write
DELETE/v1/work/invoices/logoTake the logo off new invoicesinvoices:write
GET/v1/work/invoices/logoThe logo on new invoicesinvoices:read
PUT/v1/work/invoices/logoPut a logo on new invoices: send the JPEG itself, up to 500 KBinvoices:write
GET/v1/work/invoices/packagesHours clients paid for ahead, and how much of them is usedinvoices:read
POST/v1/work/invoices/packagesSell a client hours ahead. With a price it makes a draft invoice for them, and they count once that's sent. Later invoices take them offinvoices:write
DELETE/v1/work/invoices/packages/:idStop using hours paid ahead. Invoices that used some stay as they areinvoices:write
GET/v1/work/invoices/sendersOther names you invoice under, each with its own numbersinvoices:read
POST/v1/work/invoices/sendersAdd another name to invoice under, like a second companyinvoices:write
PATCH/v1/work/invoices/senders/:idChange a name you invoice under, or archive it. Sent invoices stay as they areinvoices:write
GET/v1/work/invoices/settingsWhat invoices say, and how clients pay theminvoices:read
PUT/v1/work/invoices/settingsChange what new invoices say, and what's sent by itself. Sent invoices stay as they areinvoices:write
GET/v1/work/invoices/unbilledTime, fixed prices and expenses that aren't on an invoice yet, by client and project, and what's owedinvoices:read

Examples

GET /v1/work/invoices

Invoices or estimates, newest first

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

POST /v1/work/invoices

Make a draft invoice or estimate: from the work that isn't billed yet (work), from lines of your own, or both. Nothing is sent

curl -s -X POST "https://api.hourfinch.com/v1/work/invoices" \
  -H "Authorization: Bearer $TK_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.hourfinch.com/v1/work/invoices`, {
  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/invoices/$ID

Remove a draft or a repeating invoice. Its time and expenses can be billed again

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

GET /v1/work/invoices/$ID

One invoice or estimate, with its lines, payments and emails

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

PATCH /v1/work/invoices/$ID

Change a draft. Lines, when given, replace all of them; taking one off lets its time be billed again

curl -s -X PATCH "https://api.hourfinch.com/v1/work/invoices/$ID" \
  -H "Authorization: Bearer $TK_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.hourfinch.com/v1/work/invoices/${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();

GET /v1/work/invoices/$ID/books

Whether this invoice is in your QuickBooks Online or Xero books: not sent, waiting, sent, failed or voided

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

POST /v1/work/invoices/$ID/books

Send one sent invoice, with its payments, to your QuickBooks Online or Xero books now. Sending it again changes nothing unless it changed

curl -s -X POST "https://api.hourfinch.com/v1/work/invoices/$ID/books" \
  -H "Authorization: Bearer $TK_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.hourfinch.com/v1/work/invoices/${id}/books`, {
  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();

POST /v1/work/invoices/$ID/copy

Make a new draft from this one: another invoice, or an invoice from an estimate. Time isn't copied twice

curl -s -X POST "https://api.hourfinch.com/v1/work/invoices/$ID/copy" \
  -H "Authorization: Bearer $TK_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.hourfinch.com/v1/work/invoices/${id}/copy`, {
  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();

POST /v1/work/invoices/$ID/correct

Correct a sent invoice: it's cancelled, and a new draft has its lines, time and expenses

curl -s -X POST "https://api.hourfinch.com/v1/work/invoices/$ID/correct" \
  -H "Authorization: Bearer $TK_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.hourfinch.com/v1/work/invoices/${id}/correct`, {
  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/invoices/$ID/e-invoice

A sent invoice as a Peppol e-invoice file (UBL)

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

POST /v1/work/invoices/$ID/link

Make a new link for the client. The old one stops working

curl -s -X POST "https://api.hourfinch.com/v1/work/invoices/$ID/link" \
  -H "Authorization: Bearer $TK_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.hourfinch.com/v1/work/invoices/${id}/link`, {
  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();

POST /v1/work/invoices/$ID/payments

Record a payment, all of what's owed unless you say how much. how: balance uses money the client paid ahead, credit lowers what they owe

curl -s -X POST "https://api.hourfinch.com/v1/work/invoices/$ID/payments" \
  -H "Authorization: Bearer $TK_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.hourfinch.com/v1/work/invoices/${id}/payments`, {
  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/invoices/$ID/payments/$PAYMENT

Remove a payment recorded by mistake

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

POST /v1/work/invoices/$ID/project

Start a project from an accepted estimate, at its price

curl -s -X POST "https://api.hourfinch.com/v1/work/invoices/$ID/project" \
  -H "Authorization: Bearer $TK_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.hourfinch.com/v1/work/invoices/${id}/project`, {
  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();

PUT /v1/work/invoices/$ID/repeat

Make an invoice again every week, month or year, as a draft to look at unless auto_send is on. On a repeating invoice, change or pause it

curl -s -X PUT "https://api.hourfinch.com/v1/work/invoices/$ID/repeat" \
  -H "Authorization: Bearer $TK_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.hourfinch.com/v1/work/invoices/${id}/repeat`, {
  method: "PUT",
  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();

POST /v1/work/invoices/$ID/send

Send it by email, or (with nobody to write to) mark it as sent. From then on it never changes

curl -s -X POST "https://api.hourfinch.com/v1/work/invoices/$ID/send" \
  -H "Authorization: Bearer $TK_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.hourfinch.com/v1/work/invoices/${id}/send`, {
  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();

POST /v1/work/invoices/$ID/status

Cancel a sent invoice, write it off or bring it back, or mark an estimate accepted or declined

curl -s -X POST "https://api.hourfinch.com/v1/work/invoices/$ID/status" \
  -H "Authorization: Bearer $TK_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.hourfinch.com/v1/work/invoices/${id}/status`, {
  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/invoices/accounts.csv

Invoices sent between two days, as the file Xero or QuickBooks Online reads, or the payments received

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

GET /v1/work/invoices/books

Your link to QuickBooks Online or Xero: which company it writes to, whether invoices go across by themselves, what's waiting and the last failure

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

PUT /v1/work/invoices/books

Turn sending invoices across by themselves on or off (only invoices sent from then on), choose the Xero organisation, set the account and tax names, or try failed ones again

curl -s -X PUT "https://api.hourfinch.com/v1/work/invoices/books" \
  -H "Authorization: Bearer $TK_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.hourfinch.com/v1/work/invoices/books`, {
  method: "PUT",
  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();

Take the logo off new invoices

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

The logo on new invoices

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

Put a logo on new invoices: send the JPEG itself, up to 500 KB

curl -s -X PUT "https://api.hourfinch.com/v1/work/invoices/logo" \
  -H "Authorization: Bearer $TK_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.hourfinch.com/v1/work/invoices/logo`, {
  method: "PUT",
  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/invoices/packages

Hours clients paid for ahead, and how much of them is used

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

POST /v1/work/invoices/packages

Sell a client hours ahead. With a price it makes a draft invoice for them, and they count once that's sent. Later invoices take them off

curl -s -X POST "https://api.hourfinch.com/v1/work/invoices/packages" \
  -H "Authorization: Bearer $TK_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.hourfinch.com/v1/work/invoices/packages`, {
  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/invoices/packages/$ID

Stop using hours paid ahead. Invoices that used some stay as they are

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

GET /v1/work/invoices/senders

Other names you invoice under, each with its own numbers

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

POST /v1/work/invoices/senders

Add another name to invoice under, like a second company

curl -s -X POST "https://api.hourfinch.com/v1/work/invoices/senders" \
  -H "Authorization: Bearer $TK_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.hourfinch.com/v1/work/invoices/senders`, {
  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/invoices/senders/$ID

Change a name you invoice under, or archive it. Sent invoices stay as they are

curl -s -X PATCH "https://api.hourfinch.com/v1/work/invoices/senders/$ID" \
  -H "Authorization: Bearer $TK_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.hourfinch.com/v1/work/invoices/senders/${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();

GET /v1/work/invoices/settings

What invoices say, and how clients pay them

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

PUT /v1/work/invoices/settings

Change what new invoices say, and what's sent by itself. Sent invoices stay as they are

curl -s -X PUT "https://api.hourfinch.com/v1/work/invoices/settings" \
  -H "Authorization: Bearer $TK_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.hourfinch.com/v1/work/invoices/settings`, {
  method: "PUT",
  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/invoices/unbilled

Time, fixed prices and expenses that aren't on an invoice yet, by client and project, and what's owed

curl -s "https://api.hourfinch.com/v1/work/invoices/unbilled" \
  -H "Authorization: Bearer $TK_API_KEY"
const res = await fetch(`https://api.hourfinch.com/v1/work/invoices/unbilled`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.TK_API_KEY}` },
});
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.