Invoices
Get All Invoices
Get All Invoices
GET
/
v1
/
invoices
Get All Invoices
curl --request GET \
--url https://api.bookeeping.ai/public-api/v1/invoices \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.bookeeping.ai/public-api/v1/invoices"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.bookeeping.ai/public-api/v1/invoices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.bookeeping.ai/public-api/v1/invoices",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.bookeeping.ai/public-api/v1/invoices"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.bookeeping.ai/public-api/v1/invoices")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bookeeping.ai/public-api/v1/invoices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"message": "<string>",
"metaData": {
"warnings": [
"<string>"
]
},
"data": {
"invoices": [
{
"_id": "<string>",
"projectId": "<string>",
"invoiceId": "<string>",
"discount": {
"value": 123
},
"amount": 123,
"invoiceDate": "2023-11-07T05:31:56Z",
"dueDate": "2023-11-07T05:31:56Z",
"currency": "<string>",
"lineItems": [
{
"id": "<string>",
"name": "<string>",
"quantity": 123,
"unitPrice": 123,
"tax": {
"value": 123
},
"discount": {
"value": 123
},
"description": "<string>"
}
],
"note": "<string>",
"calculated": {
"grandTotal": 123,
"tax": 123,
"discount": 123,
"subTotal": 123
},
"attachments": [
"<string>"
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"purchaseOrderId": "<string>",
"counterParty": {
"_id": "<string>",
"accountName": "<string>",
"accountNumber": "<string>",
"email": "jsmith@example.com",
"phone": "<string>",
"otherEmails": [
"jsmith@example.com"
],
"address": {
"city": "<string>",
"country": "<string>",
"state": "<string>",
"cca2": "<string>",
"line1": "<string>",
"line2": "<string>",
"postalCode": "<string>"
}
},
"convertedAmount": 123,
"convertedCurrency": "<string>",
"sendDate": "2023-11-07T05:31:56Z",
"sendBy": "<string>",
"cancellationReason": "<string>",
"cancellationDate": "2023-11-07T05:31:56Z",
"cancellationBy": "<string>",
"paidMarkedBy": "<string>",
"paidMarkedDate": "2023-11-07T05:31:56Z",
"attachedTransactionId": "<string>",
"payViaStripeAccountConnectionId": "<string>"
}
],
"count": 123
}
}{
"error": "BadRequestError",
"message": "<string>"
}{
"error": "UnauthorizedError",
"message": "<string>"
}{
"error": "ConflictError",
"message": "<string>"
}{
"error": "TooManyRequestsError",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Authorizations
API key for authentication. Get your key from the Dashboard > Settings > API Access.
Query Parameters
The page number 1 - n
The number of items per page. Max is 250. Default is 10.
The key to sort the items by. Default is _id.
Available options:
_id, name, createdAt, updatedAt, transactionDate The order to sort the items by. Default is 1. -1 for descending. 1 for ascending.
Available options:
1, -1 Minimum amount. Expected to be a number string (Int or Float) eg: 1000,1000.5
Maximum amount. Expected to be a number string (Int or Float) eg: 1000,1000.5
Start date in ISO format
End date in ISO format
Includes counterparties ids. Comma separated list of object ids eg: 666666666666666666666666,666666666666666666666666
Includes invoice statuses. Comma separated list of invoice statuses eg: DRAFT,SENT,PAID,OVERDUE,CANCELLED
⌘I
Get All Invoices
curl --request GET \
--url https://api.bookeeping.ai/public-api/v1/invoices \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.bookeeping.ai/public-api/v1/invoices"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.bookeeping.ai/public-api/v1/invoices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.bookeeping.ai/public-api/v1/invoices",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.bookeeping.ai/public-api/v1/invoices"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.bookeeping.ai/public-api/v1/invoices")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bookeeping.ai/public-api/v1/invoices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"message": "<string>",
"metaData": {
"warnings": [
"<string>"
]
},
"data": {
"invoices": [
{
"_id": "<string>",
"projectId": "<string>",
"invoiceId": "<string>",
"discount": {
"value": 123
},
"amount": 123,
"invoiceDate": "2023-11-07T05:31:56Z",
"dueDate": "2023-11-07T05:31:56Z",
"currency": "<string>",
"lineItems": [
{
"id": "<string>",
"name": "<string>",
"quantity": 123,
"unitPrice": 123,
"tax": {
"value": 123
},
"discount": {
"value": 123
},
"description": "<string>"
}
],
"note": "<string>",
"calculated": {
"grandTotal": 123,
"tax": 123,
"discount": 123,
"subTotal": 123
},
"attachments": [
"<string>"
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"purchaseOrderId": "<string>",
"counterParty": {
"_id": "<string>",
"accountName": "<string>",
"accountNumber": "<string>",
"email": "jsmith@example.com",
"phone": "<string>",
"otherEmails": [
"jsmith@example.com"
],
"address": {
"city": "<string>",
"country": "<string>",
"state": "<string>",
"cca2": "<string>",
"line1": "<string>",
"line2": "<string>",
"postalCode": "<string>"
}
},
"convertedAmount": 123,
"convertedCurrency": "<string>",
"sendDate": "2023-11-07T05:31:56Z",
"sendBy": "<string>",
"cancellationReason": "<string>",
"cancellationDate": "2023-11-07T05:31:56Z",
"cancellationBy": "<string>",
"paidMarkedBy": "<string>",
"paidMarkedDate": "2023-11-07T05:31:56Z",
"attachedTransactionId": "<string>",
"payViaStripeAccountConnectionId": "<string>"
}
],
"count": 123
}
}{
"error": "BadRequestError",
"message": "<string>"
}{
"error": "UnauthorizedError",
"message": "<string>"
}{
"error": "ConflictError",
"message": "<string>"
}{
"error": "TooManyRequestsError",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}