Skip to main content

Overview

Tesouro’s organization settings are a way to customize the behavior of certain functionality for your organizations. The organization settings API provides functionality for managing and configuring settings specific to organizations within the Tesouro platform. They allow you to personalize and customize certain aspects of your organizations’ integration. Some of these customizations include enabling payment and overdue reminders, customizing document number formatting, setting default currencies and currency exchange rates, and other organization-specific configurations.

Roles and permissions

To get or update organization settings using an organization user token, this organization user must have a role with the read and update permissions for the entity resource. If using a partner-level token, no special permissions are needed.

Get organization settings

To retrieve settings for an organization, send a GET request to the /entities/{entity_id}/settings endpoint:
curl -X GET 'https://api.sandbox.tesouro.com/v1/entities/5b031d0c...44df31ebf0db/settings' \
     -H 'X-Finops-Version: 2025-06-23' \
     -H 'Authorization: Bearer ACCESS_TOKEN'
A successful request returns the current settings for the organization provided.
{
  ...
  "currency": {},
  "default_role": {},
  "document_ids": {
    "include_date": false,
    "prefix": "string",
    "separator": "-",
    "min_digits": 5,
    "document_type_prefix": {
      "quote": "Q",
      "invoice": "INV",
      "credit_note": "CN",
      "purchase_order": "PO"
    },
  },
  ...
  "language": "en",
  "payment_priority": "working_capital",
  ...
  "receivable_edit_flow": "compliant",
  "reminder": {
    "enabled": true
  },
  "quote_signature_required": false,
  ...
}

Update organization settings

To update the details of an organization, make a PATCH request to the /organizations/{organization_id}/settings endpoint. The following snippet shows an example of the payload for the PATCH /entities/{entity_id}/settings endpoint that enables payment reminders for organization invoices and updates the document ID format for invoices and quotes.
curl -X PATCH 'https://api.sandbox.tesouro.com/v1/entities/5b031d0c...44df31ebf0db/settings' \
     -H 'X-Finops-Version: 2025-06-23' \
     -H 'Authorization: Bearer ACCESS_TOKEN' \
     -H 'Content-Type: application/json' \
     -d '{
       "reminder": {
         "enabled": true
       },
       "quote_signature_required": true,
       "language": "fr",
       "document_ids": {
         "include_date": true,
         "min_digits": 4,
         "document_type_prefix": {
           "invoice": "IN"
         }
       }
     }'
The successful request returns the complete organization settings object with the updated fields. The language field on the organization settings object determines the language of the organization’s PDFs.