Skip to content

Webhooks and misc

File attachments, change feeds, webhook subscriptions and the authenticated profile.

Bases: SyncAPIResource

Upload files to attach to other resources.

create

create(
    file: FileInput, *, filename: str | None = None
) -> FileAttachment

Upload a file to attach to any resource that provides a file_attachment_id.

This does not upload the file into the DMS (GED). The maximum allowed file size is 100MB. Allowed content types: image/png, image/jpeg, image/tiff, image/bmp, image/gif, application/pdf.

Scope: file_attachments:all. Reference: https://pennylane.readme.io/reference/postfileattachments

Parameters:

Name Type Description Default
file FileInput

A path, raw bytes, a binary file-like object, or a (filename, content) tuple.

required
filename str | None

Name of the file (max 255 characters). Defaults to the uploaded file's own name.

None

Bases: SyncAPIResource

Track change events (insert/update/delete) for company resources.

customer_invoices

customer_invoices(
    *,
    cursor: str | None = None,
    limit: int | None = None,
    start_date: date | None = None,
) -> SyncCursorPage[ChangelogEvent]

List customer invoice change events.

Scope: customer_invoices:readonly. Reference: https://pennylane.readme.io/reference/getcustomerinvoiceschanges

Parameters:

Name Type Description Default
cursor str | None

Pagination cursor from a previous page.

None
limit int | None

Results per page (1-100, API default 20).

None
start_date date | None

Only return events processed on or after this date.

None

supplier_invoices

supplier_invoices(
    *,
    cursor: str | None = None,
    limit: int | None = None,
    start_date: date | None = None,
) -> SyncCursorPage[ChangelogEvent]

List supplier invoice change events.

Scope: supplier_invoices:readonly. Reference: https://pennylane.readme.io/reference/getsupplierinvoiceschanges

Parameters:

Name Type Description Default
cursor str | None

Pagination cursor from a previous page.

None
limit int | None

Results per page (1-100, API default 20).

None
start_date date | None

Only return events processed on or after this date.

None

customers

customers(
    *,
    cursor: str | None = None,
    limit: int | None = None,
    start_date: date | None = None,
) -> SyncCursorPage[ChangelogEvent]

List customer change events.

Scope: customers:readonly. Reference: https://pennylane.readme.io/reference/getcustomerchanges

Parameters:

Name Type Description Default
cursor str | None

Pagination cursor from a previous page.

None
limit int | None

Results per page (1-100, API default 20).

None
start_date date | None

Only return events processed on or after this date.

None

suppliers

suppliers(
    *,
    cursor: str | None = None,
    limit: int | None = None,
    start_date: date | None = None,
) -> SyncCursorPage[ChangelogEvent]

List supplier change events.

Scope: suppliers:readonly. Reference: https://pennylane.readme.io/reference/getsupplierchanges

Parameters:

Name Type Description Default
cursor str | None

Pagination cursor from a previous page.

None
limit int | None

Results per page (1-100, API default 20).

None
start_date date | None

Only return events processed on or after this date.

None

products

products(
    *,
    cursor: str | None = None,
    limit: int | None = None,
    start_date: date | None = None,
) -> SyncCursorPage[ChangelogEvent]

List product change events.

Scope: products:readonly. Reference: https://pennylane.readme.io/reference/getproductchanges

Parameters:

Name Type Description Default
cursor str | None

Pagination cursor from a previous page.

None
limit int | None

Results per page (1-100, API default 20).

None
start_date date | None

Only return events processed on or after this date.

None

ledger_entry_lines

ledger_entry_lines(
    *,
    cursor: str | None = None,
    limit: int | None = None,
    start_date: date | None = None,
) -> SyncCursorPage[ChangelogEvent]

List ledger entry line change events.

Scope: ledger_entries:readonly. Reference: https://pennylane.readme.io/reference/getledgerentrylinechanges

Parameters:

Name Type Description Default
cursor str | None

Pagination cursor from a previous page.

None
limit int | None

Results per page (1-100, API default 20).

None
start_date date | None

Only return events processed on or after this date.

None

transactions

transactions(
    *,
    cursor: str | None = None,
    limit: int | None = None,
    start_date: date | None = None,
) -> SyncCursorPage[ChangelogEvent]

List transaction change events.

Scope: transactions:readonly. Reference: https://pennylane.readme.io/reference/gettransactionchanges

Parameters:

Name Type Description Default
cursor str | None

Pagination cursor from a previous page.

None
limit int | None

Results per page (1-100, API default 20).

None
start_date date | None

Only return events processed on or after this date.

None

quotes

quotes(
    *,
    cursor: str | None = None,
    limit: int | None = None,
    start_date: date | None = None,
) -> SyncCursorPage[ChangelogEvent]

List quote change events.

Scope: quotes:readonly. Reference: https://pennylane.readme.io/reference/getquotechanges

Parameters:

Name Type Description Default
cursor str | None

Pagination cursor from a previous page.

None
limit int | None

Results per page (1-100, API default 20).

None
start_date date | None

Only return events processed on or after this date.

None

Bases: SyncAPIResource

Manage webhook subscriptions.

Beta: subject to change.

list

list(
    *, cursor: str | None = None, limit: int | None = None
) -> SyncCursorPage[WebhookSubscription]

List webhook subscriptions.

Beta: subject to change.

Reference: https://pennylane.readme.io/reference/getwebhooksubscriptions

Parameters:

Name Type Description Default
cursor str | None

Pagination cursor from a previous page.

None
limit int | None

Results per page (API default 20).

None

get

get(webhook_subscription_id: int) -> WebhookSubscription

Retrieve a webhook subscription.

Beta: subject to change.

Reference: https://pennylane.readme.io/reference/getwebhooksubscription

create

create(
    *,
    callback_url: str,
    events: list[str],
    enabled: bool | None = None,
) -> WebhookSubscription

Create a webhook subscription.

Beta: subject to change.

The response's secret field is the HMAC signing secret for verifying webhook deliveries. It is generated automatically and returned only in this creation response: store it immediately, it cannot be retrieved again afterwards.

Reference: https://pennylane.readme.io/reference/postwebhooksubscriptions

Parameters:

Name Type Description Default
callback_url str

HTTPS URL where webhook events will be sent.

required
events list[str]

Event types to subscribe to.

required
enabled bool | None

Whether the subscription is active (API default True).

None

update

update(
    webhook_subscription_id: int,
    *,
    callback_url: str | None = None,
    events: list[str] | None = None,
    enabled: bool | None = None,
) -> WebhookSubscription

Update a webhook subscription. Only the provided fields are modified.

Beta: subject to change.

Reference: https://pennylane.readme.io/reference/putwebhooksubscription

delete

delete(webhook_subscription_id: int) -> None

Delete a webhook subscription.

Beta: subject to change.

Reference: https://pennylane.readme.io/reference/deletewebhooksubscription

Bases: SyncAPIResource

Retrieve the authenticated user and company profile.

retrieve

retrieve() -> MeProfile

Return information about the company and the user tied to the token.

Scope: none (available with any valid token). Reference: https://pennylane.readme.io/reference/getme