Get Invoice Templates
curl --request GET \
--url https://api.sonderplan.com/v2/invoice-template \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sonderplan.com/v2/invoice-template"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sonderplan.com/v2/invoice-template', 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.sonderplan.com/v2/invoice-template",
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.sonderplan.com/v2/invoice-template"
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.sonderplan.com/v2/invoice-template")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sonderplan.com/v2/invoice-template")
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{
"data": [
{
"id": 5693,
"name": "Long Form Jobs",
"type_id": 1,
"default": false,
"title": "Invoice",
"logo": [
{
"id": 2342354,
"name": "Avid_Icon",
"size": 174285,
"alias": "7e73ab25155974c230d09494548201b9f5056ef",
"extension": "png",
"mime_type": "image/png"
}
],
"top_left_container": "<string>",
"top_center_container": "<string>",
"top_right_container": "<string>",
"middle_left_container": "<string>",
"middle_center_container": "<string>",
"middle_right_container": "<string>",
"bottom_left_container": "<string>",
"bottom_center_container": "<string>",
"bottom_right_container": "<string>",
"email_subject_template": "<string>",
"email_body_template": "<string>",
"options": {
"items_column_visibility": {
"item": true,
"description": true,
"quantity": true,
"price": true,
"discount": true,
"tax": true,
"total": true
},
"totals_visibility": {
"sub_total": true,
"discount_total": true,
"net_total": true,
"tax_total": true,
"total": true
}
},
"created_id": 3,
"created": 1388552400,
"updated_id": 3,
"updated": 1388552400
}
],
"meta": {
"pagination": {
"total": 1,
"count": 1,
"per_page": 1,
"current_page": 1
}
}
}Invoice Template
Get Invoice Templates
An invoice (or quote) template is a customizable layout used to generate invoices and quotes with a consistent format and design.
It defines how details such as client information, items, taxes, and totals are displayed. Invoice templates can include your branding elements, like logos and company information, as well as custom fields or notes specific to your business needs.
Both Quote and Invoice templates can be created, edited and deleted using this endpoint so be sure to use the correct type_id.
READ access to the ADMIN module is required to access this endpointGET
/
v2
/
invoice-template
Get Invoice Templates
curl --request GET \
--url https://api.sonderplan.com/v2/invoice-template \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sonderplan.com/v2/invoice-template"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sonderplan.com/v2/invoice-template', 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.sonderplan.com/v2/invoice-template",
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.sonderplan.com/v2/invoice-template"
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.sonderplan.com/v2/invoice-template")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sonderplan.com/v2/invoice-template")
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{
"data": [
{
"id": 5693,
"name": "Long Form Jobs",
"type_id": 1,
"default": false,
"title": "Invoice",
"logo": [
{
"id": 2342354,
"name": "Avid_Icon",
"size": 174285,
"alias": "7e73ab25155974c230d09494548201b9f5056ef",
"extension": "png",
"mime_type": "image/png"
}
],
"top_left_container": "<string>",
"top_center_container": "<string>",
"top_right_container": "<string>",
"middle_left_container": "<string>",
"middle_center_container": "<string>",
"middle_right_container": "<string>",
"bottom_left_container": "<string>",
"bottom_center_container": "<string>",
"bottom_right_container": "<string>",
"email_subject_template": "<string>",
"email_body_template": "<string>",
"options": {
"items_column_visibility": {
"item": true,
"description": true,
"quantity": true,
"price": true,
"discount": true,
"tax": true,
"total": true
},
"totals_visibility": {
"sub_total": true,
"discount_total": true,
"net_total": true,
"tax_total": true,
"total": true
}
},
"created_id": 3,
"created": 1388552400,
"updated_id": 3,
"updated": 1388552400
}
],
"meta": {
"pagination": {
"total": 1,
"count": 1,
"per_page": 1,
"current_page": 1
}
}
}