Skip to main content
This guide shows how to create and manage Holders — the customers or companies behind your accounts. It also links each holder to a ledger account with an Instrument. By the end, you have a holder registered in CRM and linked to a ledger account.

Prerequisites


Before you begin, make sure you meet the following requirements:
  • You completed the Midaz setup guide and all services run.
  • At least one Organization, Ledger, and Account already exist, as created in the Midaz Getting Started guide.
  • The Midaz ledger serves the holder and instrument endpoints. In Midaz v4, CRM is part of the ledger binary, so it needs no separate service or port.
Replace the placeholder IDs in the examples below with the real IDs from your environment.

CRM components


The CRM (Customer Relationship Management) component lets you register the people and companies behind your ledger accounts. It manages two core entities:
  • Holders: Individuals (NATURAL_PERSON) or companies (LEGAL_PERSON) that own accounts.
  • Instruments: The link between a holder and a specific ledger account, with optional banking details.
This model lets one holder own many accounts across different ledgers. It keeps identity and contact information in one place.

Step 1 — Create a holder


A Holder represents a person or company in your system. Create holders for individuals (NATURAL_PERSON) or companies (LEGAL_PERSON). Send a POST request with the holder’s type, name, document, contact, and address. For the full request and response schema, see Create a holder.
To register a company instead of an individual, set the type to LEGAL_PERSON:
Save the holderId from the response. You use it when you create instruments.

Once the holder exists, link it to a ledger account with an Instrument. An instrument connects a holder to one account inside a ledger, with optional banking details. For the full request and response schema, see Create an instrument.

Step 3 — Query and update your data


Once holders and instruments exist, you can retrieve, list, and update them.
The update changes only the fields you send. All other fields stay unchanged.

Step 4 — Clean up


To remove resources, delete instruments first, then holders.
Delete an instrument:
Delete a holder:

Summary


In this guide, you:
  1. Created a Holder to register an individual or company in CRM.
  2. Created an Instrument to link the holder to a ledger account.
  3. Queried and updated CRM data.
  4. Removed instruments and holders when no longer needed.

Next steps


CRM API reference

Explore advanced filtering, metadata queries, and all available endpoints.

Using CRM with Midaz Console

Manage holders through a graphical interface.