Skip to content
Invoice

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.

Get a token: fields
FieldTypeDescription
api_keyrequiredstringYour business's API key.
Request body
{ "api_key": "YOUR_API_KEY" }
Response
{
  "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.

Response
{
  "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.

Response
{
  "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.

Response
{
  "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.

Create an invoice: fields
FieldTypeDescription
clientrequiredstringThe client's id, from /client/all or /client/add. It must be one of your clients.
invoice_norequiredstringYour invoice number, e.g. INV-0042.
itemsrequiredarrayLine items: [{ "description", "quantity", "rate" }], up to 200.
payment_statusstring"Paid" or "Not Paid" (default).
descriptionstringA short description shown on the document.
currencystringISO 4217 code: NGN, USD, GBP, EUR, GHS… Defaults to your business currency.
tax_ratenumberTax as a percentage, e.g. 7.5. Defaults to your default tax.
issue_datedateYYYY-MM-DD. Defaults to today.
due_datedateYYYY-MM-DD. Defaults to today plus your default payment terms.
notetextThe note at the bottom of the document. Defaults to your default note.
Request body
{
  "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 }
  ]
}
Response
{
  "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.

Update an invoice: fields
FieldTypeDescription
clientstringThe client's id, from /client/all or /client/add. It must be one of your clients.
invoice_nostringYour invoice number, e.g. INV-0042.
itemsarrayLine items: [{ "description", "quantity", "rate" }], up to 200. Sending items replaces all of them.
payment_statusstring"Paid" or "Not Paid".
descriptionstringA short description shown on the document.
currencystringISO 4217 code: NGN, USD, GBP, EUR, GHS… Defaults to your business currency.
tax_ratenumberTax as a percentage, e.g. 7.5. Defaults to your default tax.
issue_datedateYYYY-MM-DD. Defaults to today.
due_datedateYYYY-MM-DD. Defaults to today plus your default payment terms.
notetextThe note at the bottom of the document. Defaults to your default note.
Request body
{ "due_date": "2026-12-31", "note": "Payment by bank transfer" }
Response
{ "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.

Send an invoice by email: fields
FieldTypeDescription
idrequiredstringThe invoice id.
emailrequiredstringOne email address.
Request body
{ "id": "731905286147720", "email": "chi@okafor.example" }
Response
{ "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.

Record a payment: fields
FieldTypeDescription
idrequiredstringThe invoice id.
payment_daterequireddateYYYY-MM-DD.
amount_paidrequirednumberMore than 0 and no more than the outstanding balance.
payment_methodstringCash (default), Bank Transfer, Cheque, Credit Card or Others.
Request body
{ "id": "731905286147720", "payment_date": "2026-12-02", "amount_paid": 100000, "payment_method": "Bank Transfer" }
Response
{ "status": "success", "message": "Invoice payment update was successful." }

Mark as paid

GET/invoice/paid/{id}

Records whatever is still owed as paid.

Response
{ "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.

Response
{ "status": "success", "message": "Invoice update was successful." }

Delete an invoice

DELETE/invoice/{id}

Its customer link stops working.

Response
{ "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.

Response
{
  "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.

Response
{ "status": "success", "estimate": [ … ], "items": [ … ], "send_log": [ … ] }

Create an estimate

POST/estimate/add

Totals are worked out for you, as for invoices.

Create an estimate: fields
FieldTypeDescription
clientrequiredstringThe client's id, from /client/all or /client/add. It must be one of your clients.
estimate_norequiredstringYour estimate number, e.g. QT-0007.
itemsrequiredarrayLine items: [{ "description", "quantity", "rate" }], up to 200.
acceptedstring"True" or "False" (default).
descriptionstringA short description shown on the document.
currencystringISO 4217 code: NGN, USD, GBP, EUR, GHS… Defaults to your business currency.
tax_ratenumberTax as a percentage, e.g. 7.5. Defaults to your default tax.
issue_datedateYYYY-MM-DD. Defaults to today.
due_datedateYYYY-MM-DD. Defaults to today plus your default payment terms.
notetextThe note at the bottom of the document. Defaults to your default note.
Request body
{
  "client": "604218839150264",
  "estimate_no": "QT-0007",
  "items": [{ "description": "Office fit-out", "quantity": 1, "rate": 450000 }]
}
Response
{
  "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.

Update an estimate: fields
FieldTypeDescription
clientstringThe client's id, from /client/all or /client/add. It must be one of your clients.
estimate_nostringYour estimate number, e.g. QT-0007.
itemsarrayLine items: [{ "description", "quantity", "rate" }], up to 200. Sending items replaces all of them.
acceptedstring"True" or "False".
descriptionstringA short description shown on the document.
currencystringISO 4217 code: NGN, USD, GBP, EUR, GHS… Defaults to your business currency.
tax_ratenumberTax as a percentage, e.g. 7.5. Defaults to your default tax.
issue_datedateYYYY-MM-DD. Defaults to today.
due_datedateYYYY-MM-DD. Defaults to today plus your default payment terms.
notetextThe note at the bottom of the document. Defaults to your default note.
Request body
{ "accepted": "True" }
Response
{ "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.

Send an estimate by email: fields
FieldTypeDescription
idrequiredstringThe estimate id.
emailrequiredstringOne email address.
Request body
{ "id": "820116734502981", "email": "chi@okafor.example" }
Response
{ "status": "success", "message": "Estimate was successfully sent." }

Delete an estimate

DELETE/estimate/{id}

Response
{ "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.

Response
{
  "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}

Response
{
  "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

Record an expense: fields
FieldTypeDescription
descriptionrequiredstringWhat it was for.
issue_daterequireddateYYYY-MM-DD.
amountrequirednumberThe amount spent.
currencystringISO 4217 code. Defaults to your business currency.
vendorstringWho you paid.
Request body
{ "description": "Diesel for the generator", "issue_date": "2026-11-28", "amount": 45000, "currency": "NGN", "vendor": "Total Energies" }
Response
{
  "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.

Update an expense: fields
FieldTypeDescription
descriptionrequiredstringWhat it was for.
issue_daterequireddateYYYY-MM-DD.
amountrequirednumberThe amount spent.
currencystringISO 4217 code.
vendorstringWho you paid.
Request body
{ "description": "Diesel", "issue_date": "2026-11-28", "amount": 50000 }
Response
{ "status": "success", "expense": [ … ] }

Delete an expense

DELETE/expense/{id}

Response
{ "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.

Response
{
  "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.

Response
{ "status": "success", "data": [ … ], "invoices": [ … ], "estimates": [ … ] }

Add a client

POST/client/add

Add a client: fields
FieldTypeDescription
namesrequiredstringFull name or company name.
emailstringWhere invoices are sent.
phonestring
addressstringBilling address.
Request body
{ "names": "Chi Okafor", "email": "chi@okafor.example", "phone": "08031234567" }
Response
{
  "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.

Update a client: fields
FieldTypeDescription
namesrequiredstringFull name or company name.
emailstring
phonestring
addressstring
Request body
{ "names": "Chi Okafor Ltd", "email": "accounts@okafor.example" }
Response
{ "status": "success", "data": [ … ] }

Delete a client

DELETE/client/{id}

Response
{ "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.

Error status codes
StatusMeaningExample body
401Not signed in: the token is missing, wrong or expired. Also used for plan and sending limits.{ "error": "User is not authenticated!" }
403Your 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." }
404No such endpoint, or the record isn't one of yours.{ "status": "error", "message": "Invoice not found." }
422A field is missing or not valid.{ "message": { "invoice_no": ["The invoice no field is required."] } }
429Too many requests: more than 50 a second (bursts to 100). Wait and retry.{ "message": "Too Many Requests" }
500Something 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@invoice.ng.