Skip to content

Entities

Postal letter domain types used by the emailing postal_letter subcomponent.

ListPostalLettersQuery dataclass

ListPostalLettersQuery(context, metadata, mode='live')

Metadata-scoped listing (seeuletter list API).

context instance-attribute

context

metadata instance-attribute

metadata

mode class-attribute instance-attribute

mode = 'live'

PostageTypePriority

Bases: StrEnum

Provider postage product codes (MySendingBox / La Poste scale).

ecopli class-attribute instance-attribute

ecopli = 'ecopli'

priority class-attribute instance-attribute

priority = 'prioritaire'

registered_letter class-attribute instance-attribute

registered_letter = 'lr'

registered_letter_with_receipt class-attribute instance-attribute

registered_letter_with_receipt = 'lrar'

PostalAddress dataclass

PostalAddress(
    recipient_name, street, postal_code, city, country
)

Normalized recipient address for provider mapping layers.

city instance-attribute

city

country instance-attribute

country

postal_code instance-attribute

postal_code

recipient_name instance-attribute

recipient_name

street instance-attribute

street

PostalContext dataclass

PostalContext(
    country_code, use_case_key="other", provider_mode="live"
)

Country / environment metadata for provider routing and auditing.

country_code instance-attribute

country_code

provider_mode class-attribute instance-attribute

provider_mode = 'live'

use_case_key class-attribute instance-attribute

use_case_key = 'other'

PostalLetterResult dataclass

PostalLetterResult(
    letter_id, file_url=None, file_page_count=None
)

Provider-neutral outcome of send, retrieve, or list postal operations.

file_page_count class-attribute instance-attribute

file_page_count = None

file_url class-attribute instance-attribute

file_url = None

letter_id instance-attribute

letter_id

SendPostalLetterRequest dataclass

SendPostalLetterRequest(
    context,
    description,
    postal_address,
    source_file,
    in_color,
    postage_type,
    metadata,
    insert_address_on_blank_page=False,
)

Single send operation input for the postal provider.

context instance-attribute

context

description instance-attribute

description

in_color instance-attribute

in_color

insert_address_on_blank_page class-attribute instance-attribute

insert_address_on_blank_page = False

metadata instance-attribute

metadata

postage_type instance-attribute

postage_type

postal_address instance-attribute

postal_address

source_file instance-attribute

source_file

SourceFilePayload dataclass

SourceFilePayload(source_file_type, content)

Letter body input (file, template, remote URL, or HTML).

content instance-attribute

content

source_file_type instance-attribute

source_file_type

SourceFileType

Bases: StrEnum

How the PDF / HTML payload is provided to the provider API.

file class-attribute instance-attribute

file = 'file'

html class-attribute instance-attribute

html = 'html'

remote_url class-attribute instance-attribute

remote_url = 'remote'

template_id class-attribute instance-attribute

template_id = 'template_id'