Invoices
Get an Invoice
Get an Invoice
GET
/
v1
/
invoices
/
{id}
Get an Invoice
curl --request GET \
--url https://api.bookeeping.ai/public-api/v1/invoices/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.bookeeping.ai/public-api/v1/invoices/{id}"
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/{id}', 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/{id}",
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/{id}"
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/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bookeeping.ai/public-api/v1/invoices/{id}")
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": {
"_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>"
}
}{
"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.
Path Parameters
The id of the invoice. Expected to be a valid object id like 666666666666666666666666
Pattern:
^[0-9A-Fa-f]{24}$⌘I
Get an Invoice
curl --request GET \
--url https://api.bookeeping.ai/public-api/v1/invoices/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.bookeeping.ai/public-api/v1/invoices/{id}"
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/{id}', 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/{id}",
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/{id}"
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/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bookeeping.ai/public-api/v1/invoices/{id}")
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": {
"_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>"
}
}{
"error": "BadRequestError",
"message": "<string>"
}{
"error": "UnauthorizedError",
"message": "<string>"
}{
"error": "ConflictError",
"message": "<string>"
}{
"error": "TooManyRequestsError",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}