Organization
The profile of the token's organization, at the top of the hierarchy: it holds for every workspace. The resource is singular — there is no list and no id, because a token always reaches exactly one organization, its own.
| Command | HTTP | Description |
|---|---|---|
organization get | GET /v1/organization | Get the organization of the token |
organization update | PATCH /v1/organization | Update the organization profile |
Both routes are organization-level: they take no X-Workspace-Id, so KOBANA_WORKSPACE_ID is not needed here. get needs the finance/settings scope with read access; update needs write access and, since the profile holds for every workspace, the organization owner or access to all of them.
update only changes trade_name, website, addresses and custom_metadata. Name, e-mail and phone come from the Kobana Account and the fiscal identity (document_type, document_number) does not change through the API: sending any of them — or any unknown key — is a 422, and a commercial field (courtesy, entitlements…) is a 403. custom_metadata: null keeps the stored value.
Examples
--params carries query and path parameters (id, page, filters); --json carries the request body; --fields limits which fields come back — worth using on every list/get to save context. See Global flags for the full reference.
# Get the organization of the token
kobana finance organization get \
--fields "id,name,trade_name,document_number,website,created_at"
# Update the organization profile
kobana finance organization update \
--json '{"trade_name": "Acme", "website": "https://acme.com.br", "custom_metadata": {"crm_id": "CRM_ID"}}'
Next steps
- Authentication — the
finance/settingsscope and the workspace of the other routes. - Schema introspection — every parameter this resource accepts.