List Invoices
List Invoices
GET
https://api.ocamba.com/v2/ocamba/invoices
Returns a list of InvoicesQuery parameters
parametersResponse schemas
›
200
application/json
curl -X GET \
"https://api.ocamba.com/v2/ocamba/invoices" \
-H "Authorization: Bearer {TOKEN}"
const url = 'https://api.ocamba.com/v2/ocamba/invoices';
const options = {
method: 'GET',
headers: {
Authorization: `Bearer {TOKEN}`
}
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
$ch = curl_init("https://api.ocamba.com/v2/ocamba/invoices");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer {TOKEN}"
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
Responses
200 OK
{
"total": 209,
"items": [
{
"id": "2c9ab0a8-d0d2-49aa-b790-9697cc3aed14",
"company_id": "6197120",
"app_id": "1003",
"invoice_number": "OCM-213376",
"status": "paid",
"price": 9.99,
"tax": 2,
"amount": 11.99,
"currency_code": "USD",
"pdf": "https://dev-storage.ocamba.com/6197120/ocamba/invoices/OCM-213376.pdf",
"sent": 1,
"items": [
{
"name": "Ocamba Push Startup Plan (Monthly)",
"quantity": 1,
"unit_price": 9.99,
"price": 9.99,
"discount_rate": 0,
"discount": 0,
"tax_rate": 20,
"tax": 2,
"amount": 11.99
}
],
"due_date": "2021-11-24",
"payment_time": "2021-11-24 10:23:55",
"create_time": "2021-11-24 10:23:55",
"update_time": "2021-11-24 10:24:04"
},
{
"id": "6c5206d1-e4d7-4331-8db6-0fa7b4905592",
"company_id": "6197120",
"app_id": "1003",
"invoice_number": "OCM-213375",
"status": "paid",
"price": 99.99,
"tax": 20,
"amount": 119.99,
"currency_code": "USD",
"pdf": "https://dev-storage.ocamba.com/6197120/ocamba/invoices/OCM-213375.pdf",
"sent": 1,
"items": [
{
"name": "Ocamba Push Business Plan (Monthly)",
"quantity": 1,
"unit_price": 99.99,
"price": 99.99,
"discount_rate": 0,
"discount": 0,
"tax_rate": 20,
"tax": 20,
"amount": 119.99
}
],
"due_date": "2021-11-24",
"payment_time": "2021-11-24 08:30:18",
"create_time": "2021-11-24 08:30:18",
"update_time": "2021-11-24 08:31:04"
},
{
"id": "c8a1ccbf-7b59-4d8a-aa3d-a246f31432e5",
"company_id": "6197120",
"app_id": "1001",
"invoice_number": "OCM-213372",
"status": "paid",
"price": 249.99,
"tax": 50,
"amount": 299.99,
"currency_code": "USD",
"pdf": "https://dev-storage.ocamba.com/6254628/ocamba/invoices/OCM-213372.pdf",
"sent": 1,
"items": [
{
"name": "Ocamba Adex Network Plan (Monthly)",
"quantity": 1,
"unit_price": 249.99,
"price": 249.99,
"discount_rate": 0,
"discount": 0,
"tax_rate": 20,
"tax": 50,
"amount": 299.99
}
],
"start_date": "2021-11-23",
"end_date": "2021-11-23",
"due_date": "2021-11-23",
"payment_time": "2021-11-23 11:59:28",
"create_time": "2021-11-23 11:59:28",
"update_time": "2021-11-23 13:05:13"
}
]
}
Responses
Tip
Searchable field is invoice_number.
Sortable fields are: invoice_number, status, price, discount, amount, tax, currency_code, xero_status, start_date, end_date, payment_time, due_date, create_time and update_time.