Retrieves the bills.
curl --request GET \
--url https://api.example.com/api/bills \
--header 'Authorization: <authorization>' \
--header 'organization-id: <organization-id>'import requests
url = "https://api.example.com/api/bills"
headers = {
"Authorization": "<authorization>",
"organization-id": "<organization-id>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {Authorization: '<authorization>', 'organization-id': '<organization-id>'}
};
fetch('https://api.example.com/api/bills', 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.example.com/api/bills",
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: <authorization>",
"organization-id: <organization-id>"
],
]);
$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.example.com/api/bills"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("organization-id", "<organization-id>")
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.example.com/api/bills")
.header("Authorization", "<authorization>")
.header("organization-id", "<organization-id>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/bills")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
request["organization-id"] = '<organization-id>'
response = http.request(request)
puts response.read_body{
"pagination": {
"total": 100,
"page": 1,
"pageSize": 10
},
"data": [
{
"id": 1,
"billNumber": "BILL-2024-001",
"billDate": "2024-03-15T00:00:00Z",
"dueDate": "2024-04-15T00:00:00Z",
"vendorId": 1001,
"entries": [
{
"index": 1,
"itemId": 1,
"rate": 1,
"quantity": 1,
"discount": 1,
"discountType": "percentage",
"description": "This is a description",
"taxCode": "123456",
"taxRateId": 1,
"warehouseId": 1,
"projectId": 1,
"projectRefId": 1,
"projectRefType": "TASK",
"projectRefInvoicedAmount": 100,
"sellAccountId": 1020,
"costAccountId": 1021
}
],
"balance": 1000,
"paymentAmount": 500,
"subtotal": 900,
"total": 1000,
"dueAmount": 500,
"isOverdue": false,
"isPartiallyPaid": true,
"isFullyPaid": false,
"createdAt": "2024-03-15T00:00:00Z",
"referenceNo": "PO-2024-001",
"exchangeRate": 1.25,
"currencyCode": "USD",
"note": "Office supplies and equipment for Q2 2024",
"isInclusiveTax": false,
"warehouseId": 101,
"branchId": 201,
"branch": {
"id": 1,
"name": "Main Branch",
"code": "BR001",
"address": "123 Main Street",
"city": "New York",
"country": "USA",
"phoneNumber": "+1-555-123-4567",
"email": "[email protected]",
"website": "https://www.example.com/branch",
"primary": true,
"createdAt": "2024-03-20T10:00:00Z",
"updatedAt": "2024-03-20T10:00:00Z"
},
"projectId": 301,
"attachments": [
{}
],
"discount": 100,
"discountType": "amount",
"adjustment": 50,
"taxAmountWithheld": 50,
"creditedAmount": 0,
"updatedAt": "2024-03-16T00:00:00Z"
}
]
}Bills
Retrieves the bills.
GET
/
api
/
bills
Retrieves the bills.
curl --request GET \
--url https://api.example.com/api/bills \
--header 'Authorization: <authorization>' \
--header 'organization-id: <organization-id>'import requests
url = "https://api.example.com/api/bills"
headers = {
"Authorization": "<authorization>",
"organization-id": "<organization-id>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {Authorization: '<authorization>', 'organization-id': '<organization-id>'}
};
fetch('https://api.example.com/api/bills', 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.example.com/api/bills",
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: <authorization>",
"organization-id: <organization-id>"
],
]);
$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.example.com/api/bills"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("organization-id", "<organization-id>")
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.example.com/api/bills")
.header("Authorization", "<authorization>")
.header("organization-id", "<organization-id>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/bills")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
request["organization-id"] = '<organization-id>'
response = http.request(request)
puts response.read_body{
"pagination": {
"total": 100,
"page": 1,
"pageSize": 10
},
"data": [
{
"id": 1,
"billNumber": "BILL-2024-001",
"billDate": "2024-03-15T00:00:00Z",
"dueDate": "2024-04-15T00:00:00Z",
"vendorId": 1001,
"entries": [
{
"index": 1,
"itemId": 1,
"rate": 1,
"quantity": 1,
"discount": 1,
"discountType": "percentage",
"description": "This is a description",
"taxCode": "123456",
"taxRateId": 1,
"warehouseId": 1,
"projectId": 1,
"projectRefId": 1,
"projectRefType": "TASK",
"projectRefInvoicedAmount": 100,
"sellAccountId": 1020,
"costAccountId": 1021
}
],
"balance": 1000,
"paymentAmount": 500,
"subtotal": 900,
"total": 1000,
"dueAmount": 500,
"isOverdue": false,
"isPartiallyPaid": true,
"isFullyPaid": false,
"createdAt": "2024-03-15T00:00:00Z",
"referenceNo": "PO-2024-001",
"exchangeRate": 1.25,
"currencyCode": "USD",
"note": "Office supplies and equipment for Q2 2024",
"isInclusiveTax": false,
"warehouseId": 101,
"branchId": 201,
"branch": {
"id": 1,
"name": "Main Branch",
"code": "BR001",
"address": "123 Main Street",
"city": "New York",
"country": "USA",
"phoneNumber": "+1-555-123-4567",
"email": "[email protected]",
"website": "https://www.example.com/branch",
"primary": true,
"createdAt": "2024-03-20T10:00:00Z",
"updatedAt": "2024-03-20T10:00:00Z"
},
"projectId": 301,
"attachments": [
{}
],
"discount": 100,
"discountType": "amount",
"adjustment": 50,
"taxAmountWithheld": 50,
"creditedAmount": 0,
"updatedAt": "2024-03-16T00:00:00Z"
}
]
}Headers
Value must be 'Bearer ' where is an API key prefixed with 'bc_' or a JWT token.
Example:
"Bearer bc_1234567890abcdef"
Required if Authorization is a JWT token. The organization ID to operate within.
Path Parameters
The bill id
⌘I