Invoice List API
curl --request GET \
--url https://api.pazy.io/v1.0/invoicesimport requests
url = "https://api.pazy.io/v1.0/invoices"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.pazy.io/v1.0/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://api.pazy.io/v1.0/invoices",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.pazy.io/v1.0/invoices"
req, _ := http.NewRequest("GET", url, nil)
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.pazy.io/v1.0/invoices")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pazy.io/v1.0/invoices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyInvoice APIs
Invoice List API
Retrieve a paginated list of invoices with filters by date, state, vendor, amount, and tags
Invoice List API
curl --request GET \
--url https://api.pazy.io/v1.0/invoicesimport requests
url = "https://api.pazy.io/v1.0/invoices"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.pazy.io/v1.0/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://api.pazy.io/v1.0/invoices",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.pazy.io/v1.0/invoices"
req, _ := http.NewRequest("GET", url, nil)
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.pazy.io/v1.0/invoices")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pazy.io/v1.0/invoices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyAuthentication
All requests require an API key in the request headers. Headers:Authorization: Api-Key YOUR_API_KEY
Request
Content-Type:application/json
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
sortBy | string | No | Field to sort results by. Allowed values: total_amount, invoice_no, sequence_no, due_date, issued_date, date_created. |
sortOrder | string | No | Sort direction. Allowed values: asc (ascending), desc (descending). |
sortNullOrder | string | No | Where to place results with null values in the sorted field. Allowed values: first, last. |
limit | integer | No | Number of records to return. Min 1, Max 100, Default 30. |
cursor | string | No | Cursor for pagination. Default 0. |
dateType | string | No | Type of date to filter by. Default issued_date. Possible values: issued_date, due_date, payment_date, date_created, approved_date. |
startDate | string | No | Start date for filtering (ISO 8601 UTC format: YYYY-MM-DDTHH:mm:ssZ). |
endDate | string | No | End date for filtering (ISO 8601 UTC format: YYYY-MM-DDTHH:mm:ssZ). |
state | array | No | Array of invoice states to filter by. Allowed values: DRAFTED, APPROVAL_PENDING, APPROVED, PAID, ARCHIVED. Currently supports exactly one state. |
invoiceNumber | string | No | Invoice number to filter by. |
invoiceDate | string | No | Invoice date to filter by (YYYY-MM-DD format). |
vendorName | string | No | Vendor name to filter by (partial match). |
vendorId | string | No | Vendor ID to filter by. |
userId | string | No | ID of the user associated with the invoice vendor. |
tagId | integer | No | Filter invoices containing this organization tag id. |
amount | number | No | Filter invoices with amount greater than or equal to this value. |
Code Examples
curl -X GET "https://api.pazy.io/v1.0/invoices?limit=30&state=APPROVED" \
-H "Authorization: Api-Key YOUR_API_KEY"
const params = new URLSearchParams({ limit: '30', state: 'APPROVED' });
const response = await fetch(`https://api.pazy.io/v1.0/invoices?${params}`, {
method: 'GET',
headers: {
'Authorization': 'Api-Key YOUR_API_KEY'
}
});
const result = await response.json();
import requests
url = "https://api.pazy.io/v1.0/invoices"
headers = {
"Authorization": "Api-Key YOUR_API_KEY"
}
params = { "limit": 30, "state": "APPROVED" }
response = requests.get(url, headers=headers, params=params)
result = response.json()
Success Response
HTTP Status:200 OK
Response Fields:
| Field | Type | Description |
|---|---|---|
ok | boolean | Indicates whether the request was successful |
data | object | Contains the invoice list response data |
data.invoices | array | List of invoices |
data.invoices[].id | string | Unique identifier for the invoice |
data.invoices[].vendorId | string | Unique identifier for the vendor on the invoice |
data.invoices[].vendorName | string | Vendor display name (falls back to legal name) |
data.invoices[].invoiceNumber | string | Invoice number as specified on the invoice document |
data.invoices[].sequenceNumber | string | System-generated sequence number with organization prefix |
data.invoices[].description | string | Description or notes about the invoice |
data.invoices[].invoiceDate | string | Date when the invoice was issued (ISO 8601 format) |
data.invoices[].dueDate | string | Due date for invoice payment (ISO 8601 format) |
data.invoices[].dateCreated | string | Date when the invoice was created in the system (ISO 8601 format) |
data.invoices[].amount | number | Total invoice amount |
data.invoices[].currency | string | Currency code (e.g., INR, USD) |
data.invoices[].remarks | string | Additional remarks or notes associated with the invoice |
data.invoices[].state | string | Current state of the invoice. Possible values: DRAFTED, APPROVAL_PENDING, APPROVED, PAID, DECLINED, ARCHIVED. |
data.invoices[].syncState | string | Synchronization state with accounting system. Possible values: SYNCED, NOT_SYNCED, SYNCED_WITH_ERRORS, etc. |
data.invoices[].source | string | Source of invoice creation. Possible values: API, WEB, EMAIL, SLACK, WHATSAPP, APP, etc. |
data.invoices[].selfUrl | string | Shareable URL for viewing the invoice in the web interface |
data.context | object | Pagination metadata |
data.context.count | number | Number of invoices returned in this page |
data.context.hasMore | boolean | Indicates whether there are more invoices to fetch |
data.context.nextCursor | string | Cursor to fetch the next page |
Response Example
{
"ok": true,
"data": {
"invoices": [
{
"id": "invoice_identifier",
"vendorId": "vendor_identifier",
"vendorName": "ABC Suppliers",
"invoiceNumber": "INV-2026-001",
"sequenceNumber": "PZY/2026-27/INV/0001",
"description": "Monthly services invoice",
"invoiceDate": "2026-01-15",
"dueDate": "2026-02-15",
"dateCreated": "2026-01-15T10:30:00Z",
"amount": 50000.00,
"currency": "INR",
"remarks": "Payment due in 30 days",
"state": "APPROVED",
"syncState": "SYNCED",
"source": "API",
"selfUrl": "https://app.pazy.io/invoice/invoice_identifier"
}
],
"context": {
"count": 100,
"hasMore": true,
"nextCursor": "30"
}
}
}
Error Responses
Validation Error
HTTP Status:400 Bad Request
{
"ok": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Validation failed: /query/state: must be equal to one of the allowed values"
}
}
Access Denied
HTTP Status:403 Forbidden
{
"ok": false,
"error": {
"code": "ACCESS_DENIED",
"message": "Access denied: You can only view vendors you own"
}
}
Authentication Errors
HTTP Status:401 Unauthorized
{
"ok": false,
"error": {
"code": "MISSING_CREDENTIALS",
"message": "Missing Credentials"
}
}
{
"ok": false,
"error": {
"code": "INVALID_API_KEY",
"message": "Invalid API Key"
}
}
Permission Errors
HTTP Status:403 Forbidden
{
"ok": false,
"error": {
"code": "INSUFFICIENT_PERMISSIONS",
"message": "Permission check failed - PERMISSION_CHECK_FAILED"
}
}
Internal Error
HTTP Status:500 Internal Server Error
{
"ok": false,
"error": {
"code": "INTERNAL_ERROR",
"message": "Internal error"
}
}
Best Practices
- Use
cursorandlimittogether to paginate;nextCursorin the response can be used as thecursorvalue for the next call startDateandendDateare interpreted against the column specified bydateType— changedateTypeto filter by due, payment, created, or approval date instead of the issued date- Use the
idfrom the response as the input to the Invoice Details API for full invoice information - The API returns at most 100 invoices per call regardless of the
limitvalue
Was this page helpful?