Skip to content

models

konigle.models

Pydantic models for the Konigle SDK.

This module exports all model classes organized by resource category. Models are grouped into core, website, commerce, communication, and marketing modules.

Audience

Bases: BaseAudience, TimestampedResource

Contact segment definition based on tags for campaign targeting.

Audiences enable marketers to create targeted segments of contacts based on tags for use in email campaigns and other marketing activities.

code = Field(title='Audience Code', description='Unique code for the audience (slug format).', max_length=100, pattern='^[a-z0-9]+(?:-[a-z0-9]+)*$') class-attribute instance-attribute

Unique code for the audience.

AudienceCreate

Bases: BaseAudience, CreateModel

Model for creating a new audience.

code = Field(default=None, title='Audience Code', description='Unique code for the audience (slug format).', max_length=100, pattern='^[a-z0-9]+(?:-[a-z0-9]+)*$') class-attribute instance-attribute

Unique code for the audience. If not provided, it will be auto-generated based on the name.

AudienceUpdate

Bases: UpdateModel

Model for updating an existing audience.

code = Field(default=None, title='Audience Code', description='Unique code for the audience (slug format).', max_length=100, pattern='^[a-z0-9]+(?:-[a-z0-9]+)*$') class-attribute instance-attribute

Unique code for the audience.

description = Field(default=None, title='Description', description='Description of the audience segment.') class-attribute instance-attribute

Description of the audience segment.

name = Field(default=None, title='Audience Name', description='Name of the audience segment.', max_length=255) class-attribute instance-attribute

Name of the audience segment.

tags = Field(default=None, title='Tags', description='Tags to filter contacts for this audience.') class-attribute instance-attribute

Tags to filter contacts for this audience.

Backup

Bases: Resource

Backup resource model.

backup_type = Field(..., title='Backup Type', description='Type of resource being backed up') class-attribute instance-attribute

Type of resource being backed up.

created_at = Field(..., title='Created At', description='Creation timestamp.') class-attribute instance-attribute

Creation timestamp.

description = Field(default='', max_length=255, title='Description', description="Optional user-provided description at backup time. Can be used to capture additional context, e.g. 'before major redesign' or 'before editing product description'") class-attribute instance-attribute

Optional user-provided description of the backup.

error_message = Field(default='', title='Error Message', description='Error message if status is FAILED') class-attribute instance-attribute

Error message if status is FAILED.

file_size_bytes = Field(default=None, title='File Size', description="Size of the backup file in bytes. Can be null if the file hasn't been created yet") class-attribute instance-attribute

Size of the backup file in bytes.

kind = Field(..., title='Kind', description='Type of backup. Transient backups are created during editing flow/AI chat and normally restored during the same session. Durable backups are meant for long term storage and can be restored weeks or months later') class-attribute instance-attribute

Type of backup - transient or durable.

metadata = Field(default_factory=dict, title='Metadata', description='Additional metadata about the backup that might be useful for display, searching, or restoration logic') class-attribute instance-attribute

Additional metadata about the backup.

site = Field(..., title='Site ID', description='ID of the site this backup belongs to') class-attribute instance-attribute

ID of the site this backup belongs to.

status = Field(..., title='Status', description='Current status of the backup') class-attribute instance-attribute

Current status of the backup.

target_description = Field(default='', max_length=255, title='Target Description', description='Human readable description of the target. Can be used to store page name, pathname etc.') class-attribute instance-attribute

Human readable description of the target.

target_id = Field(..., max_length=64, title='Target ID', description="Page ID, Blog ID, Folder ID, Product ID etc. NULL for site-level backups like site_foundation that aren't tied to a specific page or folder") class-attribute instance-attribute

ID of the target resource. NULL for site-level backups.

trigger = Field(..., title='Trigger', description='What triggered the backup creation') class-attribute instance-attribute

What triggered the backup creation.

BackupCreate

Bases: CreateModel

Model for creating a new backup.

Contains fields required for backup creation.

backup_type = Field(..., title='Backup Type', description='Type of resource being backed up') class-attribute instance-attribute

Type of resource being backed up.

description = Field(default='', max_length=255, title='Description', description='Optional user-provided description of the backup. Can be used to capture additional context') class-attribute instance-attribute

Optional user-provided description of the backup.

target_id = Field(default=None, max_length=64, title='Target ID', description='ID of the target resource (Page, Folder, Blog, Product). NULL for site-level backups like site_foundation or site_template') class-attribute instance-attribute

ID of the target resource. NULL for site-level backups.

trigger = Field(..., title='Trigger', description='What triggered the backup creation') class-attribute instance-attribute

What triggered the backup creation.

Blog

Bases: BaseBlog, TimestampedResource

Blog post resource model.

Represents a blog post with content, SEO metadata, and publication status.

contributors = Field(default_factory=list, title='Contributors', description='List of contributors for the blog post') class-attribute instance-attribute

List of contributors for the blog post.

pathname = Field(default=None, title='Pathname', description='Full pathname of the blog post') class-attribute instance-attribute

Full pathname of the blog post.

preview_url = Field(default=None, title='Preview URL', description='Preview URL of the blog post') class-attribute instance-attribute

Preview URL of the blog post.

published = Field(default=False, title='Published', description='Whether the blog post is published') class-attribute instance-attribute

Whether the blog post is published.

published_at = Field(None, title='Published At', description='Date and time when the blog post was published') class-attribute instance-attribute

Date and time when the blog post was published.

reviewers = Field(default_factory=list, title='Reviewers', description='List of reviewers for the blog post') class-attribute instance-attribute

List of reviewers for the blog post.

url = Field(default=None, title='URL', description='Public URL of the blog post') class-attribute instance-attribute

Public URL of the blog post. Results in 404 if the blog is not published.

change_handle(new_handle, redirect=False)

Change the handle of the blog post.

PARAMETER DESCRIPTION
new_handle

The new handle to set for the blog post.

TYPE: str

redirect

Whether to create a redirect from the old handle.

TYPE: bool DEFAULT: False

Raises: ValueError: If the new handle is invalid.

publish()

Publish the blog post.

unpublish()

Unpublish the blog post.

BlogCreate

Bases: BaseBlog, CreateModel

Model for creating a new blog post.

Contains all required and optional fields for blog post creation.

handle = Field(default=None, max_length=255, title='Handle', description='Blog handle that is part of the URL') class-attribute instance-attribute

Blog handle that is part of the URL.

BlogUpdate

Bases: UpdateModel

Model for updating an existing blog post.

All fields are optional for partial updates.

author = Field(default=None, title='Author ID', description='ID of the primary author of the blog post') class-attribute instance-attribute

ID of the primary author of the blog post.

content = Field(default=None, title='Content', description='Rich text blocks for the blog post in EditorJS format') class-attribute instance-attribute

Rich text blocks for the blog post in EditorJS format.

contributor_ids = Field(default=None, title='Contributor IDs', description='List of contributor IDs for the page') class-attribute instance-attribute

List of contributor IDs for the page.

exclude_from_sitemap = Field(default=None, title='Exclude From Sitemap', description='Whether the blog post is excluded from sitemap') class-attribute instance-attribute

Whether the blog post is excluded from sitemap.

json_ld = Field(default=None, title='JSON-LD', description='Manual override for JSON-LD structured data') class-attribute instance-attribute

Manual override for JSON-LD structured data.

name = Field(default=None, max_length=255, title='Name', description='Name for display and search purposes') class-attribute instance-attribute

Name for display and search purposes.

published_at = Field(default=None, title='Published At', description='Date and time when the blog post was published') class-attribute instance-attribute

Date and time when the blog post was published.

reviewer_ids = Field(default=None, title='Reviewer IDs', description='List of reviewer IDs for the blog post') class-attribute instance-attribute

List of reviewer IDs for the blog post.

seo_meta = Field(default=None, title='SEO Meta', description='SEO meta information for the blog post') class-attribute instance-attribute

SEO meta information for the blog post.

show_author = Field(default=None, title='Show Author', description='Whether to show contributors and reviewers on the page') class-attribute instance-attribute

Whether to show contributors and reviewers on the page.

subtitle = Field(default=None, max_length=255, title='Subtitle', description='Subtitle of the blog post') class-attribute instance-attribute

Subtitle of the blog post.

summary = Field(default=None, title='Summary', description='Blog summary - used for SEO meta description') class-attribute instance-attribute

Blog summary - used for SEO meta description.

template = Field(default=None, title='Template ID', description='ID of the blog page design template.') class-attribute instance-attribute

ID of the blog page design template.

title = Field(default=None, max_length=255, title='Title', description='User facing title of the blog post') class-attribute instance-attribute

User facing title of the blog post.

Campaign

Bases: BaseCampaign, TimestampedResource

Campaign configuration for sending messages across multiple channels.

Currently supports email campaigns. Designed to support additional channels (WhatsApp, SMS, etc.) in the future.

execution = Field(default=None, title='Execution Details', description='Execution tracking details (available in detail view).') class-attribute instance-attribute

Execution tracking details (available in detail view).

ltv = Field(default=None, title='Lifetime Value', description='Lifetime value (revenue) generated by this campaign.', max_digits=12, decimal_places=2) class-attribute instance-attribute

Lifetime value (revenue) generated by this campaign.

ltv_currency = Field(default='USD', title='LTV Currency', description='Currency code for lifetime value (ISO 4217).', max_length=3) class-attribute instance-attribute

Currency code for lifetime value (ISO 4217).

status = Field(default='draft', title='Status', description='Current status of the campaign.') class-attribute instance-attribute

Current status of the campaign.

CampaignAddLTV

Bases: BaseModel

Model for adding LTV to a campaign.

Records revenue generated from a specific contact purchase and updates both campaign and contact LTV.

contact_email = Field(default=None, title='Contact Email', description='Email address of the contact who made the purchase. Optional if tracking aggregate campaign revenue.') class-attribute instance-attribute

Email address of the contact who made the purchase.

currency = Field(title='Currency', description='Currency code (ISO 4217) for the LTV value.', max_length=3) class-attribute instance-attribute

Currency code (ISO 4217) for the LTV value.

value = Field(title='LTV Value', description='Value to add to campaign and contact LTV (positive).', gt=0, max_digits=19, decimal_places=2) class-attribute instance-attribute

Value to add to campaign and contact LTV (must be positive).

CampaignCreate

Bases: BaseCampaign, CreateModel

Model for creating a new campaign.

CampaignCreateEmail

Bases: BaseModel

Model for creating an email campaign with audience and template.

This is a hybrid API that creates a campaign along with its associated audience and email template in a single operation.

audience_name = Field(default='', title='Audience Name', description='Name for audience (defaults to campaign_name).', max_length=255) class-attribute instance-attribute

Name for audience (defaults to campaign_name).

body_html = Field(title='HTML Body', description='HTML body content.') class-attribute instance-attribute

HTML body content.

body_text = Field(default='', title='Text Body', description='Plain text body content.') class-attribute instance-attribute

Plain text body content.

campaign_name = Field(title='Campaign Name', description='Name of the campaign.', max_length=255) class-attribute instance-attribute

Name of the campaign.

contact_tags = Field(title='Contact Tags', description='List of tags to filter contacts for audience.') class-attribute instance-attribute

List of tags to filter contacts for audience.

description = Field(default='', title='Description', description='Campaign description.') class-attribute instance-attribute

Campaign description.

email_channel = Field(title='Email Channel Code', description='Code of email channel to use.', max_length=50) class-attribute instance-attribute

Code of email channel to use.

execution_duration_minutes = Field(default=None, title='Execution Duration (Minutes)', description='Duration in minutes to spread campaign sends.', ge=1, le=1440) class-attribute instance-attribute

Duration in minutes to spread campaign sends.

from_email = Field(default='', title='From Email', description='Override from email.') class-attribute instance-attribute

Override from email.

from_name = Field(default='', title='From Name', description='Override from name. Required if account does not have default.', max_length=255) class-attribute instance-attribute

Override from name. Required if account does not have default.

reply_to_email = Field(default='', title='Reply-To Email', description='Override reply-to email. Required if account does not have default.') class-attribute instance-attribute

Override reply-to email. Required if account does not have default.

reply_to_name = Field(default='', title='Reply-To Name', description='Override reply-to name. Required if account does not have default.', max_length=255) class-attribute instance-attribute

Override reply-to name. Required if account does not have default.

scheduled_at = Field(default=None, title='Scheduled At', description='When to send the campaign.') class-attribute instance-attribute

When to send the campaign.

subject = Field(title='Email Subject', description='Email subject line.', max_length=255) class-attribute instance-attribute

Email subject line.

template_name = Field(default='', title='Template Name', description='Name for email template (defaults to campaign_name).', max_length=255) class-attribute instance-attribute

Name for email template (defaults to campaign_name).

utm_code = Field(default='', title='UTM Code', description='UTM campaign code for tracking.', max_length=100) class-attribute instance-attribute

UTM campaign code for tracking.

CampaignExecution

Bases: BaseModel

Track execution of a campaign with process and status.

Provides real-time tracking of campaign delivery progress, including send rates, delivery metrics, and error tracking.

cancelled_at = Field(default=None, title='Cancelled At', description='When the execution was cancelled (if applicable).') class-attribute instance-attribute

When the execution was cancelled (if applicable).

completed_at = Field(default=None, title='Completed At', description='When execution completed.') class-attribute instance-attribute

When execution completed.

error_message = Field(default='', title='Error Message', description='Error message if execution failed.') class-attribute instance-attribute

Error message if execution failed.

expected_completion_at = Field(default=None, title='Expected Completion At', description='Expected completion time based on execution duration.') class-attribute instance-attribute

Expected completion time based on execution duration.

last_run_at = Field(default=None, title='Last Run At', description='When the last run completed for calculating send rate.') class-attribute instance-attribute

When the last run completed for calculating send rate.

next_run_at = Field(default=None, title='Next Run At', description='When to run the next execution (for HALTED executions).') class-attribute instance-attribute

When to run the next execution (for HALTED executions).

paused_at = Field(default=None, title='Paused At', description='When the execution was paused (if applicable).') class-attribute instance-attribute

When the execution was paused (if applicable).

resumed_at = Field(default=None, title='Resumed At', description='When the execution was last resumed after being paused.') class-attribute instance-attribute

When the execution was last resumed after being paused.

started_at = Field(default=None, title='Started At', description='When execution started.') class-attribute instance-attribute

When execution started.

status = Field(default='pending', title='Execution Status', description='Current execution status.') class-attribute instance-attribute

Current execution status.

total_bounced = Field(default=0, title='Total Bounced', description='Number of messages bounced (from events).') class-attribute instance-attribute

Number of messages bounced (from events).

total_clicked = Field(default=None, title='Total Clicked', description='Number of messages with clicks (from events).') class-attribute instance-attribute

Number of messages with clicks (from events). NULL if not tracked.

total_complained = Field(default=0, title='Total Complained', description='Number of spam complaints (from events).') class-attribute instance-attribute

Number of spam complaints (from events).

total_contacts = Field(default=0, title='Total Contacts', description='Total number of contacts to send to.') class-attribute instance-attribute

Total number of contacts to send to.

total_delivered = Field(default=0, title='Total Delivered', description='Number of messages delivered (from events).') class-attribute instance-attribute

Number of messages delivered (from events).

total_failed = Field(default=0, title='Total Failed', description='Number of messages that failed to send.') class-attribute instance-attribute

Number of messages that failed to send.

total_opened = Field(default=None, title='Total Opened', description='Number of messages opened (from events).') class-attribute instance-attribute

Number of messages opened (from events). NULL if not tracked.

total_sent = Field(default=0, title='Total Sent', description='Number of messages successfully sent.') class-attribute instance-attribute

Number of messages successfully sent.

CampaignUpdate

Bases: UpdateModel

Model for updating an existing campaign.

Note: ltv and ltv_currency are managed automatically by the system based on campaign performance and cannot be updated directly. Status transitions are handled by separate action endpoints.

Campaign can only be updated when in draft and scheduled states. This does not hold for name and description which can be updated at any time.

audience = Field(default=None, title='Audience ID', description='Target audience segment for this campaign.') class-attribute instance-attribute

Target audience segment for this campaign.

description = Field(default=None, title='Description', description='Description of the campaign purpose.') class-attribute instance-attribute

Description of the campaign purpose.

email_channel = Field(default=None, title='Email Channel ID', description='Channel to use for sending emails.') class-attribute instance-attribute

Channel to use for sending emails.

email_template = Field(default=None, title='Email Template ID', description='Email template to use.') class-attribute instance-attribute

Email template to use.

execution_duration_minutes = Field(default=None, title='Execution Duration (Minutes)', description='Duration in minutes over which to spread campaign sends (max 1440).', ge=1, le=1440) class-attribute instance-attribute

Duration in minutes over which to spread campaign sends.

from_email = Field(default=None, title='From Email', description='Override from email.') class-attribute instance-attribute

Override from email.

from_name = Field(default=None, title='From Name', description='Override from name.', max_length=255) class-attribute instance-attribute

Override from name.

name = Field(default=None, title='Campaign Name', description='Name of the campaign.', max_length=255) class-attribute instance-attribute

Name of the campaign.

reply_to_email = Field(default=None, title='Reply-To Email', description='Override reply-to email.') class-attribute instance-attribute

Override reply-to email.

reply_to_name = Field(default=None, title='Reply-To Name', description='Override reply-to name.', max_length=255) class-attribute instance-attribute

Override reply-to name.

scheduled_at = Field(default=None, title='Scheduled At', description='When to send the campaign.') class-attribute instance-attribute

When to send the campaign.

utm_code = Field(default=None, title='UTM Code', description='UTM campaign code for tracking.', max_length=100) class-attribute instance-attribute

UTM campaign code for tracking.

Component

Bases: BaseComponent, TimestampedResource

Component resource model.

Represents a reusable component for building landing pages and templates.

context = Field(default_factory=dict, title='Context', description='Component node context for fluid components') class-attribute instance-attribute

Component node context for fluid components.

thumbnail = Field(None, title='Thumbnail', description='URL of the component thumbnail image. Generated by the system') class-attribute instance-attribute

URL of the component thumbnail image. Generated by the system.

thumbnail_height = Field(None, title='Thumbnail Height', description='Height of the thumbnail image in pixels') class-attribute instance-attribute

Height of the thumbnail image in pixels.

thumbnail_width = Field(None, title='Thumbnail Width', description='Width of the thumbnail image in pixels') class-attribute instance-attribute

Width of the thumbnail image in pixels.

type = Field(default='fluid', max_length=30, title='Type', description='Type of component: fluid, dynamic, or widget') class-attribute instance-attribute

Type of component: fluid, dynamic, or widget.

ComponentCreate

Bases: BaseComponent, CreateModel

Model for creating a new component.

Contains all required and optional fields for component creation.

ComponentUpdate

Bases: UpdateModel

Model for updating an existing component.

All fields are optional for partial updates.

description = Field(None, title='Description', description='Description of the component') class-attribute instance-attribute

Description of the component.

name = Field(None, max_length=255, title='Name', description='Name given by the user for display and search purposes') class-attribute instance-attribute

Name given by the user for display and search purposes.

template_html = Field(None, title='Template HTML', description='Django template for custom components') class-attribute instance-attribute

Django template for custom components.

version = Field(None, max_length=10, title='Version', description='Version of the component') class-attribute instance-attribute

Version of the component.

Connection

Bases: TimestampedResource

Connection resource model.

Represents a third-party API integration connection with OAuth or API key authentication. Connections are site-specific and store credentials, tokens, and metadata for external service integrations.

provider = Field(..., title='Provider Code', description='Provider code identifying the third-party service.') class-attribute instance-attribute

Provider code identifying the third-party service.

root_resource_id = Field(default=None, title='Root Resource ID', description='Authorized resource ID (e.g., account ID, email).') class-attribute instance-attribute

Authorized resource ID (e.g., account ID, email).

root_resource_name = Field(default=None, title='Root Resource Name', description='Authorized resource name (e.g., account name).') class-attribute instance-attribute

Authorized resource name (e.g., account name).

scopes = Field(default_factory=list, title='OAuth Scopes', description='List of OAuth scopes authorized for this connection.') class-attribute instance-attribute

List of OAuth scopes authorized for this connection.

status = Field(default=(ConnectionStatus.ACTIVE), title='Connection Status', description='Current status of the connection.') class-attribute instance-attribute

Current status of the connection.

token_expires_at = Field(default=None, title='Token Expiry', description='Expiration timestamp for the access token.') class-attribute instance-attribute

Expiration timestamp for the access token.

Contact

Bases: BaseContact, TimestampedResource

Contact information for email marketing.

Represents an individual contact with their personal information, consent preferences, purchase history, and customer data for email marketing campaigns.

customer_id = Field(default='', title='Customer ID', description='Customer ID from the e-commerce system.', max_length=40) class-attribute instance-attribute

Customer ID from the e-commerce system.

last_purchased_at = Field(default=None, title='Last Purchase Date', description='When the contact last made a purchase.') class-attribute instance-attribute

When the contact last made a purchase.

ltv = Field(default=None, title='Lifetime Value', description='Lifetime value of the contact.', max_digits=19, decimal_places=2) class-attribute instance-attribute

Lifetime value of the contact.

ltv_currency = Field(default='USD', title='LTV Currency', description='Currency code for lifetime value (ISO 4217).', max_length=3) class-attribute instance-attribute

Currency code for lifetime value (ISO 4217).

ContactCreate

Bases: BaseContact, CreateModel

Model for creating a new contact.

ContactUpdate

Bases: UpdateModel

Model for updating an existing contact.

Note: ltv, ltv_currency, and last_purchased_at are managed automatically by the system based on purchases and cannot be updated directly.

country = Field(default=None, title='Country', description='Country name of the contact.', max_length=100) class-attribute instance-attribute

Country name of the contact.

email = Field(default=None, title='Email Address', description='Email address of the contact.') class-attribute instance-attribute

Email address of the contact.

first_name = Field(default=None, title='First Name', description='First name of the contact.', max_length=100) class-attribute instance-attribute

First name of the contact.

last_name = Field(default=None, title='Last Name', description='Last name of the contact.', max_length=100) class-attribute instance-attribute

Last name of the contact.

Marketing consent preferences (email, sms, whatsapp).

phone = Field(default=None, title='Phone Number', description='Phone number of the contact.', max_length=20) class-attribute instance-attribute

Phone number of the contact.

source = Field(default=None, title='Contact Source', description='Source of the contact (purchase, lead, migration, unknown).') class-attribute instance-attribute

Source of the contact (purchase, lead, migration, or unknown).

tags = Field(default=None, title='Tags', description='Tags associated with the contact for organization.') class-attribute instance-attribute

Tags associated with the contact.

whatsapp = Field(default=None, title='WhatsApp Number', description='WhatsApp number of the contact.', max_length=20) class-attribute instance-attribute

WhatsApp number of the contact.

ContactUpdateLTV

Bases: BaseModel

Model for updating contact LTV.

Adds revenue to a contact's lifetime value, typically from a purchase or transaction.

currency = Field(title='Currency', description='Currency code (ISO 4217) for the LTV value.', max_length=3) class-attribute instance-attribute

Currency code (ISO 4217) for the LTV value.

email = Field(title='Contact Email', description='Email address of the contact to update.') class-attribute instance-attribute

Email address of the contact to update.

value = Field(title='LTV Value', description="Value to add to the contact's LTV (positive).", gt=0, max_digits=19, decimal_places=2) class-attribute instance-attribute

Value to add to the contact's LTV (must be positive).

Document

Bases: BaseAsset

Document asset model.

DocumentCreate

Bases: BaseAssetCreate

Create model for document assets.

file = Field(..., title='File', description='Document file to upload. Can be file path, bytes, BytesIO, BinaryIO, or tuple of (file_data, filename)') class-attribute instance-attribute

Document file to upload. Can be file path, bytes, BytesIO, BinaryIO, or tuple of (file_data, filename)

normalize_file()

Convert file paths or bytes to FileInput.

validate_document_file(v) classmethod

Ensure we're uploading a supported document file.

DocumentUpdate

Bases: BaseAssetUpdate

Update model for document assets - file cannot be updated.

Email

Bases: CreateModel

Model for sending direct emails through the Konigle email service.

Not supporting cc and bcc since they don't represent the use case of sending transactional emails and marketing emails.

attachments = Field(default=None, title='Attachments', description='Optional file attachments (max 10 files). Can be file paths, bytes, BytesIO, BinaryIO, or tuples of (file_data, filename).', max_length=10) class-attribute instance-attribute

Optional file attachments (max 10 files).

body_html = Field(title='HTML Body', description='HTML body content.') class-attribute instance-attribute

HTML body content.

body_text = Field(default=None, title='Text Body', description='Plain text body content (optional).') class-attribute instance-attribute

Plain text body content (optional).

category = Field(default=None, title='Category', description='Notification category code for the email. If present, the email will not be sent if the to_email is unsubscribed from the category.', max_length=50) class-attribute instance-attribute

Notification category code for the email.

channel = Field(title='Channel', description='Channel code to use for sending the email.', max_length=20) class-attribute instance-attribute

Channel code to use for sending the email.

from_email = Field(default=None, title='From Email', description='From email address to override the Account.default_from_email.') class-attribute instance-attribute

From email address to override the Account.default_from_email.

headers = Field(default=None, title='Custom Headers', description='Optional custom headers to include in the email.') class-attribute instance-attribute

Optional custom headers to include in the email.

reply_to_email = Field(default=None, title='Reply-To Email', description='Optional reply-to email address. Overrides Account.default_reply_to_email.') class-attribute instance-attribute

Optional reply-to email address. Overrides Account.default_reply_to_email.

save_as_template = Field(default=False, title='Save as Template', description='Whether to save the email as a template for future use.') class-attribute instance-attribute

Whether to save the email as a template for future use.

subject = Field(title='Subject', description='Email subject line.', max_length=255) class-attribute instance-attribute

Email subject line.

to_email = Field(title='To Email', description='Primary recipient email addresses.', min_length=1) class-attribute instance-attribute

Primary recipient email addresses.

normalize_attachments()

Normalize attachments to FileInputT.

validate_attachments(v) classmethod

Validate attachment files.

validate_headers(v) classmethod

Validate custom headers.

EmailAccount

Bases: BaseEmailAccount, TimestampedResource

Email account for a website.

Each website gets one email account that contains the default email configuration and serves as the parent for email channels and identities.

is_active = Field(default=True, title='Is Active', description='Whether the email account is active and can be used.') class-attribute instance-attribute

Whether the email account is active.

EmailAccountCreate

Bases: BaseEmailAccount, CreateModel

Model for creating a new email account.

EmailAccountSetup

Bases: BaseModel

Model for setting up an email account with initial configuration.

account_name = Field(title='Account Name', description='Name of the email account.', max_length=255) class-attribute instance-attribute

Name of the email account.

default_from_email = Field(title='Default From Email', description='Default from email address for this account.') class-attribute instance-attribute

Default from email address.

default_reply_to_email = Field(default=None, title='Default Reply-To Email', description='Default reply-to email address.') class-attribute instance-attribute

Default reply-to email address.

identity_value = Field(title='Identity Value', description='Email address or domain to verify as an identity.', max_length=255) class-attribute instance-attribute

Email address or domain to verify as an identity.

EmailAccountUpdate

Bases: UpdateModel

Model for updating an existing email account.

default_from_email = Field(default=None, title='Default From Email', description='Default from email address for this account.') class-attribute instance-attribute

Default from email address.

default_from_name = Field(default=None, title='Default From Name', description='Default from name for email headers.', max_length=255) class-attribute instance-attribute

Default from name.

default_reply_to_email = Field(default=None, title='Default Reply-To Email', description='Default reply-to email address.') class-attribute instance-attribute

Default reply-to email address.

default_reply_to_name = Field(default=None, title='Default Reply-To Name', description='Default reply-to name for email headers.', max_length=255) class-attribute instance-attribute

Default reply-to name.

name = Field(default=None, title='Account Name', description='Name of the email account.', max_length=255) class-attribute instance-attribute

Name of the email account.

EmailChannel

Bases: BaseEmailChannel, TimestampedResource

Email channel for different types of emails within an account.

Channels separate different email flows (transactional, marketing, etc.) and provide individual configuration and rate limiting.

account = Field(title='Account ID', description='ID of the email account this channel belongs to.') class-attribute instance-attribute

Email account this channel belongs to.

daily_quota = Field(default=1000, title='Daily Quota', description='Daily email quota for this channel.', ge=1) class-attribute instance-attribute

Daily email quota for this channel.

enable_engagement_tracking = Field(default=False, title='Engagement Tracking', description='Whether engagement tracking (open and click) is enabled for this channel.') class-attribute instance-attribute

Whether engagement tracking is enabled for this channel.

rate_limit = Field(default=10, title='Rate Limit', description='Rate limit (emails per second) for this channel.', ge=1, le=20) class-attribute instance-attribute

Rate limit (emails per second) for this channel.

status = Field(default=(EmailChannelStatus.ACTIVE), title='Channel Status', description='Current status of the channel.') class-attribute instance-attribute

Current status of the channel.

suspended_at = Field(default=None, title='Suspended At', description='When the channel was suspended.') class-attribute instance-attribute

When the channel was suspended.

suspension_reason = Field(default=None, title='Suspension Reason', description='Reason for suspension if applicable.', max_length=255) class-attribute instance-attribute

Reason for suspension if applicable.

EmailChannelCreate

Bases: BaseEmailChannel, CreateModel

Model for creating a new email channel.

EmailChannelStatus

Bases: str, Enum

Status of an email channel.

ACTIVE = 'active' class-attribute instance-attribute

Channel is active and can send emails.

PENDING = 'pending' class-attribute instance-attribute

Channel is pending setup or verification.

SUSPENDED = 'suspended' class-attribute instance-attribute

Channel is suspended and cannot send emails.

EmailChannelType

Bases: str, Enum

Types of email channels available.

BROADCAST = 'broadcast' class-attribute instance-attribute

Broadcast emails like announcements, updates.

MARKETING = 'marketing' class-attribute instance-attribute

Marketing emails like newsletters, promotions.

TRANSACTIONAL = 'transactional' class-attribute instance-attribute

Transactional emails like order confirmations, password resets.

EmailChannelUpdate

Bases: UpdateModel

Model for updating an existing email channel.

code = Field(default=None, title='Channel Code', description='Unique code for the channel used when sending emails.', max_length=50) class-attribute instance-attribute

Unique code for the channel given by the user that is used to refer to when sending the emails.

EmailIdentity

Bases: TimestampedResource

Identities (domains or email addresses) for sending emails.

Identities must be verified before they can be used to send emails. This includes DKIM and SPF verification for domains.

account = Field(title='Account ID', description='ID of the email account this identity belongs to.') class-attribute instance-attribute

Email account this identity belongs to.

dkim_records = Field(default_factory=list, title='DKIM Records', description='DKIM DNS records to be added for verification.') class-attribute instance-attribute

DKIM DNS records to be added for verification.

dkim_verification_status = Field(default=(EmailVerificationStatus.PENDING), title='DKIM Verification Status', description='DKIM verification status.') class-attribute instance-attribute

DKIM verification status.

dkim_verified = Field(default=False, title='DKIM Verified', description='Whether DKIM is verified.') class-attribute instance-attribute

Whether DKIM is verified.

identity_type = Field(title='Identity Type', description='Type of identity (domain or email).') class-attribute instance-attribute

Type of identity (domain or email).

identity_value = Field(title='Identity Value', description='The domain or email address value.', max_length=255) class-attribute instance-attribute

The domain or email address value.

mail_from_domain = Field(default=None, title='MAIL FROM Domain', description='Custom MAIL FROM domain used for envelope sender.', max_length=255) class-attribute instance-attribute

Custom MAIL FROM domain used for envelope sender.

mail_from_records = Field(default_factory=list, title='MAIL FROM Records', description='MAIL FROM DNS records to be added for verification.') class-attribute instance-attribute

MAIL FROM DNS records to be added for verification.

mail_from_verification_status = Field(default=(EmailVerificationStatus.PENDING), title='MAIL FROM Verification Status', description='MAIL FROM domain verification status. This is SPF verification status.') class-attribute instance-attribute

MAIL FROM domain verification status. This is SPF verification status.

mail_from_verified = Field(default=False, title='MAIL FROM Verified', description='Whether MAIL FROM domain is verified.') class-attribute instance-attribute

Whether MAIL FROM domain is verified.

use_custom_mail_from = Field(default=False, title='Use Custom MAIL FROM', description='Whether to use custom MAIL FROM domain.') class-attribute instance-attribute

Whether to use custom MAIL FROM domain.

verified = Field(default=False, title='Verified', description='Whether the identity is verified for sending emails.') class-attribute instance-attribute

Whether the identity is verified for sending emails.

EmailIdentityCreate

Bases: CreateModel

Model for creating a new email identity.

identity_value = Field(title='Identity Value', description='The domain or email address value.', max_length=255) class-attribute instance-attribute

The domain or email address value.

EmailIdentityType

Bases: str, Enum

Types of email identities.

DOMAIN = 'domain' class-attribute instance-attribute

Domain identity (e.g., example.com).

EMAIL = 'email' class-attribute instance-attribute

Email address identity (e.g., noreply@example.com).

EmailIdentityUpdate

Bases: UpdateModel

Model for updating an existing email identity.

use_custom_mail_from = Field(default=None, title='Use Custom MAIL FROM', description='Whether to use custom MAIL FROM domain.') class-attribute instance-attribute

Whether to use custom MAIL FROM domain.

EmailResponse

Bases: BaseModel

Response model for successful email send operations.

message_id = Field(default=None, title='Email Message ID', description='Unique identifier for the sent email') class-attribute instance-attribute

Unique identifier for the sent email

status = Field(title='Status', description='Status code of the email send operation.') class-attribute instance-attribute

Status code of the email send operation.

template_id = Field(default=None, title='Template ID', description='ID of the created template (if save_as_template was True).') class-attribute instance-attribute

ID of the created template (if save_as_template was True).

EmailTemplate

Bases: BaseEmailTemplate, TimestampedResource

Email template for reusable email content.

Templates do not support any context as of now except for built in context unsubscribe_link if the email is sent to a single recipient.

The template must be in valid Jinja2 format.

account = Field(title='Account ID', description='ID of the email account this template belongs to.') class-attribute instance-attribute

ID of the email account this template belongs to.

preview_url = Field(default=None, title='Preview URL', description='URL to preview the rendered email template.') class-attribute instance-attribute

URL to preview the rendered email template.

EmailTemplateCreate

Bases: BaseEmailTemplate, CreateModel

Model for creating a new email template.

EmailTemplateUpdate

Bases: UpdateModel

Model for updating an existing email template.

body_html = Field(default=None, title='HTML Body Template', description='HTML body template with variable placeholders.') class-attribute instance-attribute

HTML body template with variable placeholders.

body_text = Field(default=None, title='Text Body Template', description='Plain text body template (optional).') class-attribute instance-attribute

Plain text body template (optional).

code = Field(default=None, title='Template Code', description='Unique code for the template.', max_length=100) class-attribute instance-attribute

Unique code for the template.

is_base = Field(default=None, title='Is Base Template', description='Indicates if this is a base template set for the account.') class-attribute instance-attribute

Indicates if this is a base template set for the account.

name = Field(default=None, title='Template Name', description='Name of the email template.', max_length=255) class-attribute instance-attribute

Name of the email template.

subject = Field(default=None, title='Subject Template', description='Subject line template with variable placeholders.') class-attribute instance-attribute

Subject line template with variable placeholders.

tags = Field(default=None, title='Tags', description='List of tags for categorizing the template.') class-attribute instance-attribute

List of tags for categorizing the template.

EmailVerificationStatus

Bases: str, Enum

Email verification status.

FAILED = 'failed' class-attribute instance-attribute

Verification failed.

PENDING = 'pending' class-attribute instance-attribute

Verification is pending.

SUCCESS = 'success' class-attribute instance-attribute

Verification successful.

Folder

Bases: BaseFolder, Resource

Content folder model for hierarchical organization.

Represents a folder with metadata, versioning, and publication status.

is_default_version = Field(False, title='Is Default Version', description='Whether this is the default version of the folder') class-attribute instance-attribute

Whether this is the default version of the folder.

is_original_version = Field(True, title='Is Original Version', description='Whether this is the original version of the folder. Only original versions can have children.') class-attribute instance-attribute

Whether this is the original version of the folder. Only original versions can have children.

managed = Field(False, title='Managed', description='Whether the folder is system-managed') class-attribute instance-attribute

Whether the folder is system-managed.

pathname = Field(default=None, title='Pathname', description='Full pathname of the folder') class-attribute instance-attribute

Full pathname of the page

preview_url = Field(default=None, title='Preview URL', description='Preview URL of the page') class-attribute instance-attribute

Preview URL of the folder before publishing.

published = Field(True, title='Published', description='Whether the folder is visible on the website') class-attribute instance-attribute

Whether the folder is visible on the website.

url = Field(default=None, title='URL', description='Public URL of the page') class-attribute instance-attribute

Public URL of the folder. Results in 404 if the folder is not published.

version = Field(..., title='Version', description='Version of the folder for A/B testing') class-attribute instance-attribute

Version of the folder for A/B testing.

change_handle(new_handle, redirect=False)

Change the handle of the folder.

PARAMETER DESCRIPTION
new_handle

The new handle to set for the folder.

TYPE: str

redirect

Whether to create a redirect from the old handle.

TYPE: bool DEFAULT: False

Raises: ValueError: If the new handle is invalid.

publish()

Publish the folder.

unpublish()

Unpublish the folder.

FolderCreate

Bases: BaseFolder, CreateModel

Model for creating a new folder.

Contains all required and optional fields for folder creation.

handle = Field(default=None, max_length=255, title='Handle', description='Unique identifier for the folder used in URLs') class-attribute instance-attribute

Unique identifier for the folder used in URLs.

FolderType

Bases: str, Enum

Folder type enumeration.

FolderUpdate

Bases: UpdateModel

Model for updating an existing folder.

All fields are optional for partial updates.

canonical_page = Field(default=None, title='Canonical Page ID', description='ID of the canonical page for SEO purposes') class-attribute instance-attribute

ID of the canonical page for SEO purposes.

context_builders = Field(default=None, title='Context Builders', description='Context builders for dynamic content') class-attribute instance-attribute

Context builders for dynamic content.

country_code = Field(default=None, title='Country Code', description='Country code for the folder', max_length=2) class-attribute instance-attribute

Country code for the folder.

exclude_from_sitemap = Field(default=None, title='Exclude From Sitemap', description='Whether to exclude folder from sitemap') class-attribute instance-attribute

Whether to exclude folder from sitemap.

json_ld = Field(default=None, title='JSON-LD', description='Manual JSON-LD override for the folder') class-attribute instance-attribute

Manual JSON-LD override for the folder.

language = Field(default=None, title='Language', description='Language code for the folder', max_length=2) class-attribute instance-attribute

Language code for the folder.

name = Field(default=None, max_length=255, title='Name', description='Folder name for display and search purposes') class-attribute instance-attribute

Folder name for display and search purposes.

seo_meta = Field(default=None, title='SEO Meta', description='SEO meta information for folder pages') class-attribute instance-attribute

SEO meta information for folder pages.

tags = Field(default=None, title='Tags', description='Tags for categorization') class-attribute instance-attribute

Tags for categorization.

template = Field(default=None, title='Template ID', description='ID of the page design template.') class-attribute instance-attribute

ID of the page design template.

Form

Bases: BaseResource, TimestampMixin

Form resource model.

Represents a form with fields from the forms service. Uses integer ID as it comes from a separate service.

captcha_enabled = Field(default=None, title='Captcha Enabled', description='Whether CAPTCHA is enabled for this form.') class-attribute instance-attribute

Whether CAPTCHA is enabled for this form.

captcha_site_key = Field(default=None, title='Captcha Site Key', description='CAPTCHA site key for client-side validation.') class-attribute instance-attribute

CAPTCHA site key for client-side validation.

endpoint_url = Field(..., title='Endpoint URL', description='The URL endpoint for form submissions.', serialization_alias='submission_url') class-attribute instance-attribute

The URL endpoint for form submissions.

id = Field(..., title='Form ID', description='Unique identifier for the form.') class-attribute instance-attribute

Unique identifier for the form.

is_active = Field(..., title='Is Active', description='Whether the form is active.') class-attribute instance-attribute

Whether the form is active.

name = Field(..., title='Form Name', description='The name of the form.') class-attribute instance-attribute

The name of the form.

slug = Field(..., title='Slug', description='URL-friendly slug for the form.') class-attribute instance-attribute

URL-friendly slug for the form.

FormCreate

Bases: CreateModel

Form creation model.

Defines fields required when creating a new form. The slug is auto-generated from the name.

name = Field(..., title='Form Name', description='The name of the form.') class-attribute instance-attribute

The name of the form.

FormSubmission

Bases: BaseResource

Form submission resource model.

Represents a submission to a form with all metadata and spam detection.

country = Field(default=None, title='Country', description='ISO country code (2 characters).') class-attribute instance-attribute

ISO country code (2 characters).

emails_sent = Field(default=None, title='Emails Sent', description='List of email addresses that were sent notifications.') class-attribute instance-attribute

List of email addresses that were sent notifications.

form_data = Field(default=None, title='Form Data', description='The submitted form data as key-value pairs.') class-attribute instance-attribute

The submitted form data as key-value pairs.

form_name = Field(default=None, title='Form Name', description='Name of the form that was submitted.') class-attribute instance-attribute

Name of the form that was submitted.

form_slug = Field(default=None, title='Form Slug', description='Slug of the form that was submitted.') class-attribute instance-attribute

Slug of the form that was submitted.

id = Field(..., title='Submission ID', description='Unique identifier for the form submission.') class-attribute instance-attribute

Unique identifier for the form submission.

ip_address = Field(..., title='IP Address', description='IP address of the submitter.') class-attribute instance-attribute

IP address of the submitter.

is_spam = Field(default=False, title='Is Spam', description='Whether this submission was detected as spam.') class-attribute instance-attribute

Whether this submission was detected as spam.

spam_confidence = Field(default=0.0, ge=0.0, le=1.0, title='Spam Confidence', description='Confidence score for spam detection (0.0 to 1.0).') class-attribute instance-attribute

Confidence score for spam detection (0.0 to 1.0).

spam_reason = Field(default=None, title='Spam Reason', description='Reason why submission was marked as spam.') class-attribute instance-attribute

Reason why submission was marked as spam.

submitted_at = Field(..., title='Submitted At', description='Timestamp when the form was submitted.') class-attribute instance-attribute

Timestamp when the form was submitted.

user_agent = Field(default=None, title='User Agent', description='Browser user agent string.') class-attribute instance-attribute

Browser user agent string.

GlossaryTerm

Bases: BaseGlossaryTerm, TimestampedResource

Store glossary term resource model.

Represents a glossary term with content, hierarchy, and publication status.

contributors = Field(default_factory=list, title='Contributors', description='List of contributors for the term') class-attribute instance-attribute

List of contributors for the term.

published = Field(default=False, title='Published', description='Whether the term is published') class-attribute instance-attribute

Whether the term is published.

published_at = Field(None, title='Published At', description='Date and time when the term was published') class-attribute instance-attribute

Date and time when the term was published.

reviewers = Field(default_factory=list, title='Reviewers', description='List of reviewers for the term') class-attribute instance-attribute

List of reviewers for the term.

change_handle(new_handle, redirect=False)

Change the handle of the glossary term.

PARAMETER DESCRIPTION
new_handle

The new handle to set for the term.

TYPE: str

redirect

Whether to create a redirect from the old handle.

TYPE: bool DEFAULT: False

Raises: ValueError: If the new handle is invalid.

publish()

Publish the glossary term.

unpublish()

Unpublish the glossary term.

GlossaryTermCreate

Bases: BaseGlossaryTerm, CreateModel

Model for creating a new glossary term.

Contains all required and optional fields for term creation.

GlossaryTermUpdate

Bases: UpdateModel

Model for updating an existing glossary term.

All fields are optional for partial updates.

author = Field(default=None, title='Author', description='Primary author of the term') class-attribute instance-attribute

Primary author of the term.

content = Field(default=None, title='Content', description='Rich text blocks for the term in EditorJS format') class-attribute instance-attribute

Rich text blocks for the term in EditorJS format.

contributor_ids = Field(default=None, title='Contributor IDs', description='List of contributor IDs for the term') class-attribute instance-attribute

List of contributor IDs for the term.

exclude_from_sitemap = Field(default=None, title='Exclude From Sitemap', description='Whether the term is excluded from sitemap') class-attribute instance-attribute

Whether the term is excluded from sitemap.

json_ld = Field(default=None, title='JSON-LD', description='Manual override for JSON-LD structured data') class-attribute instance-attribute

Manual override for JSON-LD structured data.

name = Field(default=None, max_length=255, title='Name', description='Name for display and search purposes') class-attribute instance-attribute

Name for display and search purposes.

reviewer_ids = Field(default=None, title='Reviewer IDs', description='List of reviewer IDs for the term') class-attribute instance-attribute

List of reviewer IDs for the term.

seo_meta = Field(default=None, title='SEO Meta', description='SEO meta information for the term') class-attribute instance-attribute

SEO meta information for the term.

show_author = Field(default=None, title='Show Author', description='Whether to show contributors and reviewers on the page') class-attribute instance-attribute

Whether to show contributors and reviewers on the page.

subtitle = Field(default=None, max_length=255, title='Subtitle', description='Subtitle of the glossary term') class-attribute instance-attribute

Subtitle of the glossary term.

summary = Field(default=None, title='Summary', description='Term summary - used for SEO meta description') class-attribute instance-attribute

Term summary - used for SEO meta description.

title = Field(default=None, max_length=255, title='Title', description='User facing title of the glossary term') class-attribute instance-attribute

User facing title of the glossary term.

Image

Bases: BaseAsset

Image asset model.

image_height = Field(None, ge=0, title='Image Height', description='Image height in pixels') class-attribute instance-attribute

Image height in pixels

image_width = Field(None, ge=0, title='Image Width', description='Image width in pixels') class-attribute instance-attribute

Image width in pixels

ImageCreate

Bases: BaseAssetCreate

Create model for image assets.

image = Field(..., title='Image', description='Image file to upload. Can be file path, bytes, BytesIO, BinaryIO, or tuple of (file_data, filename)') class-attribute instance-attribute

Image file to upload. Can be file path, bytes, BytesIO, BinaryIO, or tuple of (file_data, filename)

normalize_file()

Convert file paths or bytes to FileInput.

validate_image_file(v) classmethod

Ensure we're uploading an image file.

ImageGenerate

Bases: CreateModel

Model for generating images from text prompts.

aspect_ratio = Field(default='1:1', title='Aspect Ratio', description='Aspect ratio of the generated image') class-attribute instance-attribute

Aspect ratio of the generated image

output_format = Field(default='webp', title='Output Format', description='Output format of the generated image') class-attribute instance-attribute

Output format of the generated image

prompt = Field(..., title='Prompt', description='Text prompt to generate the image') class-attribute instance-attribute

Text prompt to generate the image

ImageUpdate

Bases: BaseAssetUpdate

Update model for image assets - file cannot be updated.

MarketingConsent

Bases: BaseModel

Marketing consent preferences for different channels.

Tracks whether a contact has consented to receive marketing communications through email, SMS, and WhatsApp.

email = Field(default=True, title='Email Consent', description='Whether contact has consented to email marketing.') class-attribute instance-attribute

Email marketing consent.

sms = Field(default=True, title='SMS Consent', description='Whether contact has consented to SMS marketing.') class-attribute instance-attribute

SMS marketing consent.

whatsapp = Field(default=True, title='WhatsApp Consent', description='Whether contact has consented to WhatsApp marketing.') class-attribute instance-attribute

WhatsApp marketing consent.

Page

Bases: BasePage, TimestampedResource

General purpose page resource model.

Represents a page with content, type, and publication status.

content_file = Field(default=None, title='Content File', description='URL of the content file if data source is file') class-attribute instance-attribute

URL of the content file if data source is file.

contributors = Field(default_factory=list, title='Contributors', description='List of contributors for the page') class-attribute instance-attribute

List of contributors for the page.

pathname = Field(default=None, title='Pathname', description='Full pathname of the page') class-attribute instance-attribute

Full pathname of the page

preview_url = Field(default=None, title='Preview URL', description='Preview URL of the page') class-attribute instance-attribute

Preview URL of the page

published = Field(default=False, title='Published', description='Whether the page is published') class-attribute instance-attribute

Whether the page is published.

published_at = Field(None, title='Published At', description='Date and time when the page was published') class-attribute instance-attribute

Date and time when the page was published.

reviewers = Field(default_factory=list, title='Reviewers', description='List of reviewers for the page') class-attribute instance-attribute

List of reviewers for the page.

url = Field(default=None, title='URL', description='Public URL of the page') class-attribute instance-attribute

Public URL of the page. Results in 404 if the page is not published.

apublish() async

Publish the page.

change_handle(new_handle, redirect=False)

Change the handle of the page.

PARAMETER DESCRIPTION
new_handle

The new handle to set for the page.

TYPE: str

redirect

Whether to create a redirect from the old handle.

TYPE: bool DEFAULT: False

Raises: ValueError: If the new handle is invalid.

publish()

Publish the page.

unpublish()

Unpublish the page.

PageCreate

Bases: BasePage, ContentFileMixin, CreateModel

Model for creating a new page.

Contains all required and optional fields for page creation.

PageUpdate

Bases: ContentFileMixin, UpdateModel

Model for updating an existing page.

All fields are optional for partial updates.

author = Field(default=None, title='Author', description='Primary author of the page') class-attribute instance-attribute

Primary author of the page.

content = Field(default=None, title='Content', description='Rich text blocks for the page in EditorJS format') class-attribute instance-attribute

Rich text blocks for the page in EditorJS format.

context_builders = Field(default=None, title='Context Builders', description='Context builders for dynamic content') class-attribute instance-attribute

Context builders for dynamic content.

contributor_ids = Field(default=None, title='Contributor IDs', description='List of contributor IDs for the page') class-attribute instance-attribute

List of contributor IDs for the page.

exclude_from_sitemap = Field(default=None, title='Exclude From Sitemap', description='Whether the page is excluded from sitemap') class-attribute instance-attribute

Whether the page is excluded from sitemap.

json_ld = Field(default=None, title='JSON-LD', description='Manual override for JSON-LD structured data') class-attribute instance-attribute

Manual override for JSON-LD structured data.

name = Field(default=None, max_length=255, title='Name', description='Name for display and search purposes') class-attribute instance-attribute

Name for display and search purposes.

published_at = Field(default=None, title='Published At', description='Date and time when the page was published') class-attribute instance-attribute

Date and time when the page was published.

reviewer_ids = Field(default=None, title='Reviewer IDs', description='List of reviewer IDs for the page') class-attribute instance-attribute

List of reviewer IDs for the page.

seo_meta = Field(default=None, title='SEO Meta', description='SEO meta information for the page') class-attribute instance-attribute

SEO meta information for the page.

show_author = Field(default=None, title='Show Author', description='Whether to show contributors and reviewers on the page') class-attribute instance-attribute

Whether to show contributors and reviewers on the page.

subtitle = Field(default=None, max_length=255, title='Subtitle', description='Subtitle of the page') class-attribute instance-attribute

Subtitle of the page.

template = Field(default=None, title='Template ID', description='ID of the page design template.') class-attribute instance-attribute

ID of the page design template.

title = Field(default=None, max_length=255, title='Title', description='User facing title of the page') class-attribute instance-attribute

User facing title of the page.

Product

Bases: ProductBase, TimestampedResource, IDMixin, BaseResource

Complete product resource model.

Represents a product from the API with all fields including computed values, relationships, and Active Record capabilities.

currency = Field(default=None, max_length=3, title='Currency', description='Currency code for price fields.') class-attribute instance-attribute

Currency code for price fields.

djcom_tags = Field(default_factory=list, title='Parsed Tags', description='List of tags parsed from tags field.') class-attribute instance-attribute

List of tags parsed from tags field.

handle = Field(..., title='Handle', description='URL-friendly product identifier.') class-attribute instance-attribute

URL-friendly product identifier.

has_variants = Field(..., title='Has Variants', description='Whether product has multiple variants.') class-attribute instance-attribute

Whether product has multiple variants.

image = Field(default=None, title='Image ID', description='ID of the main product image.') class-attribute instance-attribute

ID of the main product image.

original_price = Field(default=None, gt=0, max_digits=19, decimal_places=2, title='Original Price', description='Original price before discount.') class-attribute instance-attribute

Original price before discount.

pathname = Field(default=None, title='Pathname', description='Full pathname of the product page') class-attribute instance-attribute

Full pathname of the product page

preview_url = Field(default=None, title='Preview URL', description='Preview URL of the product page') class-attribute instance-attribute

Preview URL of the product page

price = Field(default=None, gt=0, max_digits=19, decimal_places=2, title='Price', description='Product price for single variant products.') class-attribute instance-attribute

Product price for single variant products.

product_type = Field(..., title='Product Type', description='Product category or type.') class-attribute instance-attribute

Product category or type.

published_at = Field(default=None, title='Published At', description='Product publication timestamp.') class-attribute instance-attribute

Product publication timestamp.

seo_meta = Field(default=None, title='SEO Meta', description='SEO metadata including title, description, keywords.') class-attribute instance-attribute

SEO metadata including title, description, keywords.

status = Field(..., title='Status', description='Product publication status.') class-attribute instance-attribute

Product publication status.

tags = Field(..., title='Tags', description='Comma-separated list of product tags.') class-attribute instance-attribute

Comma-separated list of product tags.

url = Field(default=None, title='URL', description='Public URL of the produc page') class-attribute instance-attribute

Public URL of the product page. Results in 404 if the product is not published.

vendor = Field(..., title='Vendor', description='Product vendor or manufacturer.') class-attribute instance-attribute

Product vendor or manufacturer.

ProductCreate

Bases: ProductBase, CreateModel

Model for creating a new product.

Includes all fields required for product creation plus optional file upload for the main product image.

currency = Field(default=None, max_length=3, title='Currency', description='Currency code for price fields.') class-attribute instance-attribute

Currency code for price fields.

handle = Field(default=None, max_length=255, title='Handle', description='URL-friendly product identifier.') class-attribute instance-attribute

URL-friendly product identifier. Will be auto-generated from title if not provided.

original_price = Field(default=None, gt=0, max_digits=19, decimal_places=2, title='Original Price', description='Original price before discount.') class-attribute instance-attribute

Original price before discount.

price = Field(default=None, gt=0, max_digits=19, decimal_places=2, title='Price', description='Product price for single variant products.') class-attribute instance-attribute

Product price for single variant products.

product_type = Field(default='', max_length=255, title='Product Type', description='Product category or type.') class-attribute instance-attribute

Product category or type.

seo_meta = Field(default_factory=(lambda: SEOMeta()), title='SEO Meta', description='SEO metadata including title, description, keywords.') class-attribute instance-attribute

SEO metadata including title, description, keywords.

status = Field(default=(ProductStatus.DRAFT), title='Status', description='Product publication status.') class-attribute instance-attribute

Product publication status.

tags = Field(default='', title='Tags', description='Comma-separated list of product tags.') class-attribute instance-attribute

Comma-separated list of product tags.

variants = Field(default_factory=list, title='Variants', description='List of product variants to create with the product.') class-attribute instance-attribute

List of product variants to create with the product. The options must match the product options defined above.

vendor = Field(default='', max_length=255, title='Vendor', description='Product vendor or manufacturer.') class-attribute instance-attribute

Product vendor or manufacturer.

ProductImage

Bases: ProductImageBase, TimestampedResource, IDMixin, BaseResource

Complete product image resource model.

Represents a product image from the API with all fields including computed values, file metadata, and Active Record capabilities.

height = Field(None, ge=1, title='Height', description='Image height in pixels.') class-attribute instance-attribute

Image height in pixels.

position = Field(..., ge=1, title='Position', description='Display position of the image.') class-attribute instance-attribute

Display position of the image.

url = Field(default=None, title='URL', description='The URL of the image.') class-attribute instance-attribute

URL of the image after upload.

width = Field(None, ge=1, title='Width', description='Image width in pixels.') class-attribute instance-attribute

Image width in pixels.

ProductImageCreate

Bases: ProductImageBase, CreateModel

Model for creating a new product image.

Requires either a file upload or a source URL. Must specify the parent product ID.

file = Field(..., title='Image File', description='Image file to upload.') class-attribute instance-attribute

Image file to upload.

position = Field(default=1, ge=1, title='Position', description='Display position of the image.') class-attribute instance-attribute

Display position of the image.

src = Field(default=None, title='Source URL', description='If the image is copied from URL, specify it here.') class-attribute instance-attribute

If the image is copied from URL, specify it here.

normalize_file()

Convert file paths or bytes to FileInput.

validate_image_file(v) classmethod

Ensure we're uploading an image file.

ProductImageUpdate

Bases: UpdateModel

Model for updating an existing product image.

All fields are optional for partial updates. Supports updating position, alt text, variant associations, and the image file.

alt = Field(default=None, title='Alt Text', description='Alternative text for accessibility.') class-attribute instance-attribute

Alternative text for accessibility.

position = Field(default=None, ge=1, title='Position', description='Display position of the image.') class-attribute instance-attribute

Display position of the image.

variant_ids = Field(default=None, title='Variant IDs', description='List of variant IDs this image is associated with.') class-attribute instance-attribute

List of variant IDs this image is associated with.

ProductOption

Bases: BaseModel

Model representing a product option.

Each option can have multiple values, such as size or color.

name = Field(..., max_length=255, title='Option Name', description='Name of the product option (e.g., Size, Color).') class-attribute instance-attribute

Name of the product option (e.g., Size, Color).

values = Field(..., title='Option Values', description='List of possible values for this option.') class-attribute instance-attribute

List of possible values for this option.

ProductStatus

Bases: str, Enum

Product publication status.

ProductUpdate

Bases: UpdateModel

Model for updating an existing product.

All fields are optional for partial updates. Supports updating any product field including status and image.

content = Field(default=None, title='Content', description='Body content blocks in EditrJS JSON format.') class-attribute instance-attribute

Body content blocks in EditorJS JSON format.

currency = Field(default=None, max_length=3, title='Currency', description='Currency code for price fields.') class-attribute instance-attribute

Currency code for price fields.

handle = Field(default=None, max_length=255, title='Handle', description='URL-friendly product identifier.') class-attribute instance-attribute

URL-friendly product identifier.

image = Field(default=None, title='Image ID', description='ID of the product image to set as the main image.') class-attribute instance-attribute

ID of the product image to set as the main image.

options = Field(default=None, title='Options', description='List of product option names.') class-attribute instance-attribute

List of product option names.

original_price = Field(default=None, gt=0, max_digits=19, decimal_places=2, title='Original Price', description='Original price before discount.') class-attribute instance-attribute

Original price before discount.

price = Field(default=None, gt=0, max_digits=19, decimal_places=2, title='Price', description='Product price for single variant products.') class-attribute instance-attribute

Product price for single variant products.

product_type = Field(default=None, max_length=255, title='Product Type', description='Product category or type.') class-attribute instance-attribute

Product category or type.

seo_meta = Field(default=None, title='SEO Meta', description='SEO metadata including title, description, keywords.') class-attribute instance-attribute

SEO metadata including title, description, keywords.

status = Field(default=None, title='Status', description='Product publication status.') class-attribute instance-attribute

Product publication status.

tags = Field(default=None, title='Tags', description='Comma-separated list of product tags.') class-attribute instance-attribute

Comma-separated list of product tags.

title = Field(default=None, min_length=1, max_length=255, title='Title', description='Product title or name.') class-attribute instance-attribute

Product title or name.

variants = Field(default=None, title='Variants', description='List of product variants to update.') class-attribute instance-attribute

List of product variants to update. Specify the right options to match existing variants.

vendor = Field(default=None, max_length=255, title='Vendor', description='Product vendor or manufacturer.') class-attribute instance-attribute

Product vendor or manufacturer.

ProductVariant

Bases: ProductVariantBase, TimestampedResource, IDMixin, BaseResource

Complete product variant resource model.

Represents a product variant from the API with all fields including computed values, pricing, inventory, and Active Record capabilities.

barcode = Field(default=None, title='Barcode', description='Product barcode or UPC.') class-attribute instance-attribute

Product barcode or UPC.

compare_at_price = Field(default=None, gt=0, max_digits=19, decimal_places=2, title='Original Price', description='Original price before discount.') class-attribute instance-attribute

Original price before discount.

cost = Field(default=None, ge=0, max_digits=19, decimal_places=2, title='Cost', description='Cost of goods sold for this variant.') class-attribute instance-attribute

Cost of goods sold for this variant.

currency = Field(default=None, max_length=3, title='Currency', description='Currency code for price fields.') class-attribute instance-attribute

Currency code for price fields.

grams = Field(default=None, ge=0, title='Grams', description='Weight in grams.') class-attribute instance-attribute

Weight in grams.

handle = Field(..., title='Handle', description='URL-friendly variant identifier.') class-attribute instance-attribute

URL-friendly variant identifier.

image = Field(default=None, title='Image ID', description='ID of the variant-specific image.') class-attribute instance-attribute

ID of the variant-specific image.

inventory_policy = Field(default=None, title='Inventory Policy', description='Policy for handling out-of-stock variants.') class-attribute instance-attribute

Policy for handling out-of-stock variants.

inventory_quantity = Field(..., ge=0, title='Inventory Quantity', description='Available stock quantity.') class-attribute instance-attribute

Available stock quantity.

option1 = Field(default=None, max_length=500, title='Option 1', description='First product option value (e.g., Size).') class-attribute instance-attribute

First product option value (e.g., Size).

option2 = Field(default=None, max_length=500, title='Option 2', description='Second product option value (e.g., Color).') class-attribute instance-attribute

Second product option value (e.g., Color).

option3 = Field(default=None, max_length=500, title='Option 3', description='Third product option value (e.g., Material).') class-attribute instance-attribute

Third product option value (e.g., Material).

pathname = Field(default=None, title='Pathname', description='Full pathname of the product variant page') class-attribute instance-attribute

Full pathname of the product variant page

position = Field(..., ge=1, title='Position', description='Display position in product variant list.') class-attribute instance-attribute

Display position in product variant list.

preview_url = Field(default=None, title='Preview URL', description='Preview URL of the product variant page') class-attribute instance-attribute

Preview URL of the product variant page

product = Field(..., title='Product ID', description='ID of the parent product.') class-attribute instance-attribute

ID of the parent product.

seo_meta = Field(default=None, title='SEO Meta', description='SEO metadata for this variant.') class-attribute instance-attribute

SEO metadata for this variant.

sku = Field(default=None, title='SKU', description='Stock Keeping Unit identifier.') class-attribute instance-attribute

Stock Keeping Unit identifier.

taxable = Field(..., title='Taxable', description='Whether this variant is subject to taxes.') class-attribute instance-attribute

Whether this variant is subject to taxes.

title = Field(..., title='Title', description='Variant title or name.') class-attribute instance-attribute

Variant title or name.

url = Field(default=None, title='URL', description='Public URL of the produc variant page') class-attribute instance-attribute

Public URL of the product variant page. Results in 404 if the product is not published.

weight = Field(default=None, ge=0, title='Weight', description='Variant weight for shipping calculations.') class-attribute instance-attribute

Variant weight for shipping calculations.

weight_unit = Field(default=None, max_length=31, title='Weight Unit', description='Unit of measurement for weight.') class-attribute instance-attribute

Unit of measurement for weight.

ProductVariantCreate

Bases: CreateModel, ProductVariantBase

Model for creating a new product variant.

All fields required for creation are included. Supports setting all variant fields including pricing, inventory, and images.

barcode = Field(default=None, title='Barcode', description='Product barcode or UPC.') class-attribute instance-attribute

Product barcode or UPC.

compare_at_price = Field(default=None, gt=0, max_digits=19, decimal_places=2, title='Original Price', description='Original price before discount.') class-attribute instance-attribute

Original price before discount.

cost = Field(default=None, ge=0, max_digits=19, decimal_places=2, title='Cost', description='Cost of goods sold for this variant.') class-attribute instance-attribute

Cost of goods sold for this variant.

currency = Field(default=None, max_length=3, title='Currency', description='Currency code for price fields.') class-attribute instance-attribute

Currency code for price fields.

grams = Field(default=None, ge=0, title='Grams', description='Weight in grams.') class-attribute instance-attribute

Weight in grams.

image = Field(default=None, title='Image ID', description='ID of the main cover image of the variant.') class-attribute instance-attribute

ID of the variant-specific image.

inventory_policy = Field(default='deny', title='Inventory Policy', description='Policy for handling out-of-stock variants.') class-attribute instance-attribute

Policy for handling out-of-stock variants.

inventory_quantity = Field(default=1, ge=0, title='Inventory Quantity', description='Available stock quantity.') class-attribute instance-attribute

Available stock quantity.

option1 = Field(default=None, max_length=500, title='Option 1', description='First product option value (e.g., Size).') class-attribute instance-attribute

First product option value (e.g., Size).

option2 = Field(default=None, max_length=500, title='Option 2', description='Second product option value (e.g., Color).') class-attribute instance-attribute

Second product option value (e.g., Color).

option3 = Field(default=None, max_length=500, title='Option 3', description='Third product option value (e.g., Material).') class-attribute instance-attribute

Third product option value (e.g., Material).

position = Field(default=1, ge=1, title='Position', description='Display position in product variant list.') class-attribute instance-attribute

Display position in product variant list.

seo_meta = Field(default_factory=(lambda: SEOMeta()), title='SEO Meta', description='SEO metadata for this variant.') class-attribute instance-attribute

SEO metadata for this variant.

sku = Field(default=None, title='SKU', description='Stock Keeping Unit identifier.') class-attribute instance-attribute

Stock Keeping Unit identifier.

taxable = Field(default=True, title='Taxable', description='Whether this variant is subject to taxes.') class-attribute instance-attribute

Whether this variant is subject to taxes.

title = Field(default=None, title='Title', description='Variant title or name.') class-attribute instance-attribute

Variant title or name.

weight = Field(default=None, ge=0, title='Weight', description='Variant weight for shipping calculations.') class-attribute instance-attribute

Variant weight for shipping calculations.

weight_unit = Field(default=None, max_length=31, title='Weight Unit', description='Unit of measurement for weight.') class-attribute instance-attribute

Unit of measurement for weight.

ProductVariantUpdate

Bases: UpdateModel

Model for updating an existing product variant.

All fields are optional for partial updates.

barcode = Field(default=None, title='Barcode', description='Product barcode or UPC.') class-attribute instance-attribute

Product barcode or UPC.

compare_at_price = Field(default=None, gt=0, max_digits=19, decimal_places=2, title='Compare At Price', description='Compare at price for displaying discounts.') class-attribute instance-attribute

Compare at price for displaying discounts.

content = Field(default=None, title='Content', description='Variant-specific content blocks in JSON format.') class-attribute instance-attribute

Variant-specific content blocks in JSON format.

cost = Field(default=None, ge=0, max_digits=19, decimal_places=2, title='Cost', description='Cost of goods sold for this variant.') class-attribute instance-attribute

Cost of goods sold for this variant.

currency = Field(default=None, max_length=3, title='Currency', description='Currency code for price fields.') class-attribute instance-attribute

Currency code for price fields.

grams = Field(default=None, ge=0, title='Grams', description='Weight in grams.') class-attribute instance-attribute

Weight in grams.

handle = Field(default=None, max_length=255, title='Handle', description='URL-friendly variant identifier.') class-attribute instance-attribute

URL-friendly variant identifier.

image = Field(default=None, title='Image ID', description='ID of the main image of the variant.') class-attribute instance-attribute

ID of the main image of the variant.

inventory_policy = Field(default=None, max_length=255, title='Inventory Policy', description='Policy for handling out-of-stock variants.') class-attribute instance-attribute

Policy for handling out-of-stock variants.

inventory_quantity = Field(default=None, ge=0, title='Inventory Quantity', description='Available stock quantity.') class-attribute instance-attribute

Available stock quantity.

position = Field(default=None, ge=1, title='Position', description='Display position in product variant list.') class-attribute instance-attribute

Display position in product variant list.

price = Field(default=None, gt=0, max_digits=19, decimal_places=2, title='Price', description='Variant selling price.') class-attribute instance-attribute

Variant selling price.

seo_meta = Field(default=None, title='SEO Meta', description='SEO metadata for this variant.') class-attribute instance-attribute

SEO metadata for this variant.

sku = Field(default=None, title='SKU', description='Stock Keeping Unit identifier.') class-attribute instance-attribute

Stock Keeping Unit identifier.

tax_code = Field(default=None, title='Tax Code', description='Tax classification code.') class-attribute instance-attribute

Tax classification code.

taxable = Field(default=None, title='Taxable', description='Whether this variant is subject to taxes.') class-attribute instance-attribute

Whether this variant is subject to taxes.

title = Field(default=None, max_length=255, title='Title', description='Variant title or name.') class-attribute instance-attribute

Variant title or name.

weight = Field(default=None, ge=0, title='Weight', description='Variant weight for shipping calculations.') class-attribute instance-attribute

Variant weight for shipping calculations.

weight_unit = Field(default=None, max_length=31, title='Weight Unit', description='Unit of measurement for weight.') class-attribute instance-attribute

Unit of measurement for weight.

Redirect

Bases: BaseRedirect, Resource

Model for redirect resources.

RedirectCreate

Bases: BaseRedirect, CreateModel

Model for creating redirect resources.

RedirectUpdate

Bases: UpdateModel

Model for updating redirect resources.

path = Field(default=None) class-attribute instance-attribute

Source path for the redirect.

permanent = Field(default=None) class-attribute instance-attribute

Whether the redirect is permanent (HTTP 301) or temporary (HTTP 302).

target = Field(default=None) class-attribute instance-attribute

Target path for the redirect.

Site

Bases: BaseResource

Site resource model.

Represents a complete site/website with all available fields from the detail endpoint.

address1 = Field(default=None, title='Address Line 1', description="First line of the site's address.") class-attribute instance-attribute

First line of the site's address.

address2 = Field(default=None, title='Address Line 2', description="Second line of the site's address.") class-attribute instance-attribute

Second line of the site's address.

asset_bucket = Field(default=None, title='Asset Bucket', description='Storage bucket for site assets.') class-attribute instance-attribute

Storage bucket for site assets.

asset_domain = Field(default=None, title='Asset Domain', description='CDN domain for serving site assets.') class-attribute instance-attribute

CDN domain for serving site assets.

city = Field(default=None, title='City', description="City of the site's address.") class-attribute instance-attribute

City of the site's address.

country = Field(default=None, title='Country', description="Country of the site's address.") class-attribute instance-attribute

Country of the site's address.

currency = Field(default=None, title='Currency', description='Default currency code for the site.') class-attribute instance-attribute

Default currency code for the site.

domain = Field(..., title='Domain', description='The primary domain of the site.') class-attribute instance-attribute

The primary domain of the site.

email = Field(default=None, title='Email', description='Contact email address for the site.') class-attribute instance-attribute

Contact email address for the site.

id property

Alias for uid to provide uniform interface.

konigle_domain = Field(..., title='Konigle Domain', description='The konigle.net domain.') class-attribute instance-attribute

The konigle.net domain.

name = Field(..., title='Site Name', description='The name of the website.') class-attribute instance-attribute

The name of the site/website.

password_enabled = Field(default=False, title='Password Enabled', description='Whether password protection is enabled for the site.') class-attribute instance-attribute

Whether password protection is enabled for the site.

phone = Field(default=None, title='Phone Number', description='Contact phone number for the site.') class-attribute instance-attribute

Contact phone number for the site.

province = Field(default=None, title='Province/State', description="Province or state of the site's address.") class-attribute instance-attribute

Province or state of the site's address.

uid = Field(..., title='UID', description='Unique identifier of the site.') class-attribute instance-attribute

Unique identifier of the site.

SiteUpdate

Bases: UpdateModel

Site update model.

Defines fields that can be updated for a site. Only includes mutable fields from the mutation serializer.

address1 = Field(default=None, title='Address Line 1', description="First line of the site's address.") class-attribute instance-attribute

First line of the site's address.

address2 = Field(default=None, title='Address Line 2', description="Second line of the site's address.") class-attribute instance-attribute

Second line of the site's address.

city = Field(default=None, title='City', description="City of the site's address.") class-attribute instance-attribute

City of the site's address.

country = Field(default=None, title='Country', description="Country of the site's address.") class-attribute instance-attribute

Country of the site's address.

name = Field(default=None, title='Site Name', description='The name of the site/website.') class-attribute instance-attribute

The name of the site/website.

phone = Field(default=None, title='Phone Number', description='Contact phone number for the site.') class-attribute instance-attribute

Contact phone number for the site.

province = Field(default=None, title='Province/State', description="Province or state of the site's address.") class-attribute instance-attribute

Province or state of the site's address.

Template

Bases: BaseTemplate, TimestampedResource

Template resource model.

Represents a template for building landing pages with components.

handle = Field(..., max_length=255, title='Handle', description='Handle to identify template') class-attribute instance-attribute

Handle to identify template

included_component_ids = Field(default_factory=list, title='Included Component IDs', description='List of component IDs included in the template') class-attribute instance-attribute

List of component IDs included in the template. This is a computed field.

TemplateCreate

Bases: BaseTemplate, CreateModel

Model for creating a new template.

Contains all required and optional fields for template creation.

TemplateUpdate

Bases: UpdateModel

Model for updating an existing template.

All fields are optional for partial updates.

base = Field(default=None, title='Base Template', description='Base template ID for this template') class-attribute instance-attribute

Base template ID for this template.

body_end_snippets = Field(default=None, title='Body End Snippets', description='HTML snippets to inject before </body>') class-attribute instance-attribute

HTML snippets to inject before . Can contain scripts, tracking codes, etc. The snippets are supported only for root template as of now.

handle = Field(default=None, max_length=255, title='Handle', description='Handle to identify template') class-attribute instance-attribute

Handle to identify template

head_snippets = Field(default=None, title='Head Snippets', description='HTML snippets to inject in the <head> section') class-attribute instance-attribute

HTML snippets to inject in the section. Can contain scripts, stylesheets, meta tags, fonts, tracking codes, etc.

The snippets are supported only for root template as of now.

is_base = Field(default=None, title='Is Base Template', description='Whether this is a base template for common layout') class-attribute instance-attribute

Whether this is a base template for common layout.

layout = Field(default=None, title='Layout', description='Layout containing header, footer, main etc.') class-attribute instance-attribute

Layout containing header, footer, main etc.

name = Field(default=None, max_length=255, title='Name', description='Name of the template for identification') class-attribute instance-attribute

Name of the template for identification.

TimestampedResource

Bases: BaseModel

Timestamped resource model for commerce resources.

Provides the djshopify timestamp fields that are common across products, variants, and images.

created_at = Field(default=None, title='Created At', description='Timestamp when the resource was created.') class-attribute instance-attribute

Created timestamp of the resource.

updated_at = Field(default=None, title='Updated At', description='Timestamp when the resource was last updated in the source system.') class-attribute instance-attribute

Last updated timestamp of the resource.

Upload

Bases: Resource

Upload model for general purpose file uploads.

created_at = Field(..., title='Created At', description='Creation timestamp.') class-attribute instance-attribute

Creation timestamp.

description = Field(default='', max_length=1000, title='Description', description='Optional description of the upload') class-attribute instance-attribute

Optional description of the upload

etag = Field(default='', max_length=64, title='ETag', description='ETag or checksum of the file content') class-attribute instance-attribute

ETag or checksum of the file content

meta = Field(default_factory=dict, title='Metadata', description='Additional metadata such as width, height for images') class-attribute instance-attribute

Additional metadata such as width, height for images

mime_type = Field(..., max_length=100, title='MIME Type', description='MIME type of the uploaded file') class-attribute instance-attribute

MIME type of the uploaded file

name = Field(default='', max_length=255, title='Name', description='Name of the file for display and search purposes') class-attribute instance-attribute

Name of the file for display and search purposes

size = Field(default=0, ge=0, title='Size', description='Size of the file in bytes') class-attribute instance-attribute

Size of the file in bytes

status = Field(default=(UploadStatus.COMPLETED), title='Status', description='Status of the upload') class-attribute instance-attribute

Status of the upload

storage_path = Field(default='', max_length=500, title='Storage Path', description='Object key or path in the storage backend') class-attribute instance-attribute

Object key or path in the storage backend

tags = Field(default_factory=list, title='Tags', description='Tags for categorization') class-attribute instance-attribute

Tags for categorization

upload_ended_at = Field(None, title='Upload Ended At', description='Timestamp when the upload ended') class-attribute instance-attribute

Timestamp when the upload ended

upload_started_at = Field(None, title='Upload Started At', description='Timestamp when the upload started') class-attribute instance-attribute

Timestamp when the upload started

url = Field(..., title='File URL', description='URL to access the uploaded file') class-attribute instance-attribute

URL to access the uploaded file

UploadCreate

Bases: CreateModel

Create model for file uploads.

description = Field(default=None, title='Description', description='Optional description of the upload') class-attribute instance-attribute

Optional description of the upload

file = Field(..., title='File', description='File to upload. Can be file path, bytes, BytesIO, BinaryIO, or tuple of (file_data, filename)') class-attribute instance-attribute

File to upload. Can be file path, bytes, BytesIO, BinaryIO, or tuple of (file_data, filename)

meta = Field(default=None, title='Meta', description='Optional metadata dictionary') class-attribute instance-attribute

Optional metadata dictionary

name = Field(default='', max_length=255, title='Name', description='Name of the file for display and search purposes') class-attribute instance-attribute

Name of the file for display and search purposes

tags = Field(default='', title='Tags', description='Tags for categorization. Comma-separated string.') class-attribute instance-attribute

Tags for categorization. Comma-separated string.

normalize_file()

Convert file paths or bytes to FileInput.

validate_file(v) classmethod

Ensure we're uploading a supported file type.

Video

Bases: BaseAsset

Video asset model.

VideoCreate

Bases: BaseAssetCreate

Create model for video assets.

file = Field(..., title='File', description='Video file to upload. Can be file path, bytes, BytesIO, BinaryIO, or tuple of (file_data, filename)') class-attribute instance-attribute

Video file to upload. Can be file path, bytes, BytesIO, BinaryIO, or tuple of (file_data, filename)

normalize_file()

Convert file paths or bytes to FileInput.

validate_video_file(v) classmethod

Ensure we're uploading a video file.

VideoUpdate

Bases: BaseAssetUpdate

Update model for video assets - file cannot be updated.