curl --request PATCH \
--url https://api.sandbox.tesouro.com/finops/v1/entities/{entity_id}/settings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-finops-version: <x-finops-version>' \
--data '
{
"accounting": {
"ledger_account_ids": {
"payments": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"products": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"tax_ids": {
"deductions": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
},
"allow_purchase_order_autolinking": true,
"currency": {
"exchange_rates": [
{
"rate": 123
}
]
},
"default_bank_account": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"document_ids": {
"document_type_prefix": {
"credit_note": "CN",
"delivery_note": "DN",
"invoice": "INV",
"purchase_order": "PO",
"quote": "Q"
},
"include_date": false,
"min_digits": 5,
"next_number": {
"credit_note": 4611686018427388000,
"delivery_note": 4611686018427388000,
"invoice": 4611686018427388000,
"purchase_order": 4611686018427388000,
"quote": 4611686018427388000
},
"prefix": "<string>",
"separator": "-"
},
"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
}
},
"generate_paid_invoice_pdf": false,
"mail": {
"reply_to": [
"support@example.com"
]
},
"payables_ocr_auto_tagging": [
{
"enabled": true,
"keywords": [
"<string>"
],
"tag_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"payables_skip_approval_flow": false,
"payment_priority": "working_capital",
"quote_signature_required": false,
"receivable_edit_flow": "compliant",
"reminder": {
"enabled": true
},
"tax_inclusive_discount_mode": "exclusive",
"tax_mode": "exclusive"
}
'import requests
url = "https://api.sandbox.tesouro.com/finops/v1/entities/{entity_id}/settings"
payload = {
"accounting": {
"ledger_account_ids": {
"payments": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"products": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"tax_ids": { "deductions": "3c90c3cc-0d44-4b50-8888-8dd25736052a" }
},
"allow_purchase_order_autolinking": True,
"currency": { "exchange_rates": [{ "rate": 123 }] },
"default_bank_account": { "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a" },
"document_ids": {
"document_type_prefix": {
"credit_note": "CN",
"delivery_note": "DN",
"invoice": "INV",
"purchase_order": "PO",
"quote": "Q"
},
"include_date": False,
"min_digits": 5,
"next_number": {
"credit_note": 4611686018427388000,
"delivery_note": 4611686018427388000,
"invoice": 4611686018427388000,
"purchase_order": 4611686018427388000,
"quote": 4611686018427388000
},
"prefix": "<string>",
"separator": "-"
},
"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
}
},
"generate_paid_invoice_pdf": False,
"mail": { "reply_to": ["support@example.com"] },
"payables_ocr_auto_tagging": [
{
"enabled": True,
"keywords": ["<string>"],
"tag_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"payables_skip_approval_flow": False,
"payment_priority": "working_capital",
"quote_signature_required": False,
"receivable_edit_flow": "compliant",
"reminder": { "enabled": True },
"tax_inclusive_discount_mode": "exclusive",
"tax_mode": "exclusive"
}
headers = {
"x-finops-version": "<x-finops-version>",
"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>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
accounting: {
ledger_account_ids: {
payments: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
products: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
},
tax_ids: {deductions: '3c90c3cc-0d44-4b50-8888-8dd25736052a'}
},
allow_purchase_order_autolinking: true,
currency: {exchange_rates: [{rate: 123}]},
default_bank_account: {id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'},
document_ids: {
document_type_prefix: {
credit_note: 'CN',
delivery_note: 'DN',
invoice: 'INV',
purchase_order: 'PO',
quote: 'Q'
},
include_date: false,
min_digits: 5,
next_number: {
credit_note: 4611686018427388000,
delivery_note: 4611686018427388000,
invoice: 4611686018427388000,
purchase_order: 4611686018427388000,
quote: 4611686018427388000
},
prefix: '<string>',
separator: '-'
},
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}
},
generate_paid_invoice_pdf: false,
mail: {reply_to: ['support@example.com']},
payables_ocr_auto_tagging: [
{
enabled: true,
keywords: ['<string>'],
tag_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
}
],
payables_skip_approval_flow: false,
payment_priority: 'working_capital',
quote_signature_required: false,
receivable_edit_flow: 'compliant',
reminder: {enabled: true},
tax_inclusive_discount_mode: 'exclusive',
tax_mode: 'exclusive'
})
};
fetch('https://api.sandbox.tesouro.com/finops/v1/entities/{entity_id}/settings', 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/entities/{entity_id}/settings",
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([
'accounting' => [
'ledger_account_ids' => [
'payments' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'products' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'tax_ids' => [
'deductions' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
],
'allow_purchase_order_autolinking' => true,
'currency' => [
'exchange_rates' => [
[
'rate' => 123
]
]
],
'default_bank_account' => [
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'document_ids' => [
'document_type_prefix' => [
'credit_note' => 'CN',
'delivery_note' => 'DN',
'invoice' => 'INV',
'purchase_order' => 'PO',
'quote' => 'Q'
],
'include_date' => false,
'min_digits' => 5,
'next_number' => [
'credit_note' => 4611686018427388000,
'delivery_note' => 4611686018427388000,
'invoice' => 4611686018427388000,
'purchase_order' => 4611686018427388000,
'quote' => 4611686018427388000
],
'prefix' => '<string>',
'separator' => '-'
],
'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
]
],
'generate_paid_invoice_pdf' => false,
'mail' => [
'reply_to' => [
'support@example.com'
]
],
'payables_ocr_auto_tagging' => [
[
'enabled' => true,
'keywords' => [
'<string>'
],
'tag_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
],
'payables_skip_approval_flow' => false,
'payment_priority' => 'working_capital',
'quote_signature_required' => false,
'receivable_edit_flow' => 'compliant',
'reminder' => [
'enabled' => true
],
'tax_inclusive_discount_mode' => 'exclusive',
'tax_mode' => 'exclusive'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-finops-version: <x-finops-version>"
],
]);
$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/entities/{entity_id}/settings"
payload := strings.NewReader("{\n \"accounting\": {\n \"ledger_account_ids\": {\n \"payments\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"products\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"tax_ids\": {\n \"deductions\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n },\n \"allow_purchase_order_autolinking\": true,\n \"currency\": {\n \"exchange_rates\": [\n {\n \"rate\": 123\n }\n ]\n },\n \"default_bank_account\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"document_ids\": {\n \"document_type_prefix\": {\n \"credit_note\": \"CN\",\n \"delivery_note\": \"DN\",\n \"invoice\": \"INV\",\n \"purchase_order\": \"PO\",\n \"quote\": \"Q\"\n },\n \"include_date\": false,\n \"min_digits\": 5,\n \"next_number\": {\n \"credit_note\": 4611686018427388000,\n \"delivery_note\": 4611686018427388000,\n \"invoice\": 4611686018427388000,\n \"purchase_order\": 4611686018427388000,\n \"quote\": 4611686018427388000\n },\n \"prefix\": \"<string>\",\n \"separator\": \"-\"\n },\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 \"generate_paid_invoice_pdf\": false,\n \"mail\": {\n \"reply_to\": [\n \"support@example.com\"\n ]\n },\n \"payables_ocr_auto_tagging\": [\n {\n \"enabled\": true,\n \"keywords\": [\n \"<string>\"\n ],\n \"tag_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"payables_skip_approval_flow\": false,\n \"payment_priority\": \"working_capital\",\n \"quote_signature_required\": false,\n \"receivable_edit_flow\": \"compliant\",\n \"reminder\": {\n \"enabled\": true\n },\n \"tax_inclusive_discount_mode\": \"exclusive\",\n \"tax_mode\": \"exclusive\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-finops-version", "<x-finops-version>")
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/entities/{entity_id}/settings")
.header("x-finops-version", "<x-finops-version>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"accounting\": {\n \"ledger_account_ids\": {\n \"payments\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"products\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"tax_ids\": {\n \"deductions\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n },\n \"allow_purchase_order_autolinking\": true,\n \"currency\": {\n \"exchange_rates\": [\n {\n \"rate\": 123\n }\n ]\n },\n \"default_bank_account\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"document_ids\": {\n \"document_type_prefix\": {\n \"credit_note\": \"CN\",\n \"delivery_note\": \"DN\",\n \"invoice\": \"INV\",\n \"purchase_order\": \"PO\",\n \"quote\": \"Q\"\n },\n \"include_date\": false,\n \"min_digits\": 5,\n \"next_number\": {\n \"credit_note\": 4611686018427388000,\n \"delivery_note\": 4611686018427388000,\n \"invoice\": 4611686018427388000,\n \"purchase_order\": 4611686018427388000,\n \"quote\": 4611686018427388000\n },\n \"prefix\": \"<string>\",\n \"separator\": \"-\"\n },\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 \"generate_paid_invoice_pdf\": false,\n \"mail\": {\n \"reply_to\": [\n \"support@example.com\"\n ]\n },\n \"payables_ocr_auto_tagging\": [\n {\n \"enabled\": true,\n \"keywords\": [\n \"<string>\"\n ],\n \"tag_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"payables_skip_approval_flow\": false,\n \"payment_priority\": \"working_capital\",\n \"quote_signature_required\": false,\n \"receivable_edit_flow\": \"compliant\",\n \"reminder\": {\n \"enabled\": true\n },\n \"tax_inclusive_discount_mode\": \"exclusive\",\n \"tax_mode\": \"exclusive\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.tesouro.com/finops/v1/entities/{entity_id}/settings")
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["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"accounting\": {\n \"ledger_account_ids\": {\n \"payments\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"products\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"tax_ids\": {\n \"deductions\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n },\n \"allow_purchase_order_autolinking\": true,\n \"currency\": {\n \"exchange_rates\": [\n {\n \"rate\": 123\n }\n ]\n },\n \"default_bank_account\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"document_ids\": {\n \"document_type_prefix\": {\n \"credit_note\": \"CN\",\n \"delivery_note\": \"DN\",\n \"invoice\": \"INV\",\n \"purchase_order\": \"PO\",\n \"quote\": \"Q\"\n },\n \"include_date\": false,\n \"min_digits\": 5,\n \"next_number\": {\n \"credit_note\": 4611686018427388000,\n \"delivery_note\": 4611686018427388000,\n \"invoice\": 4611686018427388000,\n \"purchase_order\": 4611686018427388000,\n \"quote\": 4611686018427388000\n },\n \"prefix\": \"<string>\",\n \"separator\": \"-\"\n },\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 \"generate_paid_invoice_pdf\": false,\n \"mail\": {\n \"reply_to\": [\n \"support@example.com\"\n ]\n },\n \"payables_ocr_auto_tagging\": [\n {\n \"enabled\": true,\n \"keywords\": [\n \"<string>\"\n ],\n \"tag_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"payables_skip_approval_flow\": false,\n \"payment_priority\": \"working_capital\",\n \"quote_signature_required\": false,\n \"receivable_edit_flow\": \"compliant\",\n \"reminder\": {\n \"enabled\": true\n },\n \"tax_inclusive_discount_mode\": \"exclusive\",\n \"tax_mode\": \"exclusive\"\n}"
response = http.request(request)
puts response.read_body{
"accounting": {
"ledger_account_ids": {
"payments": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"products": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"tax_ids": {
"deductions": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
},
"allow_purchase_order_autolinking": true,
"currency": {
"exchange_rates": [
{
"rate": 123
}
]
},
"default_bank_account": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"document_ids": {
"document_type_prefix": {
"credit_note": "CN",
"delivery_note": "DN",
"invoice": "INV",
"purchase_order": "PO",
"quote": "Q"
},
"include_date": false,
"min_digits": 5,
"prefix": "<string>",
"separator": "-"
},
"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
}
},
"generate_paid_invoice_pdf": false,
"mail": {
"reply_to": [
"support@example.com"
]
},
"payables_ocr_auto_tagging": [
{
"enabled": true,
"keywords": [
"<string>"
],
"tag_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"payables_skip_approval_flow": false,
"payment_priority": "working_capital",
"quote_signature_required": false,
"receivable_edit_flow": "compliant",
"reminder": {
"enabled": true
},
"tax_inclusive_discount_mode": "exclusive",
"tax_mode": "exclusive"
}{
"error": {
"message": "<string>"
}
}{
"error": {
"message": "<string>"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"error": {
"message": "<string>"
}
}Update entity settings
Change the specified fields with the provided values.
curl --request PATCH \
--url https://api.sandbox.tesouro.com/finops/v1/entities/{entity_id}/settings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-finops-version: <x-finops-version>' \
--data '
{
"accounting": {
"ledger_account_ids": {
"payments": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"products": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"tax_ids": {
"deductions": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
},
"allow_purchase_order_autolinking": true,
"currency": {
"exchange_rates": [
{
"rate": 123
}
]
},
"default_bank_account": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"document_ids": {
"document_type_prefix": {
"credit_note": "CN",
"delivery_note": "DN",
"invoice": "INV",
"purchase_order": "PO",
"quote": "Q"
},
"include_date": false,
"min_digits": 5,
"next_number": {
"credit_note": 4611686018427388000,
"delivery_note": 4611686018427388000,
"invoice": 4611686018427388000,
"purchase_order": 4611686018427388000,
"quote": 4611686018427388000
},
"prefix": "<string>",
"separator": "-"
},
"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
}
},
"generate_paid_invoice_pdf": false,
"mail": {
"reply_to": [
"support@example.com"
]
},
"payables_ocr_auto_tagging": [
{
"enabled": true,
"keywords": [
"<string>"
],
"tag_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"payables_skip_approval_flow": false,
"payment_priority": "working_capital",
"quote_signature_required": false,
"receivable_edit_flow": "compliant",
"reminder": {
"enabled": true
},
"tax_inclusive_discount_mode": "exclusive",
"tax_mode": "exclusive"
}
'import requests
url = "https://api.sandbox.tesouro.com/finops/v1/entities/{entity_id}/settings"
payload = {
"accounting": {
"ledger_account_ids": {
"payments": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"products": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"tax_ids": { "deductions": "3c90c3cc-0d44-4b50-8888-8dd25736052a" }
},
"allow_purchase_order_autolinking": True,
"currency": { "exchange_rates": [{ "rate": 123 }] },
"default_bank_account": { "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a" },
"document_ids": {
"document_type_prefix": {
"credit_note": "CN",
"delivery_note": "DN",
"invoice": "INV",
"purchase_order": "PO",
"quote": "Q"
},
"include_date": False,
"min_digits": 5,
"next_number": {
"credit_note": 4611686018427388000,
"delivery_note": 4611686018427388000,
"invoice": 4611686018427388000,
"purchase_order": 4611686018427388000,
"quote": 4611686018427388000
},
"prefix": "<string>",
"separator": "-"
},
"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
}
},
"generate_paid_invoice_pdf": False,
"mail": { "reply_to": ["support@example.com"] },
"payables_ocr_auto_tagging": [
{
"enabled": True,
"keywords": ["<string>"],
"tag_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"payables_skip_approval_flow": False,
"payment_priority": "working_capital",
"quote_signature_required": False,
"receivable_edit_flow": "compliant",
"reminder": { "enabled": True },
"tax_inclusive_discount_mode": "exclusive",
"tax_mode": "exclusive"
}
headers = {
"x-finops-version": "<x-finops-version>",
"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>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
accounting: {
ledger_account_ids: {
payments: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
products: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
},
tax_ids: {deductions: '3c90c3cc-0d44-4b50-8888-8dd25736052a'}
},
allow_purchase_order_autolinking: true,
currency: {exchange_rates: [{rate: 123}]},
default_bank_account: {id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'},
document_ids: {
document_type_prefix: {
credit_note: 'CN',
delivery_note: 'DN',
invoice: 'INV',
purchase_order: 'PO',
quote: 'Q'
},
include_date: false,
min_digits: 5,
next_number: {
credit_note: 4611686018427388000,
delivery_note: 4611686018427388000,
invoice: 4611686018427388000,
purchase_order: 4611686018427388000,
quote: 4611686018427388000
},
prefix: '<string>',
separator: '-'
},
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}
},
generate_paid_invoice_pdf: false,
mail: {reply_to: ['support@example.com']},
payables_ocr_auto_tagging: [
{
enabled: true,
keywords: ['<string>'],
tag_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
}
],
payables_skip_approval_flow: false,
payment_priority: 'working_capital',
quote_signature_required: false,
receivable_edit_flow: 'compliant',
reminder: {enabled: true},
tax_inclusive_discount_mode: 'exclusive',
tax_mode: 'exclusive'
})
};
fetch('https://api.sandbox.tesouro.com/finops/v1/entities/{entity_id}/settings', 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/entities/{entity_id}/settings",
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([
'accounting' => [
'ledger_account_ids' => [
'payments' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'products' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'tax_ids' => [
'deductions' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
],
'allow_purchase_order_autolinking' => true,
'currency' => [
'exchange_rates' => [
[
'rate' => 123
]
]
],
'default_bank_account' => [
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'document_ids' => [
'document_type_prefix' => [
'credit_note' => 'CN',
'delivery_note' => 'DN',
'invoice' => 'INV',
'purchase_order' => 'PO',
'quote' => 'Q'
],
'include_date' => false,
'min_digits' => 5,
'next_number' => [
'credit_note' => 4611686018427388000,
'delivery_note' => 4611686018427388000,
'invoice' => 4611686018427388000,
'purchase_order' => 4611686018427388000,
'quote' => 4611686018427388000
],
'prefix' => '<string>',
'separator' => '-'
],
'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
]
],
'generate_paid_invoice_pdf' => false,
'mail' => [
'reply_to' => [
'support@example.com'
]
],
'payables_ocr_auto_tagging' => [
[
'enabled' => true,
'keywords' => [
'<string>'
],
'tag_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
],
'payables_skip_approval_flow' => false,
'payment_priority' => 'working_capital',
'quote_signature_required' => false,
'receivable_edit_flow' => 'compliant',
'reminder' => [
'enabled' => true
],
'tax_inclusive_discount_mode' => 'exclusive',
'tax_mode' => 'exclusive'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-finops-version: <x-finops-version>"
],
]);
$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/entities/{entity_id}/settings"
payload := strings.NewReader("{\n \"accounting\": {\n \"ledger_account_ids\": {\n \"payments\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"products\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"tax_ids\": {\n \"deductions\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n },\n \"allow_purchase_order_autolinking\": true,\n \"currency\": {\n \"exchange_rates\": [\n {\n \"rate\": 123\n }\n ]\n },\n \"default_bank_account\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"document_ids\": {\n \"document_type_prefix\": {\n \"credit_note\": \"CN\",\n \"delivery_note\": \"DN\",\n \"invoice\": \"INV\",\n \"purchase_order\": \"PO\",\n \"quote\": \"Q\"\n },\n \"include_date\": false,\n \"min_digits\": 5,\n \"next_number\": {\n \"credit_note\": 4611686018427388000,\n \"delivery_note\": 4611686018427388000,\n \"invoice\": 4611686018427388000,\n \"purchase_order\": 4611686018427388000,\n \"quote\": 4611686018427388000\n },\n \"prefix\": \"<string>\",\n \"separator\": \"-\"\n },\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 \"generate_paid_invoice_pdf\": false,\n \"mail\": {\n \"reply_to\": [\n \"support@example.com\"\n ]\n },\n \"payables_ocr_auto_tagging\": [\n {\n \"enabled\": true,\n \"keywords\": [\n \"<string>\"\n ],\n \"tag_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"payables_skip_approval_flow\": false,\n \"payment_priority\": \"working_capital\",\n \"quote_signature_required\": false,\n \"receivable_edit_flow\": \"compliant\",\n \"reminder\": {\n \"enabled\": true\n },\n \"tax_inclusive_discount_mode\": \"exclusive\",\n \"tax_mode\": \"exclusive\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-finops-version", "<x-finops-version>")
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/entities/{entity_id}/settings")
.header("x-finops-version", "<x-finops-version>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"accounting\": {\n \"ledger_account_ids\": {\n \"payments\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"products\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"tax_ids\": {\n \"deductions\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n },\n \"allow_purchase_order_autolinking\": true,\n \"currency\": {\n \"exchange_rates\": [\n {\n \"rate\": 123\n }\n ]\n },\n \"default_bank_account\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"document_ids\": {\n \"document_type_prefix\": {\n \"credit_note\": \"CN\",\n \"delivery_note\": \"DN\",\n \"invoice\": \"INV\",\n \"purchase_order\": \"PO\",\n \"quote\": \"Q\"\n },\n \"include_date\": false,\n \"min_digits\": 5,\n \"next_number\": {\n \"credit_note\": 4611686018427388000,\n \"delivery_note\": 4611686018427388000,\n \"invoice\": 4611686018427388000,\n \"purchase_order\": 4611686018427388000,\n \"quote\": 4611686018427388000\n },\n \"prefix\": \"<string>\",\n \"separator\": \"-\"\n },\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 \"generate_paid_invoice_pdf\": false,\n \"mail\": {\n \"reply_to\": [\n \"support@example.com\"\n ]\n },\n \"payables_ocr_auto_tagging\": [\n {\n \"enabled\": true,\n \"keywords\": [\n \"<string>\"\n ],\n \"tag_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"payables_skip_approval_flow\": false,\n \"payment_priority\": \"working_capital\",\n \"quote_signature_required\": false,\n \"receivable_edit_flow\": \"compliant\",\n \"reminder\": {\n \"enabled\": true\n },\n \"tax_inclusive_discount_mode\": \"exclusive\",\n \"tax_mode\": \"exclusive\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.tesouro.com/finops/v1/entities/{entity_id}/settings")
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["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"accounting\": {\n \"ledger_account_ids\": {\n \"payments\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"products\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"tax_ids\": {\n \"deductions\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n },\n \"allow_purchase_order_autolinking\": true,\n \"currency\": {\n \"exchange_rates\": [\n {\n \"rate\": 123\n }\n ]\n },\n \"default_bank_account\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"document_ids\": {\n \"document_type_prefix\": {\n \"credit_note\": \"CN\",\n \"delivery_note\": \"DN\",\n \"invoice\": \"INV\",\n \"purchase_order\": \"PO\",\n \"quote\": \"Q\"\n },\n \"include_date\": false,\n \"min_digits\": 5,\n \"next_number\": {\n \"credit_note\": 4611686018427388000,\n \"delivery_note\": 4611686018427388000,\n \"invoice\": 4611686018427388000,\n \"purchase_order\": 4611686018427388000,\n \"quote\": 4611686018427388000\n },\n \"prefix\": \"<string>\",\n \"separator\": \"-\"\n },\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 \"generate_paid_invoice_pdf\": false,\n \"mail\": {\n \"reply_to\": [\n \"support@example.com\"\n ]\n },\n \"payables_ocr_auto_tagging\": [\n {\n \"enabled\": true,\n \"keywords\": [\n \"<string>\"\n ],\n \"tag_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"payables_skip_approval_flow\": false,\n \"payment_priority\": \"working_capital\",\n \"quote_signature_required\": false,\n \"receivable_edit_flow\": \"compliant\",\n \"reminder\": {\n \"enabled\": true\n },\n \"tax_inclusive_discount_mode\": \"exclusive\",\n \"tax_mode\": \"exclusive\"\n}"
response = http.request(request)
puts response.read_body{
"accounting": {
"ledger_account_ids": {
"payments": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"products": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"tax_ids": {
"deductions": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
},
"allow_purchase_order_autolinking": true,
"currency": {
"exchange_rates": [
{
"rate": 123
}
]
},
"default_bank_account": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"document_ids": {
"document_type_prefix": {
"credit_note": "CN",
"delivery_note": "DN",
"invoice": "INV",
"purchase_order": "PO",
"quote": "Q"
},
"include_date": false,
"min_digits": 5,
"prefix": "<string>",
"separator": "-"
},
"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
}
},
"generate_paid_invoice_pdf": false,
"mail": {
"reply_to": [
"support@example.com"
]
},
"payables_ocr_auto_tagging": [
{
"enabled": true,
"keywords": [
"<string>"
],
"tag_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"payables_skip_approval_flow": false,
"payment_priority": "working_capital",
"quote_signature_required": false,
"receivable_edit_flow": "compliant",
"reminder": {
"enabled": true
},
"tax_inclusive_discount_mode": "exclusive",
"tax_mode": "exclusive"
}{
"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
Path Parameters
A unique ID to specify the entity.
"ea837e28-509b-4b6a-a600-d54b6aa0b1f5"
Body
Show child attributes
Show child attributes
Automatically attempt to find a corresponding purchase order for all incoming payables.
Show child attributes
Show child attributes
The organization's single global default bank account. Clients use it to pre-fill the bank account field when creating receivables; it is not applied automatically on the server. Set to null to clear it.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Settings for rendering documents in PDF format.
Show child attributes
Show child attributes
This setting affects how PDF is generated for paid accounts receivable invoices. If set to true, once an invoice is fully paid its PDF version is updated to display the amount paid and the payment-related features are removed.
The PDF file gets regenerated at the moment when an invoice becomes paid. It is not issued as a separate document, and the original PDF invoice is no longer available.
This field is deprecated and will be replaced by document_rendering.invoice.generate_paid_invoice_pdf.
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 Email settings for the entity
Show child attributes
Show child attributes
Auto tagging settings for all incoming OCR payable documents.
Show child attributes
Show child attributes
If enabled, the approval policy will be skipped and the payable will be moved to waiting_to_be_paid status.
Payment preferences for entity to automate calculating suggested payment date based on payment terms and entity preferences.
working_capital, balanced, bottom_line Sets the default behavior of whether a signature is required to accept quotes.
compliant, partially_compliant, non_compliant Show child attributes
Show child attributes
Defines whether the amount discounts (for percentage discounts it does not matter) on tax inclusive invoices will be applied on amounts including tax or excluding tax.
exclusive, inclusive Defines whether the prices of products in receivables will already include tax or not.
exclusive, inclusive Response
Successful Response
Show child attributes
Show child attributes
Automatically attempt to find a corresponding purchase order for all incoming payables.
Show child attributes
Show child attributes
The organization's single global default bank account. Clients use it to pre-fill the bank account field when creating receivables; it is not applied automatically on the server. Set to null to clear it.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Settings for rendering documents in PDF format.
Show child attributes
Show child attributes
This setting affects how PDF is generated for paid accounts receivable invoices. If set to true, once an invoice is fully paid its PDF version is updated to display the amount paid and the payment-related features are removed.
The PDF file gets regenerated at the moment when an invoice becomes paid. It is not issued as a separate document, and the original PDF invoice is no longer available.
This field is deprecated and will be replaced by document_rendering.invoice.generate_paid_invoice_pdf.
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 Email settings for the entity
Show child attributes
Show child attributes
Auto tagging settings for all incoming OCR payable documents.
Show child attributes
Show child attributes
If enabled, the approval policy will be skipped and the payable will be moved to waiting_to_be_paid status.
Payment preferences for entity to automate calculating suggested payment date based on payment terms and entity preferences.
working_capital, balanced, bottom_line Sets the default behavior of whether a signature is required to accept quotes.
compliant, partially_compliant, non_compliant Show child attributes
Show child attributes
Defines whether the amount discounts (for percentage discounts it does not matter) on tax inclusive invoices will be applied on amounts including tax or excluding tax.
exclusive, inclusive Defines whether the prices of products in receivables will already include tax or not.
exclusive, inclusive Was this page helpful?