API reference
A REST API over HTTPS. Send JSON (or form fields) and get JSON back. Every request except getting a token needs a token in the Authorization header.
- Base URL
- https://api.getinvoice.co/v1
- Authentication
- Bearer token from your API key, 60 minutes, refreshable for 14 days
- Format
- JSON. Amounts and dates come back as strings, e.g. "1500", "7.5", "2026-11-30"
- Rate limit
- 50 requests a second, bursts to 100
Ids (invoices, estimates, clients, expenses) are strings of digits; use them exactly as returned. Everything you create through the API shows up in your dashboard, and the other way round.
Authentication
Exchange your API key for a token, then send the token as a Bearer header on every other request. Tokens last 60 minutes; refresh one for up to 14 days after it was first issued, then authenticate again.
Get a token
POST/authenticate
Your API key is in the dashboard under Settings → API. API access needs a paid plan (Basic or Premium) that hasn't expired.
| Field | Type | Description |
|---|---|---|
api_keyrequired | string | Your business's API key. |
{ "api_key": "YOUR_API_KEY" }{
"status": "ok",
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9…",
"type": "bearer",
"expires_in": 3600,
"expiry": 1796025600
}- expires_in is in seconds; expiry is the same moment as a Unix timestamp.
- 401 with "Invalid API key…" if the key is wrong, or "API access not granted for this account…" on the Free plan or an expired one.
Refresh a token
GET/token/refresh
Send the current token, even if it has expired, as the Bearer header. You get a new token valid for another 60 minutes.
{
"status": "ok",
"refresh_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9…",
"type": "bearer",
"expires_in": 3600,
"expiry": 1796029200
}- Use refresh_token as your new token. After 14 days from the first token, call /authenticate again.
Invoices
Create, update and send invoices, and record payments against them.
List invoices
GET/invoice/all
All your invoices, newest first.
{
"status": "success",
"data": [
{
"id": "731905286147720",
"short_code": "K8M2QH7XTA",
"invoice_no": "INV-0042",
"description": "Website redesign",
"customer_id": "604218839150264",
"customer_name": "Chi Okafor",
"customer_phone": "08031234567",
"customer_address": "12 Admiralty Way, Lekki",
"payment_status": "Not Paid",
"currency": "NGN",
"tax_rate": "7.5",
"tax_amount": "11250",
"sub_total": "150000",
"total": "161250",
"amount_paid": "0",
"outstanding_balance": "161250",
"issue_date": "2026-11-30",
"due_date": "2026-12-14",
"note": "Thank you for your business",
"created_at": "2026-11-30 09:12:44",
"updated_at": "2026-11-30 09:12:44"
}
]
}Get an invoice
GET/invoice/{id}
One invoice with its items, online payments and the emails it was sent to.
{
"status": "success",
"invoice": [
{
"id": "731905286147720",
"short_code": "K8M2QH7XTA",
"invoice_no": "INV-0042",
"description": "Website redesign",
"customer_id": "604218839150264",
"customer_name": "Chi Okafor",
"customer_phone": "08031234567",
"customer_address": "12 Admiralty Way, Lekki",
"payment_status": "Not Paid",
"currency": "NGN",
"tax_rate": "7.5",
"tax_amount": "11250",
"sub_total": "150000",
"total": "161250",
"amount_paid": "0",
"outstanding_balance": "161250",
"issue_date": "2026-11-30",
"due_date": "2026-12-14",
"note": "Thank you for your business",
"created_at": "2026-11-30 09:12:44",
"updated_at": "2026-11-30 09:12:44"
}
],
"items": [
{ "description": "Design", "quantity": "2", "rate": "50000", "amount": "100000" },
{ "description": "Hosting setup", "quantity": "1", "rate": "50000", "amount": "50000" }
],
"payments": [
{ "status": "success", "reference": "INV_PST_7319_4F2A", "amount": "50000", "bank": "GTBank", "created_at": "2026-12-01 14:20:03" }
],
"send_log": [
{ "email": "chi@okafor.example", "date": "2026-11-30 09:15:02" }
]
}- An id that isn't one of your invoices returns the same shape with empty arrays.
Create an invoice
POST/invoice/add
Totals are worked out for you: each item's amount is quantity × rate, then tax is added.
| Field | Type | Description |
|---|---|---|
clientrequired | string | The client's id, from /client/all or /client/add. It must be one of your clients. |
invoice_norequired | string | Your invoice number, e.g. INV-0042. |
itemsrequired | array | Line items: [{ "description", "quantity", "rate" }], up to 200. |
payment_status | string | "Paid" or "Not Paid" (default). |
description | string | A short description shown on the document. |
currency | string | ISO 4217 code: NGN, USD, GBP, EUR, GHS… Defaults to your business currency. |
tax_rate | number | Tax as a percentage, e.g. 7.5. Defaults to your default tax. |
issue_date | date | YYYY-MM-DD. Defaults to today. |
due_date | date | YYYY-MM-DD. Defaults to today plus your default payment terms. |
note | text | The note at the bottom of the document. Defaults to your default note. |
{
"client": "604218839150264",
"invoice_no": "INV-0042",
"currency": "NGN",
"tax_rate": 7.5,
"due_date": "2026-12-14",
"items": [
{ "description": "Design", "quantity": 2, "rate": 50000 },
{ "description": "Hosting setup", "quantity": 1, "rate": 50000 }
]
}{
"status": "success",
"invoice": [
{
"id": "731905286147720",
"short_code": "K8M2QH7XTA",
"invoice_no": "INV-0042",
"description": "Website redesign",
"customer_id": "604218839150264",
"customer_name": "Chi Okafor",
"customer_phone": "08031234567",
"customer_address": "12 Admiralty Way, Lekki",
"payment_status": "Not Paid",
"currency": "NGN",
"tax_rate": "7.5",
"tax_amount": "11250",
"sub_total": "150000",
"total": "161250",
"amount_paid": "0",
"outstanding_balance": "161250",
"issue_date": "2026-11-30",
"due_date": "2026-12-14",
"note": "Thank you for your business",
"created_at": "2026-11-30 09:12:44",
"updated_at": "2026-11-30 09:12:44"
}
],
"items": [
{ "description": "Design", "quantity": "2", "rate": "50000", "amount": "100000" },
{ "description": "Hosting setup", "quantity": "1", "rate": "50000", "amount": "50000" }
]
}- On the Free plan (or a lapsed paid plan) you can create 10 invoices a month; the 11th returns 403.
Update an invoice
PUT/invoice/{id}
Send only what changes; everything else keeps its current value. Totals are recalculated.
| Field | Type | Description |
|---|---|---|
client | string | The client's id, from /client/all or /client/add. It must be one of your clients. |
invoice_no | string | Your invoice number, e.g. INV-0042. |
items | array | Line items: [{ "description", "quantity", "rate" }], up to 200. Sending items replaces all of them. |
payment_status | string | "Paid" or "Not Paid". |
description | string | A short description shown on the document. |
currency | string | ISO 4217 code: NGN, USD, GBP, EUR, GHS… Defaults to your business currency. |
tax_rate | number | Tax as a percentage, e.g. 7.5. Defaults to your default tax. |
issue_date | date | YYYY-MM-DD. Defaults to today. |
due_date | date | YYYY-MM-DD. Defaults to today plus your default payment terms. |
note | text | The note at the bottom of the document. Defaults to your default note. |
{ "due_date": "2026-12-31", "note": "Payment by bank transfer" }{ "status": "success", "invoice": [ … ], "items": [ … ] }- 404 if the invoice isn't one of yours.
Send an invoice by email
POST/invoice/send
Emails the invoice with a link to view and pay it online. A paid invoice is sent as a receipt, and one that has been sent before as a reminder.
| Field | Type | Description |
|---|---|---|
idrequired | string | The invoice id. |
emailrequired | string | One email address. |
{ "id": "731905286147720", "email": "chi@okafor.example" }{ "status": "success", "message": "Invoice was successfully sent." }- The email goes out within a few minutes.
- An invoice can be sent 3 times in 10 minutes; Free plans can send 5 invoices a day. Over a limit returns 401.
- Addresses that have bounced before, and no-reply or group addresses, are refused with 422.
Record a payment
POST/invoice/record-payment
Records money you received outside the online payment link. The invoice becomes Partial or Paid.
| Field | Type | Description |
|---|---|---|
idrequired | string | The invoice id. |
payment_daterequired | date | YYYY-MM-DD. |
amount_paidrequired | number | More than 0 and no more than the outstanding balance. |
payment_method | string | Cash (default), Bank Transfer, Cheque, Credit Card or Others. |
{ "id": "731905286147720", "payment_date": "2026-12-02", "amount_paid": 100000, "payment_method": "Bank Transfer" }{ "status": "success", "message": "Invoice payment update was successful." }Mark as paid
GET/invoice/paid/{id}
Records whatever is still owed as paid.
{ "status": "success", "message": "Invoice update was successful." }Mark as not paid
GET/invoice/not-paid/{id}
Clears the recorded payments and puts the full total back as outstanding.
{ "status": "success", "message": "Invoice update was successful." }Delete an invoice
DELETE/invoice/{id}
Its customer link stops working.
{ "status": "success", "message": "Invoice was successfully deleted." }Estimates
Estimates (quotes) work like invoices: the same fields, without payments.
List estimates
GET/estimate/all
All your estimates, newest first.
{
"status": "success",
"data": [
{
"id": "820116734502981",
"short_code": "Q3NV8L2PWE",
"estimate_no": "QT-0007",
"description": "Office fit-out",
"customer_id": "604218839150264",
"customer_name": "Chi Okafor",
"customer_phone": "08031234567",
"customer_address": "12 Admiralty Way, Lekki",
"currency": "NGN",
"tax_rate": "0",
"tax_amount": "0",
"sub_total": "450000",
"total": "450000",
"accepted": "False",
"issue_date": "2026-11-30",
"due_date": "2026-12-14",
"note": ""
}
]
}Get an estimate
GET/estimate/{id}
One estimate with its items and the emails it was sent to.
{ "status": "success", "estimate": [ … ], "items": [ … ], "send_log": [ … ] }Create an estimate
POST/estimate/add
Totals are worked out for you, as for invoices.
| Field | Type | Description |
|---|---|---|
clientrequired | string | The client's id, from /client/all or /client/add. It must be one of your clients. |
estimate_norequired | string | Your estimate number, e.g. QT-0007. |
itemsrequired | array | Line items: [{ "description", "quantity", "rate" }], up to 200. |
accepted | string | "True" or "False" (default). |
description | string | A short description shown on the document. |
currency | string | ISO 4217 code: NGN, USD, GBP, EUR, GHS… Defaults to your business currency. |
tax_rate | number | Tax as a percentage, e.g. 7.5. Defaults to your default tax. |
issue_date | date | YYYY-MM-DD. Defaults to today. |
due_date | date | YYYY-MM-DD. Defaults to today plus your default payment terms. |
note | text | The note at the bottom of the document. Defaults to your default note. |
{
"client": "604218839150264",
"estimate_no": "QT-0007",
"items": [{ "description": "Office fit-out", "quantity": 1, "rate": 450000 }]
}{
"status": "success",
"estimate": [
{
"id": "820116734502981",
"short_code": "Q3NV8L2PWE",
"estimate_no": "QT-0007",
"description": "Office fit-out",
"customer_id": "604218839150264",
"customer_name": "Chi Okafor",
"customer_phone": "08031234567",
"customer_address": "12 Admiralty Way, Lekki",
"currency": "NGN",
"tax_rate": "0",
"tax_amount": "0",
"sub_total": "450000",
"total": "450000",
"accepted": "False",
"issue_date": "2026-11-30",
"due_date": "2026-12-14",
"note": ""
}
],
"items": [{ "description": "Office fit-out", "quantity": "1", "rate": "450000", "amount": "450000" }]
}Update an estimate
PUT/estimate/{id}
Send only what changes.
| Field | Type | Description |
|---|---|---|
client | string | The client's id, from /client/all or /client/add. It must be one of your clients. |
estimate_no | string | Your estimate number, e.g. QT-0007. |
items | array | Line items: [{ "description", "quantity", "rate" }], up to 200. Sending items replaces all of them. |
accepted | string | "True" or "False". |
description | string | A short description shown on the document. |
currency | string | ISO 4217 code: NGN, USD, GBP, EUR, GHS… Defaults to your business currency. |
tax_rate | number | Tax as a percentage, e.g. 7.5. Defaults to your default tax. |
issue_date | date | YYYY-MM-DD. Defaults to today. |
due_date | date | YYYY-MM-DD. Defaults to today plus your default payment terms. |
note | text | The note at the bottom of the document. Defaults to your default note. |
{ "accepted": "True" }{ "status": "success", "estimate": [ … ], "items": [ … ] }Send an estimate by email
POST/estimate/send
Emails the estimate with a link to view it online. Same limits as sending invoices.
| Field | Type | Description |
|---|---|---|
idrequired | string | The estimate id. |
emailrequired | string | One email address. |
{ "id": "820116734502981", "email": "chi@okafor.example" }{ "status": "success", "message": "Estimate was successfully sent." }Delete an estimate
DELETE/estimate/{id}
{ "status": "success", "id": "820116734502981" }Expenses
Record what your business spends, for your profit and loss and tax reports.
List expenses
GET/expense/all
All your expenses, newest first.
{
"status": "success",
"data": [
{
"id": "915522370846113",
"short_code": "E7RK2MW9QC",
"category": "General Expenses",
"description": "Diesel for the generator",
"amount": "45000",
"currency": "NGN",
"vendor": "Total Energies",
"issued_date": "2026-11-28",
"created_at": "2026-11-28 17:03:10",
"updated_at": "2026-11-28 17:03:10"
}
]
}Get an expense
GET/expense/{id}
{
"status": "success",
"expense": [
{
"id": "915522370846113",
"short_code": "E7RK2MW9QC",
"category": "General Expenses",
"description": "Diesel for the generator",
"amount": "45000",
"currency": "NGN",
"vendor": "Total Energies",
"issued_date": "2026-11-28",
"created_at": "2026-11-28 17:03:10",
"updated_at": "2026-11-28 17:03:10"
}
]
}Record an expense
POST/expense/add
| Field | Type | Description |
|---|---|---|
descriptionrequired | string | What it was for. |
issue_daterequired | date | YYYY-MM-DD. |
amountrequired | number | The amount spent. |
currency | string | ISO 4217 code. Defaults to your business currency. |
vendor | string | Who you paid. |
{ "description": "Diesel for the generator", "issue_date": "2026-11-28", "amount": 45000, "currency": "NGN", "vendor": "Total Energies" }{
"status": "success",
"expense": [
{
"id": "915522370846113",
"short_code": "E7RK2MW9QC",
"category": "General Expenses",
"description": "Diesel for the generator",
"amount": "45000",
"currency": "NGN",
"vendor": "Total Energies",
"issued_date": "2026-11-28",
"created_at": "2026-11-28 17:03:10",
"updated_at": "2026-11-28 17:03:10"
}
]
}- The Free plan (or a lapsed paid plan) holds 5 expenses; the 6th returns 401.
Update an expense
PUT/expense/{id}
description, issue_date and amount are required here too; currency and vendor keep their value if left out.
| Field | Type | Description |
|---|---|---|
descriptionrequired | string | What it was for. |
issue_daterequired | date | YYYY-MM-DD. |
amountrequired | number | The amount spent. |
currency | string | ISO 4217 code. |
vendor | string | Who you paid. |
{ "description": "Diesel", "issue_date": "2026-11-28", "amount": 50000 }{ "status": "success", "expense": [ … ] }Delete an expense
DELETE/expense/{id}
{ "status": "success", "id": "915522370846113" }Clients
The people and companies you invoice. Create a client first, then use its id on invoices and estimates.
List clients
GET/client/all
All your clients, newest first.
{
"status": "success",
"data": [
{
"id": "604218839150264",
"names": "Chi Okafor",
"email": "chi@okafor.example",
"phone": "08031234567",
"address": "12 Admiralty Way, Lekki",
"added_on": "2026-11-02 10:41:07"
}
]
}Get a client
GET/client/{id}
One client with their invoices and estimates.
{ "status": "success", "data": [ … ], "invoices": [ … ], "estimates": [ … ] }Add a client
POST/client/add
| Field | Type | Description |
|---|---|---|
namesrequired | string | Full name or company name. |
email | string | Where invoices are sent. |
phone | string | |
address | string | Billing address. |
{ "names": "Chi Okafor", "email": "chi@okafor.example", "phone": "08031234567" }{
"status": "success",
"data": [
{
"id": "604218839150264",
"names": "Chi Okafor",
"email": "chi@okafor.example",
"phone": "08031234567",
"address": "12 Admiralty Way, Lekki",
"added_on": "2026-11-02 10:41:07"
}
]
}Update a client
PUT/client/{id}
names is required; the other fields are set to what you send.
| Field | Type | Description |
|---|---|---|
namesrequired | string | Full name or company name. |
email | string | |
phone | string | |
address | string |
{ "names": "Chi Okafor Ltd", "email": "accounts@okafor.example" }{ "status": "success", "data": [ … ] }Delete a client
DELETE/client/{id}
{ "status": "success", "id": "604218839150264" }Errors and limits
Successful requests answer 200. Anything else is an error with a JSON body; check the status code first.
| Status | Meaning | Example body |
|---|---|---|
| 401 | Not signed in: the token is missing, wrong or expired. Also used for plan and sending limits. | { "error": "User is not authenticated!" } |
| 403 | Your plan doesn't allow it, e.g. the monthly invoice limit on Free. | { "message": "New invoice can not be created. Upgrade your account to create and send more invoices." } |
| 404 | No such endpoint, or the record isn't one of yours. | { "status": "error", "message": "Invoice not found." } |
| 422 | A field is missing or not valid. | { "message": { "invoice_no": ["The invoice no field is required."] } } |
| 429 | Too many requests: more than 50 a second (bursts to 100). Wait and retry. | { "message": "Too Many Requests" } |
| 500 | Something went wrong on our side. Retry in a minute; if it keeps happening, contact support. | { "message": "Internal Server Error" } |
Questions, or something not working as described? Email support@getinvoice.co.