List invoices
curl --request GET \
--url https://apiv2.example.com/invoices \
--header 'X-Api-Key: <api-key>'import requests
url = "https://apiv2.example.com/invoices"
headers = {"X-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://apiv2.example.com/invoices', 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://apiv2.example.com/invoices",
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-Api-Key: <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://apiv2.example.com/invoices"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<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://apiv2.example.com/invoices")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiv2.example.com/invoices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"items": [
{
"invoiceId": "094f10ca-616e-441c-b264-9a2305d6692d",
"customerId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"invoiceNumber": "INV-2024-001",
"status": "SENT",
"dueDate": "2024-02-15",
"createdAt": "2024-01-15T10:00:00Z",
"updatedAt": "2024-01-15T10:00:00Z",
"subtotalAmount": 29.99,
"totalAmount": 29.89,
"currency": "USD",
"sentAt": "2024-01-15T10:00:00Z",
"paidAt": "2024-02-10T14:30:00Z",
"voidedAt": "2024-02-05T09:00:00Z",
"invoiceUrl": "https://invoices.yourapp.com/094f10ca-616e-441c-b264-9a2305d6692d",
"metadata": {}
}
],
"pagination": {
"nextCursor": "<string>"
}
}{
"message": "<string>",
"code": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"property": "<string>",
"suggestion": "<string>"
}
],
"hint": "<string>"
}{
"message": "<string>",
"code": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"property": "<string>",
"suggestion": "<string>"
}
],
"hint": "<string>"
}{
"message": "<string>",
"code": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"property": "<string>",
"suggestion": "<string>"
}
],
"hint": "<string>"
}{
"message": "<string>",
"code": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"property": "<string>",
"suggestion": "<string>"
}
],
"hint": "<string>"
}Invoices
List invoices
Retrieve a paginated list of invoices with optional filtering by status, customer, or date range.
GET
/
invoices
List invoices
curl --request GET \
--url https://apiv2.example.com/invoices \
--header 'X-Api-Key: <api-key>'import requests
url = "https://apiv2.example.com/invoices"
headers = {"X-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://apiv2.example.com/invoices', 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://apiv2.example.com/invoices",
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-Api-Key: <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://apiv2.example.com/invoices"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<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://apiv2.example.com/invoices")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiv2.example.com/invoices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"items": [
{
"invoiceId": "094f10ca-616e-441c-b264-9a2305d6692d",
"customerId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"invoiceNumber": "INV-2024-001",
"status": "SENT",
"dueDate": "2024-02-15",
"createdAt": "2024-01-15T10:00:00Z",
"updatedAt": "2024-01-15T10:00:00Z",
"subtotalAmount": 29.99,
"totalAmount": 29.89,
"currency": "USD",
"sentAt": "2024-01-15T10:00:00Z",
"paidAt": "2024-02-10T14:30:00Z",
"voidedAt": "2024-02-05T09:00:00Z",
"invoiceUrl": "https://invoices.yourapp.com/094f10ca-616e-441c-b264-9a2305d6692d",
"metadata": {}
}
],
"pagination": {
"nextCursor": "<string>"
}
}{
"message": "<string>",
"code": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"property": "<string>",
"suggestion": "<string>"
}
],
"hint": "<string>"
}{
"message": "<string>",
"code": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"property": "<string>",
"suggestion": "<string>"
}
],
"hint": "<string>"
}{
"message": "<string>",
"code": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"property": "<string>",
"suggestion": "<string>"
}
],
"hint": "<string>"
}{
"message": "<string>",
"code": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"property": "<string>",
"suggestion": "<string>"
}
],
"hint": "<string>"
}Authorizations
apiKeybearerAuth & apiKey
An API key that grants access to the Connect API. You can create and manage API keys in the portal.
Query Parameters
The maximum number of items to return.
Required range:
1 <= x <= 1000Opaque pagination token from a previous response's nextCursor.
Filter invoices by customer IDs
Filter invoices by status
Current status of the invoice lifecycle.
Available options:
DRAFT, SENT, PAID, VOID, OVERDUE Filter invoices created from this date
Filter invoices created up to this date
Filter invoices with due date from this date
Filter invoices with due date up to this date