Get clearance
Reads one of the caller org's clearances, as it was decided.
GET /v1/principal/clearance/{id}
| Address | https://api.hanzo.ai/v1/principal/clearance/{id} |
| Method | GET |
| Operation | get_principal_clearance_by_id |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Reads one of the caller org's clearances, as it was decided. Any member of the paying org; another org's clearance is not found.
Request
1 field.
| Field | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | ID is the clearance, "clr_"-prefixed. |
Response
| Status | Body | Meaning |
|---|---|---|
200 | principal.Clearance | ok |
default | problem-details | refused |
200 body — 58 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
allowed | body | boolean | — | |
amount | body | string | — | Amount is the gross amount, U.S. dollars. |
category | body | string | — | Category is what is bought: services, attorney, rents, royalties, other or merchandise. |
decidedAt | body | integer (int64) | — | DecidedAt is when, unix seconds. |
facts_required | body | principal.Fact[] | — | |
facts_required[].blocks | body | boolean | — | Blocks is whether the payment waits on it. |
facts_required[].code | body | string | — | Code is the fact's stable name. |
facts_required[].question | body | string | — | Question is what must be answered. |
facts_required[].rule | body | principal.Rule | — | |
facts_required[].rule.code | body | string | — | Code is the rule's stable name, for a caller that branches on it. |
facts_required[].rule.reason | body | string | — | Reason is the rule, stated. |
id | body | string | — | ID is the clearance, "clr_"-prefixed. |
notice | body | string | — | Notice is what a clearance is and is not. |
payee | body | string | — | Payee is the org to be paid. |
payer | body | string | — | Payer is the caller's org. |
performed | body | string | — | Performed is where the service is performed, as stated. |
platform | body | boolean | — | Platform is whether the caller operates the payee's platform, as stated. |
rail | body | string | — | Rail is how it moves. |
reporting_obligations | body | principal.Obligation[] | — | |
reporting_obligations[].authority | body | string | — | Authority is who it is filed with. |
reporting_obligations[].code | body | string | — | Code is the obligation's stable name. |
reporting_obligations[].due | body | string | — | Due is when. |
reporting_obligations[].filer | body | string | — | Filer is the org that files it. |
reporting_obligations[].form | body | string | — | Form is what is filed. |
reporting_obligations[].jurisdiction | body | string | — | Jurisdiction is where, ISO 3166-1 alpha-2 or "EU". |
reporting_obligations[].rule | body | principal.Rule | — | |
reporting_obligations[].rule.code | body | string | — | Code is the rule's stable name, for a caller that branches on it. |
reporting_obligations[].rule.reason | body | string | — | Reason is the rule, stated. |
reporting_obligations[].when | body | string | — | When is the condition it is owed on, when it is owed on one. |
required_before_payment | body | principal.Step[] | — | |
required_before_payment[].code | body | string | — | Code is the step's stable name, for a caller that branches on it. |
required_before_payment[].rule | body | principal.Rule | — | |
required_before_payment[].rule.code | body | string | — | Code is the rule's stable name, for a caller that branches on it. |
required_before_payment[].rule.reason | body | string | — | Reason is the rule, stated. |
required_before_payment[].what | body | string | — | What must happen, in words. |
required_before_payment[].where | body | string | — | Where it is done, when it is done on this platform. |
required_before_payment[].who | body | string | — | Who does it: payer, payee, or "Hanzo platform reviewer". |
rules | body | principal.Decided[] | — | |
rules[].field | body | string | — | |
rules[].rule | body | principal.Rule | — | |
rules[].rule.code | body | string | — | Code is the rule's stable name, for a caller that branches on it. |
rules[].rule.reason | body | string | — | Reason is the rule, stated. |
settlement_methods | body | principal.Method[] | — | |
settlement_methods[].net | body | string | — | Net is what the payee receives, U.S. dollars. |
settlement_methods[].rail | body | string | — | Rail is the rail: ledger or chain. |
settlement_methods[].rule | body | principal.Rule | — | |
settlement_methods[].rule.code | body | string | — | Code is the rule's stable name, for a caller that branches on it. |
settlement_methods[].rule.reason | body | string | — | Reason is the rule, stated. |
settlement_methods[].withheld | body | string | — | Withheld is what the payer keeps back and deposits itself, U.S. dollars. |
status | body | string | — | |
withholding | body | principal.Withholding | — | |
withholding.amount | body | string | — | Amount is the amount to withhold, U.S. dollars; empty when the rate is. |
withholding.chapter | body | string | — | Chapter is "3" (IRC chapter 3, a payment to a foreign person) or "backup" (IRC §3406), and empty when nothing is withheld or it cannot yet be decided. |
withholding.rate | body | string | — | Rate is the rate in percent: "30", "24", "10", "0". |
withholding.reason | body | string | — | Reason says why, in words. |
withholding.rule | body | principal.Rule | — | |
withholding.rule.code | body | string | — | Code is the rule's stable name, for a caller that branches on it. |
withholding.rule.reason | body | string | — | Reason is the rule, stated. |
Failure carries the platform error shape — see Errors.
Examples
hanzo has no subcommand for this operation — the CLI serves only what cloud's live route table confirms. Use HTTP or an SDK.
import { Configuration, PrincipalApi } from 'hanzoai';
const api = new PrincipalApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getPrincipalClearanceById({ id: 'id' });from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import PrincipalApi
client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = PrincipalApi(client).get_principal_clearance_by_id(id='id')cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)
resp, _, err := client.PrincipalAPI.GetPrincipalClearanceById(context.Background()).Execute()
if err != nil {
return err
}use hanzo_client::apis::{configuration::Configuration, principal_api};
let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();
let result = principal_api::get_principal_clearance_by_id(&cfg, Default::default()).await?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.PrincipalApi;
ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));
var result = new PrincipalApi(client).getPrincipalClearanceById();The method above is the one at the current release of the document. [email protected] (npm) and [email protected] (PyPI) were generated from an earlier release, where this operation carried a different id, so it spells the method differently — regenerating the clients is what makes the two agree. SDKs →
curl https://api.hanzo.ai/v1/principal/clearance/<id> \
-H "Authorization: Bearer $HANZO_API_KEY"MCP declares no tool for principal — tools/list on https://api.hanzo.ai/v1/mcp names the products it does reach. Use HTTP or an SDK.
How is this guide?