Skip to main content

Overview

Monzoh uses Pydantic models for type-safe data validation and serialization. All API responses are automatically parsed into these structured models, providing excellent IDE support and runtime validation.

Core Models

Account

Represents a Monzo bank account.
Account Types:
  • uk_retail - Personal current account
  • uk_retail_joint - Joint current account
  • uk_prepaid - Prepaid card (legacy)
Example:

Balance

Represents account balance information.
Example:

Transaction

Represents a financial transaction.
Example:

Merchant

Represents merchant information for transactions.

Pot

Represents a savings pot.
Example:

Attachment

Represents a file attachment.

Receipt

Represents detailed receipt information.

ReceiptItem

Represents an individual item on a receipt.

ReceiptTax

Represents tax information on a receipt.

Webhook

Represents a webhook registration.

WhoAmI

Represents authentication information.
Example:

OAuthToken

Represents OAuth2 token information.

Response Models

AccountsResponse

Container for accounts list response.

Usage Examples

Type Safety and Validation

Model Serialization

Custom Processing

Validation and Error Handling

Pydantic models provide automatic validation:

Working with Optional Fields

Many model fields are optional and may be None:
All models are fully typed and provide excellent IDE support with autocomplete, type checking, and inline documentation.