Step by step
1
Choose where the partner acts
Pick the narrowest scope that covers what the partner needs. Each row is a restriction you can add. The API field is the
field of a scope entry; the Console shows the name in the first column.The scope catalog lists every Midaz restriction, including the ones not in this table. Read it with Retrieve a product’s scope catalog for
midaz.Some rules apply to every scope:- A request that does not name an item of a restricted type is refused when it acts on what that restriction confines. For example, a partner restricted to some ledgers cannot list all the ledgers of its organization. A request outside what the restriction confines only needs the organization.
- A request that lists several values, such as several aliases in a body or a query, is refused when any one of them is outside the scope.
- Routes that act on the whole tenant, such as listing organizations or reading tenant settings, are refused to every partner.
2
Give the partner its permissions and scope
Create the partner, or change it, in the Console or with the Identity API. The product slug is
midaz.- Add the scope entry for the organization, with exactly one value. Without it, Access Manager refuses the partner with
400andIDE-0001. With two organizations, it refuses withIDE-0002. - Add the other restrictions you chose in step 1.
- Check the resources and actions. The most you can give is what the
midaz-editor-rolerole holds in your tenant. Above that, Access Manager refuses withIDE-1043.
- A write that acts on the whole tenant, such as creating an organization, is never given to a partner.
- A write that acts above the partner’s scope is refused. For example, a partner restricted to one ledger cannot receive the right to create, change, or delete ledgers, holders, or operation and transaction routes: those writes act on the whole organization.
- Both refusals answer
400withIDE-1056. The Console marks the line Outside the scope.
400 and IDE-1052. Access Manager does not check that a route ID belongs to the partner’s ledger: the partner reads every route whose ID you list. List only the routes of its own ledgers.Do not give transactions with post to a partner restricted only by portfolio, segment, or holder. Access Manager accepts it, but every transaction of that partner is refused.3
Create its Midaz application
Create the partner’s application with the product
midaz. See Create the partner’s applications in the API guide, or in the Console. Send the client ID and the client secret to the partner through a secure channel.4
Tell the partner how to name its items
The partner names its items in the paths, queries, and bodies that Midaz already has. Nothing extra is sent. These cases need attention:
- Accounts filtered by portfolio, segment, or holder. Send
portfolio_id,segment_id, orholder_idin the query of the account list. - Accounts of a holder. Send
ledger_idin the query, with a ledger inside the scope. The answer holds only that ledger’s accounts. - New accounts. A partner restricted by portfolio or segment sends its own
portfolioIdorsegmentIdin the body. A partner restricted by account sends one of its own accounts inparentAccountId. - Transactions on the
/v2/transactionsroutes (direct,hold,block,unblock, andbatch). Every debit and every credit names an organization and a ledger inside the scope. A partner restricted by alias can use only its own aliases on both sides, so it moves money only between its own accounts. - Transactions on the
/v1ledger routes (json,outflow,annotation,block, andunblock). The source aliases insend.source.from[].accountAliasmust be the partner’s own.
inflow on /v1, and commit, cancel, revert, change, read by ID, or list. It can create a hold, but it cannot commit or cancel it. A partner restricted by account ID cannot create transactions on the /v1 routes. To let it move money from specific accounts, restrict it by alias.5
Confirm that it works
This check assumes the partner has the Send the same request with a ledger of the same organization that is outside the scope. The answer is
accounts resource with the get action on Midaz, and a scope restricted to one organization and one or more of its ledgers. Use the partner’s credential. List the accounts of a ledger inside its scope. The answer is 200:403 with code AUT-1020.If something fails
The answer does not say whether the permissions or the scope refused the request. This is on purpose: a partner cannot use a refusal to learn which items exist outside its scope.
For every other code, see the Midaz error list. For the refusals when you create or change a partner, see Error codes in the API guide.

