Get Invoices
curl --request GET \
--url https://api.sonderplan.com/v2/invoice \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sonderplan.com/v2/invoice"
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', 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",
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"
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")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sonderplan.com/v2/invoice")
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": 1,
"prefix": "INV-",
"number": 892,
"date": 1547501100,
"date_time_iso": "2022-02-22T09:00:00+11:00",
"due_date": 1547501100,
"due_date_time_iso": "2022-02-22T09:00:00+11:00",
"items": [
{
"id": 982342,
"item_text": "Edit Suite 1 Grading",
"item_uuid": "r2394",
"ratescheme_id": 989234,
"description": "Session booked between 10th Jan -> 12th Jan 2023",
"quantity": "2.4",
"unit": "hourly",
"unit_amount": "20.65",
"unit_buy_amount": "10.15",
"tax": true,
"taxes": [
{
"id": 3247,
"name": "GST",
"rate": "10.00",
"total": "151.00"
}
],
"discount": "20.00%",
"total": "495.00",
"buy_total": "200.00",
"buy_total_fixed": false,
"order": 2,
"parent_group_id": 234842
}
],
"groups": [
{
"id": 23425,
"name": "Video Editing Services",
"description": "Includes all editing services",
"order": 2,
"hide_items": true
}
],
"status": [
{
"id": 2,
"name": "Submitted"
}
],
"project": [
{
"id": 2342354,
"name": "Andor S1 EP7 Annoucement",
"code": "AND-S1-EP7",
"description": "Colonel Yularen announces that the ISB has gained more surveillance and punitive authority, while Meero is challenged by Blevin for breaking protocol by accessing Imperial data without authorization.",
"start": 1547501100,
"end": 1547538900,
"parent_id": 9348,
"status_id": 1
}
],
"client": [
{
"id": 4,
"uuid": "p4",
"name": "Jane Someone",
"type": "person",
"email": "[email protected]",
"contact_person": {
"id": 2837,
"name": "Fred Flintstone"
}
}
],
"custom_fields": [
{
"id": 7823,
"name": "Type",
"value": "Video Editing",
"value_id": 8973,
"update_key": "2_1_7823"
}
],
"terms": "Payment to be made in 30 days",
"template_id": 213,
"cloned_id": 545647,
"reference": "QU-9893",
"currency": "AUD",
"sub_total": "1289.29",
"discount_total": "872.98",
"net_total": "416.31",
"tax_total": "129.87",
"total": "546.18",
"buy_total": "256.00",
"created_sp_flag": "true",
"created_id": 3,
"created": 1388552400,
"updated_id": 3,
"updated": 1388552400
}
],
"meta": {
"pagination": {
"total": 1,
"count": 1,
"per_page": 1,
"current_page": 1
}
}
}Invoice
Get Invoices
An invoice is a financial document issued to a client to request payment for services rendered or resources used.
Invoices typically include key details such as the client’s information, a list of bookings, services or items being billed, applicable rates, taxes, discounts, and the total amount due. They serve as an official record of the transaction and can be customized to include additional details like payment terms, due dates, or custom notes.
Invoices may also be generated from approved quotes, streamlining the billing process.
READ access to the SALES module is required to access this endpointGET
/
v2
/
invoice
Get Invoices
curl --request GET \
--url https://api.sonderplan.com/v2/invoice \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sonderplan.com/v2/invoice"
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', 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",
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"
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")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sonderplan.com/v2/invoice")
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": 1,
"prefix": "INV-",
"number": 892,
"date": 1547501100,
"date_time_iso": "2022-02-22T09:00:00+11:00",
"due_date": 1547501100,
"due_date_time_iso": "2022-02-22T09:00:00+11:00",
"items": [
{
"id": 982342,
"item_text": "Edit Suite 1 Grading",
"item_uuid": "r2394",
"ratescheme_id": 989234,
"description": "Session booked between 10th Jan -> 12th Jan 2023",
"quantity": "2.4",
"unit": "hourly",
"unit_amount": "20.65",
"unit_buy_amount": "10.15",
"tax": true,
"taxes": [
{
"id": 3247,
"name": "GST",
"rate": "10.00",
"total": "151.00"
}
],
"discount": "20.00%",
"total": "495.00",
"buy_total": "200.00",
"buy_total_fixed": false,
"order": 2,
"parent_group_id": 234842
}
],
"groups": [
{
"id": 23425,
"name": "Video Editing Services",
"description": "Includes all editing services",
"order": 2,
"hide_items": true
}
],
"status": [
{
"id": 2,
"name": "Submitted"
}
],
"project": [
{
"id": 2342354,
"name": "Andor S1 EP7 Annoucement",
"code": "AND-S1-EP7",
"description": "Colonel Yularen announces that the ISB has gained more surveillance and punitive authority, while Meero is challenged by Blevin for breaking protocol by accessing Imperial data without authorization.",
"start": 1547501100,
"end": 1547538900,
"parent_id": 9348,
"status_id": 1
}
],
"client": [
{
"id": 4,
"uuid": "p4",
"name": "Jane Someone",
"type": "person",
"email": "[email protected]",
"contact_person": {
"id": 2837,
"name": "Fred Flintstone"
}
}
],
"custom_fields": [
{
"id": 7823,
"name": "Type",
"value": "Video Editing",
"value_id": 8973,
"update_key": "2_1_7823"
}
],
"terms": "Payment to be made in 30 days",
"template_id": 213,
"cloned_id": 545647,
"reference": "QU-9893",
"currency": "AUD",
"sub_total": "1289.29",
"discount_total": "872.98",
"net_total": "416.31",
"tax_total": "129.87",
"total": "546.18",
"buy_total": "256.00",
"created_sp_flag": "true",
"created_id": 3,
"created": 1388552400,
"updated_id": 3,
"updated": 1388552400
}
],
"meta": {
"pagination": {
"total": 1,
"count": 1,
"per_page": 1,
"current_page": 1
}
}
}