List all invoice templates
curl --request GET \
--url https://dev-billing-api.iqraa.ai/api/v1/api/v1/invoices-templates \
--header 'x-admin-api-key: <x-admin-api-key>'import requests
url = "https://dev-billing-api.iqraa.ai/api/v1/api/v1/invoices-templates"
headers = {"x-admin-api-key": "<x-admin-api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-admin-api-key': '<x-admin-api-key>'}};
fetch('https://dev-billing-api.iqraa.ai/api/v1/api/v1/invoices-templates', 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://dev-billing-api.iqraa.ai/api/v1/api/v1/invoices-templates",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-admin-api-key: <x-admin-api-key>"
],
]);
$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://dev-billing-api.iqraa.ai/api/v1/api/v1/invoices-templates"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-admin-api-key", "<x-admin-api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://dev-billing-api.iqraa.ai/api/v1/api/v1/invoices-templates")
.header("x-admin-api-key", "<x-admin-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://dev-billing-api.iqraa.ai/api/v1/api/v1/invoices-templates")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-admin-api-key"] = '<x-admin-api-key>'
response = http.request(request)
puts response.read_body[
{
"name": "Standard Template",
"components": {
"requiredFields": {
"invoiceNumber": true,
"date": true,
"amount": true,
"customerDetails": true
},
"showCompanyDetails": true,
"showCustomerDetails": true,
"showLineItems": true,
"showPaymentTerms": true,
"showFooter": true,
"showLogo": true,
"companyDetails": {
"companyName": "Company Name",
"companyAddress": "Company Address",
"companyCity": "City",
"companyCountry": "Country",
"companyEmail": "email@company.com",
"logoUrl": "https://example.com/logo.png",
"vatNumber": "123456789"
},
"taxSettings": {
"enabled": true,
"rate": 20,
"label": "VAT"
}
},
"isDefault": false
}
]Invoice Templates
List all invoice templates
Retrieves all available invoice templates. Requires admin access.
GET
/
api
/
v1
/
invoices-templates
List all invoice templates
curl --request GET \
--url https://dev-billing-api.iqraa.ai/api/v1/api/v1/invoices-templates \
--header 'x-admin-api-key: <x-admin-api-key>'import requests
url = "https://dev-billing-api.iqraa.ai/api/v1/api/v1/invoices-templates"
headers = {"x-admin-api-key": "<x-admin-api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-admin-api-key': '<x-admin-api-key>'}};
fetch('https://dev-billing-api.iqraa.ai/api/v1/api/v1/invoices-templates', 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://dev-billing-api.iqraa.ai/api/v1/api/v1/invoices-templates",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-admin-api-key: <x-admin-api-key>"
],
]);
$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://dev-billing-api.iqraa.ai/api/v1/api/v1/invoices-templates"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-admin-api-key", "<x-admin-api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://dev-billing-api.iqraa.ai/api/v1/api/v1/invoices-templates")
.header("x-admin-api-key", "<x-admin-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://dev-billing-api.iqraa.ai/api/v1/api/v1/invoices-templates")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-admin-api-key"] = '<x-admin-api-key>'
response = http.request(request)
puts response.read_body[
{
"name": "Standard Template",
"components": {
"requiredFields": {
"invoiceNumber": true,
"date": true,
"amount": true,
"customerDetails": true
},
"showCompanyDetails": true,
"showCustomerDetails": true,
"showLineItems": true,
"showPaymentTerms": true,
"showFooter": true,
"showLogo": true,
"companyDetails": {
"companyName": "Company Name",
"companyAddress": "Company Address",
"companyCity": "City",
"companyCountry": "Country",
"companyEmail": "email@company.com",
"logoUrl": "https://example.com/logo.png",
"vatNumber": "123456789"
},
"taxSettings": {
"enabled": true,
"rate": 20,
"label": "VAT"
}
},
"isDefault": false
}
]Headers
The API key to access the admin API
Response
200 - application/json
List of templates retrieved successfully
Unique name for the invoice template
Example:
"Standard Template"
Template components configuration that defines the invoice layout and content. Includes: - Required fields (invoiceNumber, date, amount, etc.) - Display settings (company details, customer details, line items) - Company information - Tax settings - Custom fields
Show child attributes
Show child attributes
Example:
{
"requiredFields": {
"invoiceNumber": true,
"date": true,
"amount": true,
"customerDetails": true
},
"showCompanyDetails": true,
"showCustomerDetails": true,
"showLineItems": true,
"showPaymentTerms": true,
"showFooter": true,
"showLogo": true,
"companyDetails": {
"companyName": "Company Name",
"companyAddress": "Company Address",
"companyCity": "City",
"companyCountry": "Country",
"companyEmail": "email@company.com",
"logoUrl": "https://example.com/logo.png",
"vatNumber": "123456789"
},
"taxSettings": {
"enabled": true,
"rate": 20,
"label": "VAT"
}
}
Set this template as the default template for new invoices
⌘I