List bills
curl --request GET \
--url https://api.sync2books.com/bills \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.sync2books.com/bills"
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://api.sync2books.com/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.sync2books.com/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 => [
"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://api.sync2books.com/bills"
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://api.sync2books.com/bills")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sync2books.com/bills")
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{
"data": [
{
"supplierRef": {
"id": "<string>",
"name": "<string>"
},
"issueDate": "2023-12-25",
"currency": "<string>",
"subTotal": 123,
"taxAmount": 123,
"totalAmount": 123,
"lineItems": [
{
"unitAmount": 123,
"quantity": 2,
"isDirectCost": true,
"lineNumber": 123,
"description": "<string>",
"unitOfMeasurement": "<string>",
"discountAmount": 123,
"discountPercentage": 50,
"subTotal": 123,
"taxAmount": 123,
"totalAmount": 123,
"accountRef": {
"id": "<string>",
"name": "<string>"
},
"taxRateRef": {
"id": "<string>",
"name": "<string>"
},
"itemRef": {
"id": "<string>",
"name": "<string>"
},
"trackingCategoryRefs": [
{
"id": "<string>",
"name": "<string>"
}
]
}
],
"status": "Unknown",
"billCode": "<string>",
"reference": "<string>",
"purchaseOrderRefs": [
{
"id": "<string>",
"purchaseOrderNumber": "<string>"
}
],
"dueDate": "2023-12-25",
"currencyRate": 1.0001,
"amountDue": 123,
"note": "<string>",
"withholdingTax": [
{
"name": "<string>",
"amount": 123
}
],
"id": "<string>",
"connectionId": "<string>",
"syncStatus": "pending",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"total": 123,
"page": 123,
"limit": 123,
"totalPages": 123,
"hasNextPage": true,
"hasPreviousPage": true
}Bills
List bills
GET
/
bills
List bills
curl --request GET \
--url https://api.sync2books.com/bills \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.sync2books.com/bills"
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://api.sync2books.com/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.sync2books.com/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 => [
"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://api.sync2books.com/bills"
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://api.sync2books.com/bills")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sync2books.com/bills")
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{
"data": [
{
"supplierRef": {
"id": "<string>",
"name": "<string>"
},
"issueDate": "2023-12-25",
"currency": "<string>",
"subTotal": 123,
"taxAmount": 123,
"totalAmount": 123,
"lineItems": [
{
"unitAmount": 123,
"quantity": 2,
"isDirectCost": true,
"lineNumber": 123,
"description": "<string>",
"unitOfMeasurement": "<string>",
"discountAmount": 123,
"discountPercentage": 50,
"subTotal": 123,
"taxAmount": 123,
"totalAmount": 123,
"accountRef": {
"id": "<string>",
"name": "<string>"
},
"taxRateRef": {
"id": "<string>",
"name": "<string>"
},
"itemRef": {
"id": "<string>",
"name": "<string>"
},
"trackingCategoryRefs": [
{
"id": "<string>",
"name": "<string>"
}
]
}
],
"status": "Unknown",
"billCode": "<string>",
"reference": "<string>",
"purchaseOrderRefs": [
{
"id": "<string>",
"purchaseOrderNumber": "<string>"
}
],
"dueDate": "2023-12-25",
"currencyRate": 1.0001,
"amountDue": 123,
"note": "<string>",
"withholdingTax": [
{
"name": "<string>",
"amount": 123
}
],
"id": "<string>",
"connectionId": "<string>",
"syncStatus": "pending",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"total": 123,
"page": 123,
"limit": 123,
"totalPages": 123,
"hasNextPage": true,
"hasPreviousPage": true
}Authorizations
Your application's API key (sk_development_… or sk_production_…). An optional X-Signature / X-Timestamp HMAC pair may additionally be sent for stronger security — see Authentication.
Query Parameters
Required range:
x >= 1Required range:
1 <= x <= 100Available options:
Unknown, Open, PartiallyPaid, Paid, Void, Draft Issue date range start.
Available options:
pending, syncing, synced, failed Available options:
issueDate, dueDate, totalAmount, createdAt, updatedAt Available options:
asc, desc