Skip to content

schemas

Monzo API 'attachments' related schemas.

MonzoAttachment

Bases: BaseModel

API schema for an 'attachment' object.

Note

Monzo API docs: https://docs.monzo.com/#attachments

Attributes:

Name Type Description
id str

The ID of the attachment.

user_id str

The ID of the user who owns this attachment.

external_id str

The ID of the transaction to associate the attachment with.

file_url str

The URL at which the attachment is available.

file_type str

The content type of the attachment.

created datetime

The timestamp in UTC when the attachment was created.

Source code in pymonzo/attachments/schemas.py
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
class MonzoAttachment(BaseModel):
    """API schema for an 'attachment' object.

    Note:
        Monzo API docs: https://docs.monzo.com/#attachments

    Attributes:
        id: The ID of the attachment.
        user_id: The ID of the user who owns this attachment.
        external_id: The ID of the transaction to associate the attachment with.
        file_url: The URL at which the attachment is available.
        file_type: The content type of the attachment.
        created: The timestamp in UTC when the attachment was created.
    """

    model_config = ConfigDict(extra="allow")

    id: str
    user_id: str
    external_id: str
    file_url: str
    file_type: str
    created: datetime

MonzoAttachmentResponse

Bases: BaseModel

API schema for an 'attachment upload' API response.

Note

Monzo API docs: https://docs.monzo.com/#upload-attachment

Attributes:

Name Type Description
file_url str

The URL of the file once it has been uploaded.

upload_url str

The URL to POST the file to when uploading.

Source code in pymonzo/attachments/schemas.py
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
class MonzoAttachmentResponse(BaseModel):
    """API schema for an 'attachment upload' API response.

    Note:
        Monzo API docs: https://docs.monzo.com/#upload-attachment

    Attributes:
        file_url: The URL of the file once it has been uploaded.
        upload_url: The URL to `POST` the file to when uploading.
    """

    model_config = ConfigDict(extra="allow")

    file_url: str
    upload_url: str