> ## Documentation Index
> Fetch the complete documentation index at: https://docs.range.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Workspace data model

> Understand parties, counterparties, account ownership, groups, connections, and identifiers in a Range workspace.

Use the workspace model to decide which record to create and which ID to retain. For credentials, follow the [shared quickstart](https://docs.range.org/introduction/quickstart.md); for synthetic examples, use [test inputs](https://docs.range.org/resources/test-inputs.md).

## Parties and counterparties

`GET /v2/parties` reads the workspace entity register. Its `types` array distinguishes:

| Type | Role |
| - | - |
| `self` | The workspace's own entity, exactly one per workspace. |
| `client` | A client entity. |
| `counterparty` | An entity recorded as a counterparty. |

A non-self entity can be both `client` and `counterparty`. The counterparty API uses the same underlying entity register. Its singular `type`, such as `vendor` or `customer`, describes a business relationship and is different from the register's `types` array. Avoid creating the same organization once through each API.

`GET /v2/counterparties` excludes `self` and returns summaries. Addresses require `include_addresses=true`; the [counterparty onboarding guide](https://docs.range.org/platform-api/guides/onboard-a-counterparty.md) covers addresses and the full detail record.

The Data API's `/v2/entities` is public labeled-organization discovery. Its results are distinct from your workspace's `/v2/parties` register.

## Accounts and groups

Persisted accounts have `entity_id` for their owner and an inline `entity` summary. `GET /v2/accounts` lists workspace accounts; `GET /v2/parties/{id}/accounts` restricts the list to one entity.

`PUT /v2/parties/{id}/accounts` changes ownership. An `add` operation moves an account to that entity; a `remove` operation moves it back to `self`. Removing the attachment does not delete the account. Retain the account's returned ID and read it back to verify its `entity_id`.

Groups organize accounts. `GET /v2/groups` lists those groups, and an account's `groups` array records its memberships. Membership and entity ownership are separate relationships.

## Connections

A connection records an integration source and its configuration. An account linked to one carries `details.connection_id` and `details.connection_object_id`: the Range connection ID and the provider's object identifier. Standalone onchain accounts do not need connection details.

Connection `kind` distinguishes `account`, `books`, `ledger`, `risk`, and `travel_rule`. Only the account family is an account source. See [Connections and providers](https://docs.range.org/platform-api/product-info/connections-and-providers.md) for capabilities and verification evidence.

## Identifiers

| Identifier | Use |
| - | - |
| Party or counterparty `id` | Address an entity in the workspace register. |
| Account `id`, transaction `account_id` | Join a transaction to its workspace account. |
| Account `entity_id` | Join an account to its owning party. |
| Group `id` | Identify an organizational group. |
| `details.connection_id` | Identify the saved Range connection. |
| `details.connection_object_id` | Identify an object inside that provider connection; keep its connection context. |
| Transaction `id` and `transaction_id` on persisted reads | Identify the stored transaction row. |
| `provider_transaction_id` | Retain the provider-native event identity. |
| `hash` | A public transaction hash when available; do not assume every provider event has one. |

Use returned identifiers rather than names or example UUIDs. For event kinds, decimal amounts, directions, and freshness, see [Working with responses](https://docs.range.org/platform-api/product-info/working-with-responses.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.