curl --request PUT \
--url https://dev-billing-api.iqraa.ai/api/v1/api/v1/invoices-templates/{id} \
--header 'Content-Type: application/json' \
--header 'x-admin-api-key: <x-admin-api-key>' \
--data '
{
"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
}
'import requests
url = "https://dev-billing-api.iqraa.ai/api/v1/api/v1/invoices-templates/{id}"
payload = {
"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 = {
"x-admin-api-key": "<x-admin-api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-admin-api-key': '<x-admin-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
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
})
};
fetch('https://dev-billing-api.iqraa.ai/api/v1/api/v1/invoices-templates/{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://dev-billing-api.iqraa.ai/api/v1/api/v1/invoices-templates/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'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
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://dev-billing-api.iqraa.ai/api/v1/api/v1/invoices-templates/{id}"
payload := strings.NewReader("{\n \"name\": \"Standard Template\",\n \"components\": {\n \"requiredFields\": {\n \"invoiceNumber\": true,\n \"date\": true,\n \"amount\": true,\n \"customerDetails\": true\n },\n \"showCompanyDetails\": true,\n \"showCustomerDetails\": true,\n \"showLineItems\": true,\n \"showPaymentTerms\": true,\n \"showFooter\": true,\n \"showLogo\": true,\n \"companyDetails\": {\n \"companyName\": \"Company Name\",\n \"companyAddress\": \"Company Address\",\n \"companyCity\": \"City\",\n \"companyCountry\": \"Country\",\n \"companyEmail\": \"email@company.com\",\n \"logoUrl\": \"https://example.com/logo.png\",\n \"vatNumber\": \"123456789\"\n },\n \"taxSettings\": {\n \"enabled\": true,\n \"rate\": 20,\n \"label\": \"VAT\"\n }\n },\n \"isDefault\": false\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-admin-api-key", "<x-admin-api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://dev-billing-api.iqraa.ai/api/v1/api/v1/invoices-templates/{id}")
.header("x-admin-api-key", "<x-admin-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Standard Template\",\n \"components\": {\n \"requiredFields\": {\n \"invoiceNumber\": true,\n \"date\": true,\n \"amount\": true,\n \"customerDetails\": true\n },\n \"showCompanyDetails\": true,\n \"showCustomerDetails\": true,\n \"showLineItems\": true,\n \"showPaymentTerms\": true,\n \"showFooter\": true,\n \"showLogo\": true,\n \"companyDetails\": {\n \"companyName\": \"Company Name\",\n \"companyAddress\": \"Company Address\",\n \"companyCity\": \"City\",\n \"companyCountry\": \"Country\",\n \"companyEmail\": \"email@company.com\",\n \"logoUrl\": \"https://example.com/logo.png\",\n \"vatNumber\": \"123456789\"\n },\n \"taxSettings\": {\n \"enabled\": true,\n \"rate\": 20,\n \"label\": \"VAT\"\n }\n },\n \"isDefault\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://dev-billing-api.iqraa.ai/api/v1/api/v1/invoices-templates/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-admin-api-key"] = '<x-admin-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Standard Template\",\n \"components\": {\n \"requiredFields\": {\n \"invoiceNumber\": true,\n \"date\": true,\n \"amount\": true,\n \"customerDetails\": true\n },\n \"showCompanyDetails\": true,\n \"showCustomerDetails\": true,\n \"showLineItems\": true,\n \"showPaymentTerms\": true,\n \"showFooter\": true,\n \"showLogo\": true,\n \"companyDetails\": {\n \"companyName\": \"Company Name\",\n \"companyAddress\": \"Company Address\",\n \"companyCity\": \"City\",\n \"companyCountry\": \"Country\",\n \"companyEmail\": \"email@company.com\",\n \"logoUrl\": \"https://example.com/logo.png\",\n \"vatNumber\": \"123456789\"\n },\n \"taxSettings\": {\n \"enabled\": true,\n \"rate\": 20,\n \"label\": \"VAT\"\n }\n },\n \"isDefault\": false\n}"
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
}Update template
Updates an existing invoice template.
curl --request PUT \
--url https://dev-billing-api.iqraa.ai/api/v1/api/v1/invoices-templates/{id} \
--header 'Content-Type: application/json' \
--header 'x-admin-api-key: <x-admin-api-key>' \
--data '
{
"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
}
'import requests
url = "https://dev-billing-api.iqraa.ai/api/v1/api/v1/invoices-templates/{id}"
payload = {
"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 = {
"x-admin-api-key": "<x-admin-api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-admin-api-key': '<x-admin-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
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
})
};
fetch('https://dev-billing-api.iqraa.ai/api/v1/api/v1/invoices-templates/{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://dev-billing-api.iqraa.ai/api/v1/api/v1/invoices-templates/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'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
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://dev-billing-api.iqraa.ai/api/v1/api/v1/invoices-templates/{id}"
payload := strings.NewReader("{\n \"name\": \"Standard Template\",\n \"components\": {\n \"requiredFields\": {\n \"invoiceNumber\": true,\n \"date\": true,\n \"amount\": true,\n \"customerDetails\": true\n },\n \"showCompanyDetails\": true,\n \"showCustomerDetails\": true,\n \"showLineItems\": true,\n \"showPaymentTerms\": true,\n \"showFooter\": true,\n \"showLogo\": true,\n \"companyDetails\": {\n \"companyName\": \"Company Name\",\n \"companyAddress\": \"Company Address\",\n \"companyCity\": \"City\",\n \"companyCountry\": \"Country\",\n \"companyEmail\": \"email@company.com\",\n \"logoUrl\": \"https://example.com/logo.png\",\n \"vatNumber\": \"123456789\"\n },\n \"taxSettings\": {\n \"enabled\": true,\n \"rate\": 20,\n \"label\": \"VAT\"\n }\n },\n \"isDefault\": false\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-admin-api-key", "<x-admin-api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://dev-billing-api.iqraa.ai/api/v1/api/v1/invoices-templates/{id}")
.header("x-admin-api-key", "<x-admin-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Standard Template\",\n \"components\": {\n \"requiredFields\": {\n \"invoiceNumber\": true,\n \"date\": true,\n \"amount\": true,\n \"customerDetails\": true\n },\n \"showCompanyDetails\": true,\n \"showCustomerDetails\": true,\n \"showLineItems\": true,\n \"showPaymentTerms\": true,\n \"showFooter\": true,\n \"showLogo\": true,\n \"companyDetails\": {\n \"companyName\": \"Company Name\",\n \"companyAddress\": \"Company Address\",\n \"companyCity\": \"City\",\n \"companyCountry\": \"Country\",\n \"companyEmail\": \"email@company.com\",\n \"logoUrl\": \"https://example.com/logo.png\",\n \"vatNumber\": \"123456789\"\n },\n \"taxSettings\": {\n \"enabled\": true,\n \"rate\": 20,\n \"label\": \"VAT\"\n }\n },\n \"isDefault\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://dev-billing-api.iqraa.ai/api/v1/api/v1/invoices-templates/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-admin-api-key"] = '<x-admin-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Standard Template\",\n \"components\": {\n \"requiredFields\": {\n \"invoiceNumber\": true,\n \"date\": true,\n \"amount\": true,\n \"customerDetails\": true\n },\n \"showCompanyDetails\": true,\n \"showCustomerDetails\": true,\n \"showLineItems\": true,\n \"showPaymentTerms\": true,\n \"showFooter\": true,\n \"showLogo\": true,\n \"companyDetails\": {\n \"companyName\": \"Company Name\",\n \"companyAddress\": \"Company Address\",\n \"companyCity\": \"City\",\n \"companyCountry\": \"Country\",\n \"companyEmail\": \"email@company.com\",\n \"logoUrl\": \"https://example.com/logo.png\",\n \"vatNumber\": \"123456789\"\n },\n \"taxSettings\": {\n \"enabled\": true,\n \"rate\": 20,\n \"label\": \"VAT\"\n }\n },\n \"isDefault\": false\n}"
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
Path Parameters
Body
Fields to update in the template. All fields are optional.
Unique name for the invoice template
"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
{ "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
Response
Template updated successfully
Unique name for the invoice template
"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
{ "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