curl --request PATCH \
--url https://api.sandbox.tesouro.com/finops/v1/receivables/{receivable_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-finops-version: <x-finops-version>' \
--header 'x-organization-id: <x-organization-id>' \
--data '
{
"quote": {
"attachments": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"include_in_email": false
}
],
"bank_account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"counterpart_billing_address_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"counterpart_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"counterpart_shipping_address_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"counterpart_vat_id_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"deductions": [
{
"amount": 4503599627370495,
"name": "<string>",
"memo": "<string>"
}
],
"document_id": "<string>",
"document_rendering": {
"credit_note": {
"display_organization_bank_account": true
},
"display_line_items": true,
"display_organization_bank_account": true,
"invoice": {
"display_organization_bank_account": true
},
"line_items": {
"discount": {
"display": true,
"label": "<string>"
},
"measure_unit": {
"display": true,
"label": "<string>"
},
"name": {
"display": true,
"label": "<string>"
},
"price": {
"display": true,
"label": "<string>",
"precision": 3
},
"price_after_tax": {
"display": true,
"label": "<string>",
"precision": 3
},
"quantity": {
"display": true,
"label": "<string>"
},
"tax_rate": {
"display": true,
"label": "<string>",
"precision": 3
},
"total_price": {
"display": true,
"label": "<string>",
"precision": 3
},
"total_price_after_tax": {
"display": true,
"label": "<string>",
"precision": 3
},
"vat_amount": {
"display": false
}
},
"quote": {
"display_organization_bank_account": true,
"display_signature": false
}
},
"due_date": "2023-12-25",
"entity": {
"email": "jsmith@example.com",
"logo": "<string>",
"phone": "<string>",
"registration_authority": "<string>",
"registration_number": "<string>",
"website": "<string>"
},
"entity_vat_id_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"expiry_date": "2023-12-25",
"footer": "<string>",
"line_items": [
{
"custom_tax_rate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"price": 4503599627370495,
"quantity": 1073741823.5,
"tax_rate_name": "<string>",
"tax_rate_value": 5000
}
],
"memo": "<string>",
"partner_metadata": {},
"payment_terms_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quote_accept_page_url": "<string>",
"signature_required": true,
"tag_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"tax_exempt": true,
"tax_exemption_rationale": "<string>",
"trade_name": "<string>",
"withholding_tax_rate": 5000
}
}
'import requests
url = "https://api.sandbox.tesouro.com/finops/v1/receivables/{receivable_id}"
payload = { "quote": {
"attachments": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"include_in_email": False
}
],
"bank_account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"counterpart_billing_address_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"counterpart_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"counterpart_shipping_address_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"counterpart_vat_id_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"deductions": [
{
"amount": 4503599627370495,
"name": "<string>",
"memo": "<string>"
}
],
"document_id": "<string>",
"document_rendering": {
"credit_note": { "display_organization_bank_account": True },
"display_line_items": True,
"display_organization_bank_account": True,
"invoice": { "display_organization_bank_account": True },
"line_items": {
"discount": {
"display": True,
"label": "<string>"
},
"measure_unit": {
"display": True,
"label": "<string>"
},
"name": {
"display": True,
"label": "<string>"
},
"price": {
"display": True,
"label": "<string>",
"precision": 3
},
"price_after_tax": {
"display": True,
"label": "<string>",
"precision": 3
},
"quantity": {
"display": True,
"label": "<string>"
},
"tax_rate": {
"display": True,
"label": "<string>",
"precision": 3
},
"total_price": {
"display": True,
"label": "<string>",
"precision": 3
},
"total_price_after_tax": {
"display": True,
"label": "<string>",
"precision": 3
},
"vat_amount": { "display": False }
},
"quote": {
"display_organization_bank_account": True,
"display_signature": False
}
},
"due_date": "2023-12-25",
"entity": {
"email": "jsmith@example.com",
"logo": "<string>",
"phone": "<string>",
"registration_authority": "<string>",
"registration_number": "<string>",
"website": "<string>"
},
"entity_vat_id_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"expiry_date": "2023-12-25",
"footer": "<string>",
"line_items": [
{
"custom_tax_rate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"price": 4503599627370495,
"quantity": 1073741823.5,
"tax_rate_name": "<string>",
"tax_rate_value": 5000
}
],
"memo": "<string>",
"partner_metadata": {},
"payment_terms_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quote_accept_page_url": "<string>",
"signature_required": True,
"tag_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"tax_exempt": True,
"tax_exemption_rationale": "<string>",
"trade_name": "<string>",
"withholding_tax_rate": 5000
} }
headers = {
"x-finops-version": "<x-finops-version>",
"x-organization-id": "<x-organization-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'x-finops-version': '<x-finops-version>',
'x-organization-id': '<x-organization-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
quote: {
attachments: [{id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', include_in_email: false}],
bank_account_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
contact_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
counterpart_billing_address_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
counterpart_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
counterpart_shipping_address_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
counterpart_vat_id_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
deductions: [{amount: 4503599627370495, name: '<string>', memo: '<string>'}],
document_id: '<string>',
document_rendering: {
credit_note: {display_organization_bank_account: true},
display_line_items: true,
display_organization_bank_account: true,
invoice: {display_organization_bank_account: true},
line_items: {
discount: {display: true, label: '<string>'},
measure_unit: {display: true, label: '<string>'},
name: {display: true, label: '<string>'},
price: {display: true, label: '<string>', precision: 3},
price_after_tax: {display: true, label: '<string>', precision: 3},
quantity: {display: true, label: '<string>'},
tax_rate: {display: true, label: '<string>', precision: 3},
total_price: {display: true, label: '<string>', precision: 3},
total_price_after_tax: {display: true, label: '<string>', precision: 3},
vat_amount: {display: false}
},
quote: {display_organization_bank_account: true, display_signature: false}
},
due_date: '2023-12-25',
entity: {
email: 'jsmith@example.com',
logo: '<string>',
phone: '<string>',
registration_authority: '<string>',
registration_number: '<string>',
website: '<string>'
},
entity_vat_id_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
expiry_date: '2023-12-25',
footer: '<string>',
line_items: [
{
custom_tax_rate_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
price: 4503599627370495,
quantity: 1073741823.5,
tax_rate_name: '<string>',
tax_rate_value: 5000
}
],
memo: '<string>',
partner_metadata: {},
payment_terms_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
project_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
quote_accept_page_url: '<string>',
signature_required: true,
tag_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
tax_exempt: true,
tax_exemption_rationale: '<string>',
trade_name: '<string>',
withholding_tax_rate: 5000
}
})
};
fetch('https://api.sandbox.tesouro.com/finops/v1/receivables/{receivable_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/receivables/{receivable_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'quote' => [
'attachments' => [
[
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'include_in_email' => false
]
],
'bank_account_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'contact_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'counterpart_billing_address_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'counterpart_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'counterpart_shipping_address_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'counterpart_vat_id_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'deductions' => [
[
'amount' => 4503599627370495,
'name' => '<string>',
'memo' => '<string>'
]
],
'document_id' => '<string>',
'document_rendering' => [
'credit_note' => [
'display_organization_bank_account' => true
],
'display_line_items' => true,
'display_organization_bank_account' => true,
'invoice' => [
'display_organization_bank_account' => true
],
'line_items' => [
'discount' => [
'display' => true,
'label' => '<string>'
],
'measure_unit' => [
'display' => true,
'label' => '<string>'
],
'name' => [
'display' => true,
'label' => '<string>'
],
'price' => [
'display' => true,
'label' => '<string>',
'precision' => 3
],
'price_after_tax' => [
'display' => true,
'label' => '<string>',
'precision' => 3
],
'quantity' => [
'display' => true,
'label' => '<string>'
],
'tax_rate' => [
'display' => true,
'label' => '<string>',
'precision' => 3
],
'total_price' => [
'display' => true,
'label' => '<string>',
'precision' => 3
],
'total_price_after_tax' => [
'display' => true,
'label' => '<string>',
'precision' => 3
],
'vat_amount' => [
'display' => false
]
],
'quote' => [
'display_organization_bank_account' => true,
'display_signature' => false
]
],
'due_date' => '2023-12-25',
'entity' => [
'email' => 'jsmith@example.com',
'logo' => '<string>',
'phone' => '<string>',
'registration_authority' => '<string>',
'registration_number' => '<string>',
'website' => '<string>'
],
'entity_vat_id_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'expiry_date' => '2023-12-25',
'footer' => '<string>',
'line_items' => [
[
'custom_tax_rate_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'price' => 4503599627370495,
'quantity' => 1073741823.5,
'tax_rate_name' => '<string>',
'tax_rate_value' => 5000
]
],
'memo' => '<string>',
'partner_metadata' => [
],
'payment_terms_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'project_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'quote_accept_page_url' => '<string>',
'signature_required' => true,
'tag_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'tax_exempt' => true,
'tax_exemption_rationale' => '<string>',
'trade_name' => '<string>',
'withholding_tax_rate' => 5000
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.tesouro.com/finops/v1/receivables/{receivable_id}"
payload := strings.NewReader("{\n \"quote\": {\n \"attachments\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"include_in_email\": false\n }\n ],\n \"bank_account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"contact_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"counterpart_billing_address_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"counterpart_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"counterpart_shipping_address_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"counterpart_vat_id_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"deductions\": [\n {\n \"amount\": 4503599627370495,\n \"name\": \"<string>\",\n \"memo\": \"<string>\"\n }\n ],\n \"document_id\": \"<string>\",\n \"document_rendering\": {\n \"credit_note\": {\n \"display_organization_bank_account\": true\n },\n \"display_line_items\": true,\n \"display_organization_bank_account\": true,\n \"invoice\": {\n \"display_organization_bank_account\": true\n },\n \"line_items\": {\n \"discount\": {\n \"display\": true,\n \"label\": \"<string>\"\n },\n \"measure_unit\": {\n \"display\": true,\n \"label\": \"<string>\"\n },\n \"name\": {\n \"display\": true,\n \"label\": \"<string>\"\n },\n \"price\": {\n \"display\": true,\n \"label\": \"<string>\",\n \"precision\": 3\n },\n \"price_after_tax\": {\n \"display\": true,\n \"label\": \"<string>\",\n \"precision\": 3\n },\n \"quantity\": {\n \"display\": true,\n \"label\": \"<string>\"\n },\n \"tax_rate\": {\n \"display\": true,\n \"label\": \"<string>\",\n \"precision\": 3\n },\n \"total_price\": {\n \"display\": true,\n \"label\": \"<string>\",\n \"precision\": 3\n },\n \"total_price_after_tax\": {\n \"display\": true,\n \"label\": \"<string>\",\n \"precision\": 3\n },\n \"vat_amount\": {\n \"display\": false\n }\n },\n \"quote\": {\n \"display_organization_bank_account\": true,\n \"display_signature\": false\n }\n },\n \"due_date\": \"2023-12-25\",\n \"entity\": {\n \"email\": \"jsmith@example.com\",\n \"logo\": \"<string>\",\n \"phone\": \"<string>\",\n \"registration_authority\": \"<string>\",\n \"registration_number\": \"<string>\",\n \"website\": \"<string>\"\n },\n \"entity_vat_id_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"expiry_date\": \"2023-12-25\",\n \"footer\": \"<string>\",\n \"line_items\": [\n {\n \"custom_tax_rate_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"price\": 4503599627370495,\n \"quantity\": 1073741823.5,\n \"tax_rate_name\": \"<string>\",\n \"tax_rate_value\": 5000\n }\n ],\n \"memo\": \"<string>\",\n \"partner_metadata\": {},\n \"payment_terms_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"project_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"quote_accept_page_url\": \"<string>\",\n \"signature_required\": true,\n \"tag_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"tax_exempt\": true,\n \"tax_exemption_rationale\": \"<string>\",\n \"trade_name\": \"<string>\",\n \"withholding_tax_rate\": 5000\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-finops-version", "<x-finops-version>")
req.Header.Add("x-organization-id", "<x-organization-id>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.sandbox.tesouro.com/finops/v1/receivables/{receivable_id}")
.header("x-finops-version", "<x-finops-version>")
.header("x-organization-id", "<x-organization-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"quote\": {\n \"attachments\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"include_in_email\": false\n }\n ],\n \"bank_account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"contact_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"counterpart_billing_address_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"counterpart_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"counterpart_shipping_address_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"counterpart_vat_id_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"deductions\": [\n {\n \"amount\": 4503599627370495,\n \"name\": \"<string>\",\n \"memo\": \"<string>\"\n }\n ],\n \"document_id\": \"<string>\",\n \"document_rendering\": {\n \"credit_note\": {\n \"display_organization_bank_account\": true\n },\n \"display_line_items\": true,\n \"display_organization_bank_account\": true,\n \"invoice\": {\n \"display_organization_bank_account\": true\n },\n \"line_items\": {\n \"discount\": {\n \"display\": true,\n \"label\": \"<string>\"\n },\n \"measure_unit\": {\n \"display\": true,\n \"label\": \"<string>\"\n },\n \"name\": {\n \"display\": true,\n \"label\": \"<string>\"\n },\n \"price\": {\n \"display\": true,\n \"label\": \"<string>\",\n \"precision\": 3\n },\n \"price_after_tax\": {\n \"display\": true,\n \"label\": \"<string>\",\n \"precision\": 3\n },\n \"quantity\": {\n \"display\": true,\n \"label\": \"<string>\"\n },\n \"tax_rate\": {\n \"display\": true,\n \"label\": \"<string>\",\n \"precision\": 3\n },\n \"total_price\": {\n \"display\": true,\n \"label\": \"<string>\",\n \"precision\": 3\n },\n \"total_price_after_tax\": {\n \"display\": true,\n \"label\": \"<string>\",\n \"precision\": 3\n },\n \"vat_amount\": {\n \"display\": false\n }\n },\n \"quote\": {\n \"display_organization_bank_account\": true,\n \"display_signature\": false\n }\n },\n \"due_date\": \"2023-12-25\",\n \"entity\": {\n \"email\": \"jsmith@example.com\",\n \"logo\": \"<string>\",\n \"phone\": \"<string>\",\n \"registration_authority\": \"<string>\",\n \"registration_number\": \"<string>\",\n \"website\": \"<string>\"\n },\n \"entity_vat_id_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"expiry_date\": \"2023-12-25\",\n \"footer\": \"<string>\",\n \"line_items\": [\n {\n \"custom_tax_rate_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"price\": 4503599627370495,\n \"quantity\": 1073741823.5,\n \"tax_rate_name\": \"<string>\",\n \"tax_rate_value\": 5000\n }\n ],\n \"memo\": \"<string>\",\n \"partner_metadata\": {},\n \"payment_terms_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"project_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"quote_accept_page_url\": \"<string>\",\n \"signature_required\": true,\n \"tag_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"tax_exempt\": true,\n \"tax_exemption_rationale\": \"<string>\",\n \"trade_name\": \"<string>\",\n \"withholding_tax_rate\": 5000\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.tesouro.com/finops/v1/receivables/{receivable_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-finops-version"] = '<x-finops-version>'
request["x-organization-id"] = '<x-organization-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"quote\": {\n \"attachments\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"include_in_email\": false\n }\n ],\n \"bank_account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"contact_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"counterpart_billing_address_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"counterpart_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"counterpart_shipping_address_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"counterpart_vat_id_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"deductions\": [\n {\n \"amount\": 4503599627370495,\n \"name\": \"<string>\",\n \"memo\": \"<string>\"\n }\n ],\n \"document_id\": \"<string>\",\n \"document_rendering\": {\n \"credit_note\": {\n \"display_organization_bank_account\": true\n },\n \"display_line_items\": true,\n \"display_organization_bank_account\": true,\n \"invoice\": {\n \"display_organization_bank_account\": true\n },\n \"line_items\": {\n \"discount\": {\n \"display\": true,\n \"label\": \"<string>\"\n },\n \"measure_unit\": {\n \"display\": true,\n \"label\": \"<string>\"\n },\n \"name\": {\n \"display\": true,\n \"label\": \"<string>\"\n },\n \"price\": {\n \"display\": true,\n \"label\": \"<string>\",\n \"precision\": 3\n },\n \"price_after_tax\": {\n \"display\": true,\n \"label\": \"<string>\",\n \"precision\": 3\n },\n \"quantity\": {\n \"display\": true,\n \"label\": \"<string>\"\n },\n \"tax_rate\": {\n \"display\": true,\n \"label\": \"<string>\",\n \"precision\": 3\n },\n \"total_price\": {\n \"display\": true,\n \"label\": \"<string>\",\n \"precision\": 3\n },\n \"total_price_after_tax\": {\n \"display\": true,\n \"label\": \"<string>\",\n \"precision\": 3\n },\n \"vat_amount\": {\n \"display\": false\n }\n },\n \"quote\": {\n \"display_organization_bank_account\": true,\n \"display_signature\": false\n }\n },\n \"due_date\": \"2023-12-25\",\n \"entity\": {\n \"email\": \"jsmith@example.com\",\n \"logo\": \"<string>\",\n \"phone\": \"<string>\",\n \"registration_authority\": \"<string>\",\n \"registration_number\": \"<string>\",\n \"website\": \"<string>\"\n },\n \"entity_vat_id_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"expiry_date\": \"2023-12-25\",\n \"footer\": \"<string>\",\n \"line_items\": [\n {\n \"custom_tax_rate_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"price\": 4503599627370495,\n \"quantity\": 1073741823.5,\n \"tax_rate_name\": \"<string>\",\n \"tax_rate_value\": 5000\n }\n ],\n \"memo\": \"<string>\",\n \"partner_metadata\": {},\n \"payment_terms_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"project_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"quote_accept_page_url\": \"<string>\",\n \"signature_required\": true,\n \"tag_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"tax_exempt\": true,\n \"tax_exemption_rationale\": \"<string>\",\n \"trade_name\": \"<string>\",\n \"withholding_tax_rate\": 5000\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"counterpart_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"entity": {
"name": "<string>",
"type": "organization",
"email": "jsmith@example.com",
"logo": "<string>",
"phone": "<string>",
"registration_authority": "<string>",
"registration_number": "<string>",
"tax_id": "<string>",
"vat_id": "<string>",
"website": "<string>"
},
"entity_address": {
"city": "<string>",
"line1": "<string>",
"postal_code": "<string>",
"country": "DE",
"line2": "<string>",
"state": "<string>"
},
"line_items": [
{
"product": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"price": {
"value": 4503599627370495
},
"price_after_tax": {
"value": 4503599627370495
},
"tax_rate": {
"country": "US",
"value": 5000,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"components": [
{
"name": "<string>",
"value": 5000
}
],
"is_custom": false,
"name": "<string>"
},
"accounting_tax_rate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"description": "<string>",
"external_reference": "<string>",
"is_inline": false,
"ledger_account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"measure_unit": {
"name": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"description": "<string>"
},
"smallest_amount": 1073741823.5,
"type": "product"
},
"quantity": 1073741823.5,
"total_after_tax": 123,
"total_before_tax": 123,
"discount": {
"amount": 4503599627370495
},
"tax_status": "taxable"
}
],
"total_tax_amount": 123,
"type": "quote",
"attachments": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"mimetype": "<string>",
"name": "<string>",
"size": 123,
"url": "<string>",
"include_in_email": false
}
],
"bank_account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"bank_account_snapshot": {
"account_holder_name": "<string>",
"account_number": "<string>",
"bank_name": "<string>",
"routing_number": "<string>"
},
"bank_account_type": "<string>",
"based_on": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"based_on_document_id": "<string>",
"comment": "<string>",
"commercial_condition_description": "<string>",
"counterpart_billing_address": {
"city": "New York",
"country": "US",
"line1": "456 Fifth Avenue",
"postal_code": "10001",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"line2": "<string>",
"state": "<string>"
},
"counterpart_business_type": "<string>",
"counterpart_contact": {
"first_name": "Marge",
"last_name": "Smith",
"address": {
"city": "New York",
"country": "US",
"line1": "456 Fifth Avenue",
"postal_code": "10001",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"line2": "<string>",
"state": "<string>"
},
"email": "marge@example.org",
"phone": "55512378654",
"title": "Dr."
},
"counterpart_external_reference": "<string>",
"counterpart_name": "<string>",
"counterpart_shipping_address": {
"city": "New York",
"country": "US",
"line1": "456 Fifth Avenue",
"postal_code": "10001",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"line2": "<string>",
"state": "<string>"
},
"counterpart_tax_id": "<string>",
"counterpart_vat_id": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"counterpart_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"value": "123456789",
"type": "eu_vat"
},
"deduction_amount": 4503599627370495,
"deduction_memo": "<string>",
"deductions": [
{
"amount": 4503599627370495,
"name": "<string>",
"memo": "<string>"
}
],
"discount": {
"amount": 4503599627370495,
"value": 4503599627370495
},
"discounted_subtotal": 123,
"document_id": "<string>",
"document_rendering": {
"credit_note": {
"display_organization_bank_account": true
},
"display_line_items": true,
"display_organization_bank_account": true,
"invoice": {
"display_organization_bank_account": true
},
"line_items": {
"discount": {
"display": true,
"label": "<string>"
},
"measure_unit": {
"display": true,
"label": "<string>"
},
"name": {
"display": true,
"label": "<string>"
},
"price": {
"display": true,
"label": "<string>",
"precision": 3
},
"price_after_tax": {
"display": true,
"label": "<string>",
"precision": 3
},
"quantity": {
"display": true,
"label": "<string>"
},
"tax_rate": {
"display": true,
"label": "<string>",
"precision": 3
},
"total_price": {
"display": true,
"label": "<string>",
"precision": 3
},
"total_price_after_tax": {
"display": true,
"label": "<string>",
"precision": 3
},
"vat_amount": {
"display": false
}
},
"quote": {
"display_organization_bank_account": true,
"display_signature": false
}
},
"due_date": "2023-12-25",
"entity_bank_account": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"account_holder_name": "<string>",
"account_number": "<string>",
"bank_name": "<string>",
"bic": "<string>",
"iban": "<string>",
"routing_number": "<string>",
"sort_code": "<string>"
},
"entity_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"entity_vat_id": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"entity_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"value": "123456789",
"type": "eu_vat"
},
"expiry_date": "2023-12-25",
"file_url": "<string>",
"footer": "<string>",
"issue_date": "2023-11-07T05:31:56Z",
"memo": "<string>",
"original_file_url": "<string>",
"partner_metadata": {},
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quote_accept_page_url": "<string>",
"signature_required": true,
"subtotal": 123,
"subtotal_after_tax": 123,
"tags": [],
"tax_exempt": true,
"tax_exemption_rationale": "<string>",
"tax_inclusive_discount_mode": "exclusive",
"tax_mode": "exclusive",
"total_amount": 0,
"total_deduction_amount": 123,
"total_tax_amounts": [
{
"amount": 4503599627370495,
"taxable_amount": 1,
"value": 5000,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"components": [
{
"amount": 4503599627370495,
"name": "<string>",
"value": 5000
}
],
"name": "<string>"
}
],
"total_withholding_tax": 123,
"trade_name": "<string>",
"withholding_tax_rate": 5000
}{
"error": {
"message": "<string>"
}
}{
"error": {
"message": "<string>"
}
}{
"error": {
"message": "<string>"
}
}{
"error": {
"message": "<string>"
}
}{
"error": {
"message": "<string>"
}
}{
"error": {
"message": "<string>"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"error": {
"message": "<string>"
}
}Update a receivable
curl --request PATCH \
--url https://api.sandbox.tesouro.com/finops/v1/receivables/{receivable_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-finops-version: <x-finops-version>' \
--header 'x-organization-id: <x-organization-id>' \
--data '
{
"quote": {
"attachments": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"include_in_email": false
}
],
"bank_account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"counterpart_billing_address_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"counterpart_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"counterpart_shipping_address_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"counterpart_vat_id_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"deductions": [
{
"amount": 4503599627370495,
"name": "<string>",
"memo": "<string>"
}
],
"document_id": "<string>",
"document_rendering": {
"credit_note": {
"display_organization_bank_account": true
},
"display_line_items": true,
"display_organization_bank_account": true,
"invoice": {
"display_organization_bank_account": true
},
"line_items": {
"discount": {
"display": true,
"label": "<string>"
},
"measure_unit": {
"display": true,
"label": "<string>"
},
"name": {
"display": true,
"label": "<string>"
},
"price": {
"display": true,
"label": "<string>",
"precision": 3
},
"price_after_tax": {
"display": true,
"label": "<string>",
"precision": 3
},
"quantity": {
"display": true,
"label": "<string>"
},
"tax_rate": {
"display": true,
"label": "<string>",
"precision": 3
},
"total_price": {
"display": true,
"label": "<string>",
"precision": 3
},
"total_price_after_tax": {
"display": true,
"label": "<string>",
"precision": 3
},
"vat_amount": {
"display": false
}
},
"quote": {
"display_organization_bank_account": true,
"display_signature": false
}
},
"due_date": "2023-12-25",
"entity": {
"email": "jsmith@example.com",
"logo": "<string>",
"phone": "<string>",
"registration_authority": "<string>",
"registration_number": "<string>",
"website": "<string>"
},
"entity_vat_id_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"expiry_date": "2023-12-25",
"footer": "<string>",
"line_items": [
{
"custom_tax_rate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"price": 4503599627370495,
"quantity": 1073741823.5,
"tax_rate_name": "<string>",
"tax_rate_value": 5000
}
],
"memo": "<string>",
"partner_metadata": {},
"payment_terms_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quote_accept_page_url": "<string>",
"signature_required": true,
"tag_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"tax_exempt": true,
"tax_exemption_rationale": "<string>",
"trade_name": "<string>",
"withholding_tax_rate": 5000
}
}
'import requests
url = "https://api.sandbox.tesouro.com/finops/v1/receivables/{receivable_id}"
payload = { "quote": {
"attachments": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"include_in_email": False
}
],
"bank_account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"counterpart_billing_address_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"counterpart_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"counterpart_shipping_address_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"counterpart_vat_id_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"deductions": [
{
"amount": 4503599627370495,
"name": "<string>",
"memo": "<string>"
}
],
"document_id": "<string>",
"document_rendering": {
"credit_note": { "display_organization_bank_account": True },
"display_line_items": True,
"display_organization_bank_account": True,
"invoice": { "display_organization_bank_account": True },
"line_items": {
"discount": {
"display": True,
"label": "<string>"
},
"measure_unit": {
"display": True,
"label": "<string>"
},
"name": {
"display": True,
"label": "<string>"
},
"price": {
"display": True,
"label": "<string>",
"precision": 3
},
"price_after_tax": {
"display": True,
"label": "<string>",
"precision": 3
},
"quantity": {
"display": True,
"label": "<string>"
},
"tax_rate": {
"display": True,
"label": "<string>",
"precision": 3
},
"total_price": {
"display": True,
"label": "<string>",
"precision": 3
},
"total_price_after_tax": {
"display": True,
"label": "<string>",
"precision": 3
},
"vat_amount": { "display": False }
},
"quote": {
"display_organization_bank_account": True,
"display_signature": False
}
},
"due_date": "2023-12-25",
"entity": {
"email": "jsmith@example.com",
"logo": "<string>",
"phone": "<string>",
"registration_authority": "<string>",
"registration_number": "<string>",
"website": "<string>"
},
"entity_vat_id_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"expiry_date": "2023-12-25",
"footer": "<string>",
"line_items": [
{
"custom_tax_rate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"price": 4503599627370495,
"quantity": 1073741823.5,
"tax_rate_name": "<string>",
"tax_rate_value": 5000
}
],
"memo": "<string>",
"partner_metadata": {},
"payment_terms_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quote_accept_page_url": "<string>",
"signature_required": True,
"tag_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"tax_exempt": True,
"tax_exemption_rationale": "<string>",
"trade_name": "<string>",
"withholding_tax_rate": 5000
} }
headers = {
"x-finops-version": "<x-finops-version>",
"x-organization-id": "<x-organization-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'x-finops-version': '<x-finops-version>',
'x-organization-id': '<x-organization-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
quote: {
attachments: [{id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', include_in_email: false}],
bank_account_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
contact_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
counterpart_billing_address_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
counterpart_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
counterpart_shipping_address_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
counterpart_vat_id_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
deductions: [{amount: 4503599627370495, name: '<string>', memo: '<string>'}],
document_id: '<string>',
document_rendering: {
credit_note: {display_organization_bank_account: true},
display_line_items: true,
display_organization_bank_account: true,
invoice: {display_organization_bank_account: true},
line_items: {
discount: {display: true, label: '<string>'},
measure_unit: {display: true, label: '<string>'},
name: {display: true, label: '<string>'},
price: {display: true, label: '<string>', precision: 3},
price_after_tax: {display: true, label: '<string>', precision: 3},
quantity: {display: true, label: '<string>'},
tax_rate: {display: true, label: '<string>', precision: 3},
total_price: {display: true, label: '<string>', precision: 3},
total_price_after_tax: {display: true, label: '<string>', precision: 3},
vat_amount: {display: false}
},
quote: {display_organization_bank_account: true, display_signature: false}
},
due_date: '2023-12-25',
entity: {
email: 'jsmith@example.com',
logo: '<string>',
phone: '<string>',
registration_authority: '<string>',
registration_number: '<string>',
website: '<string>'
},
entity_vat_id_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
expiry_date: '2023-12-25',
footer: '<string>',
line_items: [
{
custom_tax_rate_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
price: 4503599627370495,
quantity: 1073741823.5,
tax_rate_name: '<string>',
tax_rate_value: 5000
}
],
memo: '<string>',
partner_metadata: {},
payment_terms_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
project_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
quote_accept_page_url: '<string>',
signature_required: true,
tag_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
tax_exempt: true,
tax_exemption_rationale: '<string>',
trade_name: '<string>',
withholding_tax_rate: 5000
}
})
};
fetch('https://api.sandbox.tesouro.com/finops/v1/receivables/{receivable_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/receivables/{receivable_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'quote' => [
'attachments' => [
[
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'include_in_email' => false
]
],
'bank_account_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'contact_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'counterpart_billing_address_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'counterpart_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'counterpart_shipping_address_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'counterpart_vat_id_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'deductions' => [
[
'amount' => 4503599627370495,
'name' => '<string>',
'memo' => '<string>'
]
],
'document_id' => '<string>',
'document_rendering' => [
'credit_note' => [
'display_organization_bank_account' => true
],
'display_line_items' => true,
'display_organization_bank_account' => true,
'invoice' => [
'display_organization_bank_account' => true
],
'line_items' => [
'discount' => [
'display' => true,
'label' => '<string>'
],
'measure_unit' => [
'display' => true,
'label' => '<string>'
],
'name' => [
'display' => true,
'label' => '<string>'
],
'price' => [
'display' => true,
'label' => '<string>',
'precision' => 3
],
'price_after_tax' => [
'display' => true,
'label' => '<string>',
'precision' => 3
],
'quantity' => [
'display' => true,
'label' => '<string>'
],
'tax_rate' => [
'display' => true,
'label' => '<string>',
'precision' => 3
],
'total_price' => [
'display' => true,
'label' => '<string>',
'precision' => 3
],
'total_price_after_tax' => [
'display' => true,
'label' => '<string>',
'precision' => 3
],
'vat_amount' => [
'display' => false
]
],
'quote' => [
'display_organization_bank_account' => true,
'display_signature' => false
]
],
'due_date' => '2023-12-25',
'entity' => [
'email' => 'jsmith@example.com',
'logo' => '<string>',
'phone' => '<string>',
'registration_authority' => '<string>',
'registration_number' => '<string>',
'website' => '<string>'
],
'entity_vat_id_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'expiry_date' => '2023-12-25',
'footer' => '<string>',
'line_items' => [
[
'custom_tax_rate_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'price' => 4503599627370495,
'quantity' => 1073741823.5,
'tax_rate_name' => '<string>',
'tax_rate_value' => 5000
]
],
'memo' => '<string>',
'partner_metadata' => [
],
'payment_terms_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'project_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'quote_accept_page_url' => '<string>',
'signature_required' => true,
'tag_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'tax_exempt' => true,
'tax_exemption_rationale' => '<string>',
'trade_name' => '<string>',
'withholding_tax_rate' => 5000
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.tesouro.com/finops/v1/receivables/{receivable_id}"
payload := strings.NewReader("{\n \"quote\": {\n \"attachments\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"include_in_email\": false\n }\n ],\n \"bank_account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"contact_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"counterpart_billing_address_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"counterpart_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"counterpart_shipping_address_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"counterpart_vat_id_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"deductions\": [\n {\n \"amount\": 4503599627370495,\n \"name\": \"<string>\",\n \"memo\": \"<string>\"\n }\n ],\n \"document_id\": \"<string>\",\n \"document_rendering\": {\n \"credit_note\": {\n \"display_organization_bank_account\": true\n },\n \"display_line_items\": true,\n \"display_organization_bank_account\": true,\n \"invoice\": {\n \"display_organization_bank_account\": true\n },\n \"line_items\": {\n \"discount\": {\n \"display\": true,\n \"label\": \"<string>\"\n },\n \"measure_unit\": {\n \"display\": true,\n \"label\": \"<string>\"\n },\n \"name\": {\n \"display\": true,\n \"label\": \"<string>\"\n },\n \"price\": {\n \"display\": true,\n \"label\": \"<string>\",\n \"precision\": 3\n },\n \"price_after_tax\": {\n \"display\": true,\n \"label\": \"<string>\",\n \"precision\": 3\n },\n \"quantity\": {\n \"display\": true,\n \"label\": \"<string>\"\n },\n \"tax_rate\": {\n \"display\": true,\n \"label\": \"<string>\",\n \"precision\": 3\n },\n \"total_price\": {\n \"display\": true,\n \"label\": \"<string>\",\n \"precision\": 3\n },\n \"total_price_after_tax\": {\n \"display\": true,\n \"label\": \"<string>\",\n \"precision\": 3\n },\n \"vat_amount\": {\n \"display\": false\n }\n },\n \"quote\": {\n \"display_organization_bank_account\": true,\n \"display_signature\": false\n }\n },\n \"due_date\": \"2023-12-25\",\n \"entity\": {\n \"email\": \"jsmith@example.com\",\n \"logo\": \"<string>\",\n \"phone\": \"<string>\",\n \"registration_authority\": \"<string>\",\n \"registration_number\": \"<string>\",\n \"website\": \"<string>\"\n },\n \"entity_vat_id_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"expiry_date\": \"2023-12-25\",\n \"footer\": \"<string>\",\n \"line_items\": [\n {\n \"custom_tax_rate_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"price\": 4503599627370495,\n \"quantity\": 1073741823.5,\n \"tax_rate_name\": \"<string>\",\n \"tax_rate_value\": 5000\n }\n ],\n \"memo\": \"<string>\",\n \"partner_metadata\": {},\n \"payment_terms_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"project_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"quote_accept_page_url\": \"<string>\",\n \"signature_required\": true,\n \"tag_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"tax_exempt\": true,\n \"tax_exemption_rationale\": \"<string>\",\n \"trade_name\": \"<string>\",\n \"withholding_tax_rate\": 5000\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-finops-version", "<x-finops-version>")
req.Header.Add("x-organization-id", "<x-organization-id>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.sandbox.tesouro.com/finops/v1/receivables/{receivable_id}")
.header("x-finops-version", "<x-finops-version>")
.header("x-organization-id", "<x-organization-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"quote\": {\n \"attachments\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"include_in_email\": false\n }\n ],\n \"bank_account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"contact_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"counterpart_billing_address_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"counterpart_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"counterpart_shipping_address_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"counterpart_vat_id_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"deductions\": [\n {\n \"amount\": 4503599627370495,\n \"name\": \"<string>\",\n \"memo\": \"<string>\"\n }\n ],\n \"document_id\": \"<string>\",\n \"document_rendering\": {\n \"credit_note\": {\n \"display_organization_bank_account\": true\n },\n \"display_line_items\": true,\n \"display_organization_bank_account\": true,\n \"invoice\": {\n \"display_organization_bank_account\": true\n },\n \"line_items\": {\n \"discount\": {\n \"display\": true,\n \"label\": \"<string>\"\n },\n \"measure_unit\": {\n \"display\": true,\n \"label\": \"<string>\"\n },\n \"name\": {\n \"display\": true,\n \"label\": \"<string>\"\n },\n \"price\": {\n \"display\": true,\n \"label\": \"<string>\",\n \"precision\": 3\n },\n \"price_after_tax\": {\n \"display\": true,\n \"label\": \"<string>\",\n \"precision\": 3\n },\n \"quantity\": {\n \"display\": true,\n \"label\": \"<string>\"\n },\n \"tax_rate\": {\n \"display\": true,\n \"label\": \"<string>\",\n \"precision\": 3\n },\n \"total_price\": {\n \"display\": true,\n \"label\": \"<string>\",\n \"precision\": 3\n },\n \"total_price_after_tax\": {\n \"display\": true,\n \"label\": \"<string>\",\n \"precision\": 3\n },\n \"vat_amount\": {\n \"display\": false\n }\n },\n \"quote\": {\n \"display_organization_bank_account\": true,\n \"display_signature\": false\n }\n },\n \"due_date\": \"2023-12-25\",\n \"entity\": {\n \"email\": \"jsmith@example.com\",\n \"logo\": \"<string>\",\n \"phone\": \"<string>\",\n \"registration_authority\": \"<string>\",\n \"registration_number\": \"<string>\",\n \"website\": \"<string>\"\n },\n \"entity_vat_id_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"expiry_date\": \"2023-12-25\",\n \"footer\": \"<string>\",\n \"line_items\": [\n {\n \"custom_tax_rate_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"price\": 4503599627370495,\n \"quantity\": 1073741823.5,\n \"tax_rate_name\": \"<string>\",\n \"tax_rate_value\": 5000\n }\n ],\n \"memo\": \"<string>\",\n \"partner_metadata\": {},\n \"payment_terms_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"project_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"quote_accept_page_url\": \"<string>\",\n \"signature_required\": true,\n \"tag_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"tax_exempt\": true,\n \"tax_exemption_rationale\": \"<string>\",\n \"trade_name\": \"<string>\",\n \"withholding_tax_rate\": 5000\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.tesouro.com/finops/v1/receivables/{receivable_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-finops-version"] = '<x-finops-version>'
request["x-organization-id"] = '<x-organization-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"quote\": {\n \"attachments\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"include_in_email\": false\n }\n ],\n \"bank_account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"contact_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"counterpart_billing_address_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"counterpart_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"counterpart_shipping_address_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"counterpart_vat_id_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"deductions\": [\n {\n \"amount\": 4503599627370495,\n \"name\": \"<string>\",\n \"memo\": \"<string>\"\n }\n ],\n \"document_id\": \"<string>\",\n \"document_rendering\": {\n \"credit_note\": {\n \"display_organization_bank_account\": true\n },\n \"display_line_items\": true,\n \"display_organization_bank_account\": true,\n \"invoice\": {\n \"display_organization_bank_account\": true\n },\n \"line_items\": {\n \"discount\": {\n \"display\": true,\n \"label\": \"<string>\"\n },\n \"measure_unit\": {\n \"display\": true,\n \"label\": \"<string>\"\n },\n \"name\": {\n \"display\": true,\n \"label\": \"<string>\"\n },\n \"price\": {\n \"display\": true,\n \"label\": \"<string>\",\n \"precision\": 3\n },\n \"price_after_tax\": {\n \"display\": true,\n \"label\": \"<string>\",\n \"precision\": 3\n },\n \"quantity\": {\n \"display\": true,\n \"label\": \"<string>\"\n },\n \"tax_rate\": {\n \"display\": true,\n \"label\": \"<string>\",\n \"precision\": 3\n },\n \"total_price\": {\n \"display\": true,\n \"label\": \"<string>\",\n \"precision\": 3\n },\n \"total_price_after_tax\": {\n \"display\": true,\n \"label\": \"<string>\",\n \"precision\": 3\n },\n \"vat_amount\": {\n \"display\": false\n }\n },\n \"quote\": {\n \"display_organization_bank_account\": true,\n \"display_signature\": false\n }\n },\n \"due_date\": \"2023-12-25\",\n \"entity\": {\n \"email\": \"jsmith@example.com\",\n \"logo\": \"<string>\",\n \"phone\": \"<string>\",\n \"registration_authority\": \"<string>\",\n \"registration_number\": \"<string>\",\n \"website\": \"<string>\"\n },\n \"entity_vat_id_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"expiry_date\": \"2023-12-25\",\n \"footer\": \"<string>\",\n \"line_items\": [\n {\n \"custom_tax_rate_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"price\": 4503599627370495,\n \"quantity\": 1073741823.5,\n \"tax_rate_name\": \"<string>\",\n \"tax_rate_value\": 5000\n }\n ],\n \"memo\": \"<string>\",\n \"partner_metadata\": {},\n \"payment_terms_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"project_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"quote_accept_page_url\": \"<string>\",\n \"signature_required\": true,\n \"tag_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"tax_exempt\": true,\n \"tax_exemption_rationale\": \"<string>\",\n \"trade_name\": \"<string>\",\n \"withholding_tax_rate\": 5000\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"counterpart_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"entity": {
"name": "<string>",
"type": "organization",
"email": "jsmith@example.com",
"logo": "<string>",
"phone": "<string>",
"registration_authority": "<string>",
"registration_number": "<string>",
"tax_id": "<string>",
"vat_id": "<string>",
"website": "<string>"
},
"entity_address": {
"city": "<string>",
"line1": "<string>",
"postal_code": "<string>",
"country": "DE",
"line2": "<string>",
"state": "<string>"
},
"line_items": [
{
"product": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"price": {
"value": 4503599627370495
},
"price_after_tax": {
"value": 4503599627370495
},
"tax_rate": {
"country": "US",
"value": 5000,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"components": [
{
"name": "<string>",
"value": 5000
}
],
"is_custom": false,
"name": "<string>"
},
"accounting_tax_rate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"description": "<string>",
"external_reference": "<string>",
"is_inline": false,
"ledger_account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"measure_unit": {
"name": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"description": "<string>"
},
"smallest_amount": 1073741823.5,
"type": "product"
},
"quantity": 1073741823.5,
"total_after_tax": 123,
"total_before_tax": 123,
"discount": {
"amount": 4503599627370495
},
"tax_status": "taxable"
}
],
"total_tax_amount": 123,
"type": "quote",
"attachments": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"mimetype": "<string>",
"name": "<string>",
"size": 123,
"url": "<string>",
"include_in_email": false
}
],
"bank_account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"bank_account_snapshot": {
"account_holder_name": "<string>",
"account_number": "<string>",
"bank_name": "<string>",
"routing_number": "<string>"
},
"bank_account_type": "<string>",
"based_on": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"based_on_document_id": "<string>",
"comment": "<string>",
"commercial_condition_description": "<string>",
"counterpart_billing_address": {
"city": "New York",
"country": "US",
"line1": "456 Fifth Avenue",
"postal_code": "10001",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"line2": "<string>",
"state": "<string>"
},
"counterpart_business_type": "<string>",
"counterpart_contact": {
"first_name": "Marge",
"last_name": "Smith",
"address": {
"city": "New York",
"country": "US",
"line1": "456 Fifth Avenue",
"postal_code": "10001",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"line2": "<string>",
"state": "<string>"
},
"email": "marge@example.org",
"phone": "55512378654",
"title": "Dr."
},
"counterpart_external_reference": "<string>",
"counterpart_name": "<string>",
"counterpart_shipping_address": {
"city": "New York",
"country": "US",
"line1": "456 Fifth Avenue",
"postal_code": "10001",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"line2": "<string>",
"state": "<string>"
},
"counterpart_tax_id": "<string>",
"counterpart_vat_id": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"counterpart_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"value": "123456789",
"type": "eu_vat"
},
"deduction_amount": 4503599627370495,
"deduction_memo": "<string>",
"deductions": [
{
"amount": 4503599627370495,
"name": "<string>",
"memo": "<string>"
}
],
"discount": {
"amount": 4503599627370495,
"value": 4503599627370495
},
"discounted_subtotal": 123,
"document_id": "<string>",
"document_rendering": {
"credit_note": {
"display_organization_bank_account": true
},
"display_line_items": true,
"display_organization_bank_account": true,
"invoice": {
"display_organization_bank_account": true
},
"line_items": {
"discount": {
"display": true,
"label": "<string>"
},
"measure_unit": {
"display": true,
"label": "<string>"
},
"name": {
"display": true,
"label": "<string>"
},
"price": {
"display": true,
"label": "<string>",
"precision": 3
},
"price_after_tax": {
"display": true,
"label": "<string>",
"precision": 3
},
"quantity": {
"display": true,
"label": "<string>"
},
"tax_rate": {
"display": true,
"label": "<string>",
"precision": 3
},
"total_price": {
"display": true,
"label": "<string>",
"precision": 3
},
"total_price_after_tax": {
"display": true,
"label": "<string>",
"precision": 3
},
"vat_amount": {
"display": false
}
},
"quote": {
"display_organization_bank_account": true,
"display_signature": false
}
},
"due_date": "2023-12-25",
"entity_bank_account": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"account_holder_name": "<string>",
"account_number": "<string>",
"bank_name": "<string>",
"bic": "<string>",
"iban": "<string>",
"routing_number": "<string>",
"sort_code": "<string>"
},
"entity_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"entity_vat_id": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"entity_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"value": "123456789",
"type": "eu_vat"
},
"expiry_date": "2023-12-25",
"file_url": "<string>",
"footer": "<string>",
"issue_date": "2023-11-07T05:31:56Z",
"memo": "<string>",
"original_file_url": "<string>",
"partner_metadata": {},
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quote_accept_page_url": "<string>",
"signature_required": true,
"subtotal": 123,
"subtotal_after_tax": 123,
"tags": [],
"tax_exempt": true,
"tax_exemption_rationale": "<string>",
"tax_inclusive_discount_mode": "exclusive",
"tax_mode": "exclusive",
"total_amount": 0,
"total_deduction_amount": 123,
"total_tax_amounts": [
{
"amount": 4503599627370495,
"taxable_amount": 1,
"value": 5000,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"components": [
{
"amount": 4503599627370495,
"name": "<string>",
"value": 5000
}
],
"name": "<string>"
}
],
"total_withholding_tax": 123,
"trade_name": "<string>",
"withholding_tax_rate": 5000
}{
"error": {
"message": "<string>"
}
}{
"error": {
"message": "<string>"
}
}{
"error": {
"message": "<string>"
}
}{
"error": {
"message": "<string>"
}
}{
"error": {
"message": "<string>"
}
}{
"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
Body
- Option 1
- Option 2
- Option 3
- Option 4
Helper class that provides a standard way to create an ABC using inheritance.
Show child attributes
Show child attributes
Response
Successful Response
- Option 1
- Option 2
- Option 3
Time at which the receivable was created. Timestamps follow the ISO 8601 standard.
Time at which the receivable was last updated. Timestamps follow the ISO 8601 standard.
Unique ID of the counterpart.
The type of the counterpart.
individual, organization The currency used in the receivable.
AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BRL, BSD, BTN, BWP, BYN, BZD, CAD, CDF, CHF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HTG, HUF, IDR, ILS, INR, IQD, ISK, JMD, JOD, JPY, KES, KGS, KHR, KMF, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SLE, SOS, SRD, SSP, SVC, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW A Response schema for an entity of organization type
- Option 1
- Option 2
Show child attributes
Show child attributes
A schema represents address info of the entity
Show child attributes
Show child attributes
The language of the customer-facing PDF file (file_url). The value matches the counterpart's language at the time when this PDF file was generated.
ab, aa, af, ak, sq, am, ar, an, hy, av, ae, ay, az, bm, ba, eu, be, bn, bi, bs, br, bg, my, ca, ch, ce, ny, zh, cu, cv, kw, co, cr, hr, cs, da, dv, nl, dz, en, eo, et, ee, fo, fj, fi, fr, fy, ff, gd, gl, lg, ka, de, el, kl, gn, gu, ht, ha, he, hz, hi, ho, hu, io, ig, id, ia, ie, iu, ik, ga, it, ja, jv, kn, kr, ks, kk, km, ki, rw, ky, kv, kg, ko, kj, ku, lo, la, lv, li, ln, lt, lu, lb, mk, mg, ms, ml, mt, gv, mi, mr, mh, mn, na, nv, nd, nr, ng, ne, no, nb, nn, ii, oc, oj, om, os, pi, ps, fa, pl, pt, pa, qu, ro, rm, rn, ru, se, sm, sg, sa, sc, sr, sn, sd, si, sk, sl, so, st, es, su, sw, ss, sv, tl, ty, tg, ta, tt, te, th, bo, ti, to, ts, tn, tr, tk, tw, ug, uk, ur, uz, ve, vi, vo, wa, cy, wo, xh, yi, yo, za, zu Show child attributes
Show child attributes
The language of the entity's copy of the PDF file (original_file_url). The value matches the entity's language at the time when this PDF file was generated.
ab, aa, af, ak, sq, am, ar, an, hy, av, ae, ay, az, bm, ba, eu, be, bn, bi, bs, br, bg, my, ca, ch, ce, ny, zh, cu, cv, kw, co, cr, hr, cs, da, dv, nl, dz, en, eo, et, ee, fo, fj, fi, fr, fy, ff, gd, gl, lg, ka, de, el, kl, gn, gu, ht, ha, he, hz, hi, ho, hu, io, ig, id, ia, ie, iu, ik, ga, it, ja, jv, kn, kr, ks, kk, km, ki, rw, ky, kv, kg, ko, kj, ku, lo, la, lv, li, ln, lt, lu, lb, mk, mg, ms, ml, mt, gv, mi, mr, mh, mn, na, nv, nd, nr, ng, ne, no, nb, nn, ii, oc, oj, om, os, pi, ps, fa, pl, pt, pa, qu, ro, rm, rn, ru, se, sm, sg, sa, sc, sr, sn, sd, si, sk, sl, so, st, es, su, sw, ss, sv, tl, ty, tg, ta, tt, te, th, bo, ti, to, ts, tn, tr, tk, tw, ug, uk, ur, uz, ve, vi, vo, wa, cy, wo, xh, yi, yo, za, zu The status of the Quote inside the receivable workflow.
draft, issued, accepted, expired, declined, deleted The total tax of all line items, in minor units.
x <= 9007199254740991The type of the document uploaded.
quote List of attachments to include with the receivable. Each attachment can be configured for email inclusion. If not provided, no attachments will be associated.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
The unique ID of a previous document related to the receivable if applicable.
The unique document ID of a previous document related to the receivable if applicable.
Field with a comment on why the client declined this Quote
The commercial terms of the receivable (e.g. The products must be delivered in X days).
Address of invoicing, need to state as a separate fields for some countries if it differs from address of a company.
Show child attributes
Show child attributes
Different types of companies for different countries, ex. GmbH, SAS, SNC, etc.
50Additional information about counterpart contacts.
Show child attributes
Show child attributes
The external reference of the counterpart.
A legal name of a counterpart it is an organization or first and last name if it is an individual
Address where goods were shipped / where services were provided.
Show child attributes
Show child attributes
The VAT/TAX ID of the counterpart.
Show child attributes
Show child attributes
The amount of tax deducted in minor units
0 <= x <= 9007199254740991A note with additional information about a tax deduction
List of deductions applied to the receivable (maximum 10 deductions allowed)
10Show child attributes
Show child attributes
The discount for a receivable.
Show child attributes
Show child attributes
Total price of the receivable with discounts before taxes minor units.
x <= 9007199254740991The sequential code systematically assigned to invoices.
Settings for rendering documents in PDF format, including settings for line items and specific document types.
Show child attributes
Show child attributes
Optional field representing date until which invoice should be paid
Deprecated. Always null; use bank_account_snapshot instead.
Show child attributes
Show child attributes
The entity user who created this document.
Show child attributes
Show child attributes
The date (in ISO 8601 format) until which the quote is valid.
The receivable's PDF URL in the counterpart's default language.
Optional text displayed below the line items table in the PDF.
Optional field for the issue of the entry.
A note with additional information for a receivable.
The receivable's PDF URL in the entity's default language.
Metadata for partner needs
A project related to current receivable
Link for custom quote accept page
1 - 65536Whether acceptance a quote requires a signature.
The subtotal (excluding tax), in minor units.
x <= 9007199254740991The subtotal including tax but without invoice discount, in minor units.
x <= 9007199254740991The list of tags for this receivable.
Show child attributes
Show child attributes
Indicates whether the goods, materials, or services listed in the receivable are exempt from tax or not.
The reason for the tax exemption, if applicable.
Indicates whether the discount is applied to the tax-inclusive or tax-exclusive amount.
exclusive, inclusive Defines whether the prices of products in receivable will already include tax or not.
exclusive, inclusive Total price of the receivable in minor units. Calculated as a subtotal + total_tax_amount.
x <= 9007199254740991The total deduction amount of all deductions, in minor units.
x <= 9007199254740991List of total tax amount for each tax rate, presented in receivable
Show child attributes
Show child attributes
Total price of the receivable with tax withheld in minor units
Trade name of the entity
255The amount of tax withheld in percent minor units
0 <= x <= 10000Was this page helpful?