Accounts

Accounts service

Provides high-level CRUD operations for managing accounts through the Norman authentication service.

This class communicates with the authenticate/accounts endpoints and exposes coroutine methods for creating, retrieving, updating, and replacing accounts.

create_accounts(token, accounts) async

Coroutine

Create one or more new accounts.

Parameters
  • token (Sensitive[str]) — Authentication token authorizing the request.

  • accounts (List[Account]) — List of Account objects to be created.

Response Structure
  • response (List[Account]) — List of newly created accounts, validated against the Account schema.

create_accounts(token, accounts) async

Coroutine

Create one or more new accounts.

Parameters
  • token (Sensitive[str]) — Authentication token authorizing the request.

  • accounts (List[Account]) — List of Account objects to be created.

Response Structure
  • response (List[Account]) — List of newly created accounts, validated against the Account schema.

get_accounts(token, constraints=None) async

Coroutine

Retrieve existing accounts that match the provided query constraints.

Parameters
  • token (Sensitive[str]) — Authentication token authorizing the request.

  • constraints (Optional[QueryConstraints]) — Optional filtering and pagination constraints for narrowing down results.

Response Structure
  • response (dict[str, Account]) — Dictionary mapping account IDs to their corresponding Account objects.

replace_accounts(token, accounts) async

Coroutine

Replace all existing accounts with a new list.

This operation overwrites existing records and is typically used for synchronization or bulk migration scenarios.

Parameters
  • token (Sensitive[str]) — Authentication token authorizing the request.

  • accounts (List[Account]) — New list of accounts that should replace the existing ones.

Response Structure
  • response (int) — The number of entities modified or replaced.

update_accounts(token, account, constraints=None) async

Coroutine

Update one or more existing accounts that match given query constraints.

Parameters
  • token (Sensitive[str]) — Authentication token authorizing the request.

  • account (Account.UpdateSchema) — Partial account update schema defining fields to modify.

  • constraints (Optional[QueryConstraints]) — Conditions for selecting which accounts to update.

Response Structure
  • response (int) — Number of accounts affected by the update operation.

·

©

2026

·

©

2026