curl -X GET "https://api.contazen.ro/v1/expenses?page=1&per_page=20&status=unpaid&expand=supplier,category" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"
const response = await fetch('https://api.contazen.ro/v1/expenses?page=1&per_page=20&status=unpaid&expand=supplier,category', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
});
const data = await response.json();
console.log(data.expenses);
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.contazen.ro/v1/expenses?page=1&per_page=20&status=unpaid&expand=supplier,category',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_API_KEY',
'Content-Type: application/json'
]
]);
$response = curl_exec($curl);
$data = json_decode($response, true);
curl_close($curl);
print_r($data['expenses']);
{
"success": true,
"expenses": [
{
"id": "exp_abc123",
"reference": "INV-2024-001",
"description": "Office supplies",
"amount": {
"total": "238.00",
"without_vat": "200.00",
"vat": "38.00",
"currency": "RON"
},
"account_amount": {
"total": "238.00",
"without_vat": "200.00",
"vat": "38.00",
"currency": "RON"
},
"vat_percent": 19,
"with_vat": true,
"date": "2024-01-15",
"due_date": "2024-02-15",
"paid_date": null,
"is_paid": false,
"payment_type": null,
"status": "unpaid",
"supplier": {
"id": "sup_xyz789",
"name": "Office Depot SRL",
"cui": "RO12345678",
"address": "Str. Exemplu 123",
"city": "Bucharest"
},
"category": {
"id": 1,
"name": "Office Expenses",
"parent_id": null
},
"user_id": 1,
"created_at": "2024-01-15 10:30:00",
"updated_at": "2024-01-15 10:30:00"
}
],
"pagination": {
"page": 1,
"per_page": 20,
"total": 150,
"total_pages": 8
},
"totals": {
"amount": "15750.00",
"amount_without_vat": "13235.29",
"vat": "2514.71",
"account_amount": "15750.00",
"account_amount_without_vat": "13235.29",
"account_vat": "2514.71"
}
}
Expenses
List Expenses
Retrieve a paginated list of expenses with comprehensive filtering options
GET
/
expenses
curl -X GET "https://api.contazen.ro/v1/expenses?page=1&per_page=20&status=unpaid&expand=supplier,category" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"
const response = await fetch('https://api.contazen.ro/v1/expenses?page=1&per_page=20&status=unpaid&expand=supplier,category', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
});
const data = await response.json();
console.log(data.expenses);
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.contazen.ro/v1/expenses?page=1&per_page=20&status=unpaid&expand=supplier,category',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_API_KEY',
'Content-Type: application/json'
]
]);
$response = curl_exec($curl);
$data = json_decode($response, true);
curl_close($curl);
print_r($data['expenses']);
{
"success": true,
"expenses": [
{
"id": "exp_abc123",
"reference": "INV-2024-001",
"description": "Office supplies",
"amount": {
"total": "238.00",
"without_vat": "200.00",
"vat": "38.00",
"currency": "RON"
},
"account_amount": {
"total": "238.00",
"without_vat": "200.00",
"vat": "38.00",
"currency": "RON"
},
"vat_percent": 19,
"with_vat": true,
"date": "2024-01-15",
"due_date": "2024-02-15",
"paid_date": null,
"is_paid": false,
"payment_type": null,
"status": "unpaid",
"supplier": {
"id": "sup_xyz789",
"name": "Office Depot SRL",
"cui": "RO12345678",
"address": "Str. Exemplu 123",
"city": "Bucharest"
},
"category": {
"id": 1,
"name": "Office Expenses",
"parent_id": null
},
"user_id": 1,
"created_at": "2024-01-15 10:30:00",
"updated_at": "2024-01-15 10:30:00"
}
],
"pagination": {
"page": 1,
"per_page": 20,
"total": 150,
"total_pages": 8
},
"totals": {
"amount": "15750.00",
"amount_without_vat": "13235.29",
"vat": "2514.71",
"account_amount": "15750.00",
"account_amount_without_vat": "13235.29",
"account_vat": "2514.71"
}
}
Overview
The List Expenses endpoint allows you to retrieve all expenses for your firm with advanced filtering, sorting, and pagination capabilities. You can filter by supplier, category, payment status, date ranges, and more.Query Parameters
integer
default:"1"
Page number for pagination (minimum: 1)
integer
default:"50"
Number of items per page (minimum: 1, maximum: 100)
string
Filter by supplier using their CzUid
integer
Filter by expense category ID. If the category has subcategories, all subcategories will be included
string
Filter by payment status
paid- Expense has been paidunpaid- Expense is not paid and not overdueoverdue- Expense is past its due dateregistered- Expense is registered but not categorized as paid/unpaid
string
Filter by currency code (e.g., RON, EUR, USD)
integer
Filter by payment type ID (1-7):
1- Cash2- Bank transfer3- Card4- Check5- Promissory note6- Other7- Compensation
string
Start date for filtering expenses (YYYY-MM-DD format)
string
End date for filtering expenses (YYYY-MM-DD format)
number
Minimum expense total (inclusive). Matched against the original-currency total.
number
Maximum expense total (inclusive). Matched against the original-currency total.
string
default:"created_at"
Sort field:
created_at- Sort by creation datedate- Sort by expense datedue_date- Sort by due dateamount- Sort by amount
string
default:"desc"
Sort order:
asc- Ascendingdesc- Descending
string
Comma-separated list of related data to include:
supplier- Include full supplier detailscategory- Include full category detailsuser- Include user information
Response
array
Array of expense objects
Show Expense Object Properties
Show Expense Object Properties
string
Unique CzUid identifier for the expense
string
Reference number or invoice number
string
Expense description
object
object
integer
VAT percentage
boolean
Whether amount includes VAT
string
Expense date (YYYY-MM-DD)
string
Payment due date (YYYY-MM-DD)
string
Payment date (if paid)
boolean
Whether expense is paid
object
Payment type information
string
Expense status (paid, unpaid, overdue, registered)
string
Supplier CzUid (when not expanded)
integer
Category ID (when not expanded)
integer
User ID (when not expanded)
string
Creation timestamp
string
Last update timestamp
object
object
curl -X GET "https://api.contazen.ro/v1/expenses?page=1&per_page=20&status=unpaid&expand=supplier,category" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"
const response = await fetch('https://api.contazen.ro/v1/expenses?page=1&per_page=20&status=unpaid&expand=supplier,category', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
});
const data = await response.json();
console.log(data.expenses);
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.contazen.ro/v1/expenses?page=1&per_page=20&status=unpaid&expand=supplier,category',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_API_KEY',
'Content-Type: application/json'
]
]);
$response = curl_exec($curl);
$data = json_decode($response, true);
curl_close($curl);
print_r($data['expenses']);
{
"success": true,
"expenses": [
{
"id": "exp_abc123",
"reference": "INV-2024-001",
"description": "Office supplies",
"amount": {
"total": "238.00",
"without_vat": "200.00",
"vat": "38.00",
"currency": "RON"
},
"account_amount": {
"total": "238.00",
"without_vat": "200.00",
"vat": "38.00",
"currency": "RON"
},
"vat_percent": 19,
"with_vat": true,
"date": "2024-01-15",
"due_date": "2024-02-15",
"paid_date": null,
"is_paid": false,
"payment_type": null,
"status": "unpaid",
"supplier": {
"id": "sup_xyz789",
"name": "Office Depot SRL",
"cui": "RO12345678",
"address": "Str. Exemplu 123",
"city": "Bucharest"
},
"category": {
"id": 1,
"name": "Office Expenses",
"parent_id": null
},
"user_id": 1,
"created_at": "2024-01-15 10:30:00",
"updated_at": "2024-01-15 10:30:00"
}
],
"pagination": {
"page": 1,
"per_page": 20,
"total": 150,
"total_pages": 8
},
"totals": {
"amount": "15750.00",
"amount_without_vat": "13235.29",
"vat": "2514.71",
"account_amount": "15750.00",
"account_amount_without_vat": "13235.29",
"account_vat": "2514.71"
}
}
Authorizations
Use your API key (sk_live_xxx or sk_test_xxx)
Query Parameters
Page number
Required range:
x >= 1Items per page
Required range:
1 <= x <= 100Filter by supplier CzUid
Filter by category ID
Filter by payment status
Available options:
paid, unpaid, overdue, registered Filter by currency code
Filter by payment type: 1 = Cash 2 = Bank transfer 3 = Card 4 = Check 5 = Promissory note 6 = Other 7 = Compensation
Required range:
1 <= x <= 7Start date (YYYY-MM-DD)
End date (YYYY-MM-DD)
Minimum amount filter
Maximum amount filter
Search in reference and description
Sort field
Available options:
created_at, date, due_date, amount Sort order
Available options:
asc, desc Comma-separated list of relations to expand. Supported: supplier, category, user.
Was this page helpful?