Clients workflow
In FinSync, a client is not only a person or company. It is the business entity that owns balances and participates in operations. The application wiki distinguishes two client categories that matter when you automate against the API:- Internal clients (
type = 0): your owncajas, wallets, banks, or liquid accounts. - External clients (
type = 1): counterparties tracked ascuentas corrientes.
GET /api/clients already returns both types when they exist, together with their accounts. An empty { data: [], count: 0 } means the company has no clients yet — it is not an internal-type filter.
List clients
UseGET /api/clients to retrieve company clients together with their related accounts.
page(default1)pageSize(default50, max100)descriptiontype—0for internal cajas,1for external counterparties. Omit to return both.
- Client metadata such as
id,name,description, andtype - The client’s associated
accounts - Account-level balances and currencies
client_tags— company labels assigned to the client (join rows with a nestedtag). See Client tags.
UP/DOWN or same-currency OTHER legs:
List accounts
GET /api/accounts is a thin company-scoped view of the same account records embedded on GET /api/clients. Use it when you already know you need internal_account_id values.
client_id, type (0 or 1).
Interpret balances correctly
The same numeric balance means different things depending on the client type:- Internal client (
type = 0): a positive balance means the company has funds available in that wallet or bank account. A negative balance means a deficit or overdraft. - External client (
type = 1): a positive balance means the company owes money to that client. A negative balance means that client owes money to the company.
Inspect one client
UseGET /api/clients/{id} when you need the detailed record for one client, including its accounts (internal or external).
This is the best follow-up call after listing clients when your workflow needs to:
- choose the correct account by currency
- inspect the latest stored balance per account
- confirm whether you are working with an internal or external counterparty
Create a client
UsePOST /api/clients to create a client for the company tied to the API key.
- Omit
typeor sendtype: 1for an externalcuenta corriente(existing integrator default). - Send
type: 0for an internal caja. This does not create a cuenta corriente or portal access.
tag_ids assigns existing company tags on create (dashboard create). Unknown IDs return 404 and no client is created. To replace tags later, use PUT /api/clients/{id}/tags with the full tag_ids set. See Client tags.
The endpoint does not create portal access for the client. It only creates the accounting record.
Create an account
UsePOST /api/accounts to add an account on an existing client. Reuse currency_name values the company already uses (USD, ARS, …). This endpoint does not create currencies.
id, client_id, name, currency_name, balance, …). For external clients, if an account already exists for that currency, the existing account is returned.
Typical integration flow
- List clients with
GET /api/clients(optionally?type=0for cajas). - If the company has no internals yet, create a caja with
POST /api/clientsand"type": 0. - Add accounts with
POST /api/accounts(client_id,name,currency_name). - Fetch the full record with
GET /api/clients/{id}orGET /api/accounts?client_id=…to pickinternal_account_id. - Reuse those IDs in operation workflows such as
UP,DOWN,OTHER, orEXCHANGE.
Related endpoints
GET /api/clientsPOST /api/clientsGET /api/clients/{id}PUT /api/clients/{id}/tagsGET /api/tagsPOST /api/tagsGET /api/accountsPOST /api/accounts