curl --request GET \
--url https://api.sandbox.tesouro.com/finops/v1/accounting/payables/{payable_id} \
--header 'Authorization: Bearer <token>' \
--header 'x-finops-version: <x-finops-version>' \
--header 'x-organization-id: <x-organization-id>'import requests
url = "https://api.sandbox.tesouro.com/finops/v1/accounting/payables/{payable_id}"
headers = {
"x-finops-version": "<x-finops-version>",
"x-organization-id": "<x-organization-id>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'x-finops-version': '<x-finops-version>',
'x-organization-id': '<x-organization-id>',
Authorization: 'Bearer <token>'
}
};
fetch('https://api.sandbox.tesouro.com/finops/v1/accounting/payables/{payable_id}', 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.sandbox.tesouro.com/finops/v1/accounting/payables/{payable_id}",
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: Bearer <token>",
"x-finops-version: <x-finops-version>",
"x-organization-id: <x-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.sandbox.tesouro.com/finops/v1/accounting/payables/{payable_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-finops-version", "<x-finops-version>")
req.Header.Add("x-organization-id", "<x-organization-id>")
req.Header.Add("Authorization", "Bearer <token>")
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.sandbox.tesouro.com/finops/v1/accounting/payables/{payable_id}")
.header("x-finops-version", "<x-finops-version>")
.header("x-organization-id", "<x-organization-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.tesouro.com/finops/v1/accounting/payables/{payable_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-finops-version"] = '<x-finops-version>'
request["x-organization-id"] = '<x-organization-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"status": "paid",
"total_amount": 123,
"amount_due": 123,
"currency": "USD",
"currency_rate": 123,
"due_date": "2023-11-07T05:31:56Z",
"invoice_number": "<string>",
"lines": [
{
"description": "Logo design",
"discount_amount": 123,
"discount_percentage": 123,
"ledger_account_id": "<string>",
"quantity": 123,
"tax_rate_ref": {
"id": "<string>"
},
"unit_amount": 123
}
],
"memo": "<string>",
"posted_date": "2023-12-25",
"purchase_order_refs": [
{
"id": "10",
"name": "PO-1234"
}
],
"subtotal": 123,
"tax_amount": 123,
"vendor_ref": {
"id": "120",
"name": "Acme Inc."
}
}{
"error": {
"message": "<string>"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"error": {
"message": "<string>"
}
}Get accounting payable
Returns information about an individual payable invoice (bill) that exists in the entity’s accounting system. This payable may or may not also exist in Monite.
curl --request GET \
--url https://api.sandbox.tesouro.com/finops/v1/accounting/payables/{payable_id} \
--header 'Authorization: Bearer <token>' \
--header 'x-finops-version: <x-finops-version>' \
--header 'x-organization-id: <x-organization-id>'import requests
url = "https://api.sandbox.tesouro.com/finops/v1/accounting/payables/{payable_id}"
headers = {
"x-finops-version": "<x-finops-version>",
"x-organization-id": "<x-organization-id>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'x-finops-version': '<x-finops-version>',
'x-organization-id': '<x-organization-id>',
Authorization: 'Bearer <token>'
}
};
fetch('https://api.sandbox.tesouro.com/finops/v1/accounting/payables/{payable_id}', 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.sandbox.tesouro.com/finops/v1/accounting/payables/{payable_id}",
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: Bearer <token>",
"x-finops-version: <x-finops-version>",
"x-organization-id: <x-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.sandbox.tesouro.com/finops/v1/accounting/payables/{payable_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-finops-version", "<x-finops-version>")
req.Header.Add("x-organization-id", "<x-organization-id>")
req.Header.Add("Authorization", "Bearer <token>")
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.sandbox.tesouro.com/finops/v1/accounting/payables/{payable_id}")
.header("x-finops-version", "<x-finops-version>")
.header("x-organization-id", "<x-organization-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.tesouro.com/finops/v1/accounting/payables/{payable_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-finops-version"] = '<x-finops-version>'
request["x-organization-id"] = '<x-organization-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"status": "paid",
"total_amount": 123,
"amount_due": 123,
"currency": "USD",
"currency_rate": 123,
"due_date": "2023-11-07T05:31:56Z",
"invoice_number": "<string>",
"lines": [
{
"description": "Logo design",
"discount_amount": 123,
"discount_percentage": 123,
"ledger_account_id": "<string>",
"quantity": 123,
"tax_rate_ref": {
"id": "<string>"
},
"unit_amount": 123
}
],
"memo": "<string>",
"posted_date": "2023-12-25",
"purchase_order_refs": [
{
"id": "10",
"name": "PO-1234"
}
],
"subtotal": 123,
"tax_amount": 123,
"vendor_ref": {
"id": "120",
"name": "Acme Inc."
}
}{
"error": {
"message": "<string>"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"error": {
"message": "<string>"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
The ID of the entity that owns the requested resource.
"9d2b4c8f-2087-4738-ba91-7359683c49a4"
Path Parameters
An internal ID of the payable invoice (bill) in the accounting system. You can get these IDs from GET /accounting/payables.
Response
Successful Response
Details of an accounts payable invoice (bill) retrieved from an accounting system.
An internal identifier of the payable in the accounting system.
The status of the payable in the accounting system. Possible values: open, draft, partially_paid, paid, unknown, void.
"paid"
The total amount payable, including discounts and VAT/taxes.
Remaining amount to be paid.
ISO-4217 currency code of the payable.
"USD"
Rate to convert the total amount of the transaction into the entity's base currency at the time of the transaction.
The payable's due date.
Invoice number of the payable.
Show child attributes
Show child attributes
Any additional information or business notes about the payable.
Date when the payable was added to the accounting service. This may differ from the payable creation date.
A list of purchase orders linked to the payable, if any.
Show child attributes
Show child attributes
Amount payable, including discounts but excluding VAT/taxes.
Total VAT or tax amount.
Information about the vendor from whom the payable was received.
Show child attributes
Show child attributes
Was this page helpful?