Skip to content

Implementation example

This section gives step-by-step examples for fetching data for a My Pages experience. Refer to the API Reference for exact paths and parameters.

Step 1: Spaces for tenants

Fetch spaces (e.g. apartments) for a set of tenants.

  • From the results you can then load buildings, real estates, communities, etc.

Endpoint: GET /objects/spaces/spaces/apartment/list/

GET .../objects/spaces/spaces/apartment/list/?_page=1&_page_size=500&tenants=<tenant-id-1>,<tenant-id-2>

Query parameters:

  • _page — Page number (e.g. 1)
  • _page_size — Page size (e.g. 500)
  • tenants — Comma-separated tenant IDs

Step 2: Contracts for tenants

Fetch rentable contracts for a set of tenants.

  • For other contract types, use the corresponding list with a tenants filter where supported.

Endpoint: GET /contracts/apartmentcontract/list/

GET .../contracts/apartmentcontract/list/?_page=1&_page_size=500&tenants=<tenant-id-1>,<tenant-id-2>

Query parameters:

  • _page — Page number (e.g. 1)
  • _page_size — Page size (e.g. 500)
  • tenants — Comma-separated tenant IDs

Step 3: Contract files (signed outside Pigello)

Fetch contracts.signedcontractdocument items for the contracts from step 2.

  • Use the contract content type (e.g. contracts.apartmentcontract) for <content-type>.

Endpoint: List endpoint for contracts.signedcontractdocument.

GET .../contracts/signedcontractdocument/list/<content-type>/?_page=1&_page_size=500&object_id__in=<contract-id-1>,<contract-id-2>

Query parameters:

  • _page — Page number (e.g. 1)
  • _page_size — Page size (e.g. 500)
  • object_id__in — Comma-separated contract IDs from step 2

Step 4: Contract files (signed in Pigello)

Fetch documents.signabledocument items for the contracts from step 2.

  • Document payloads are often ZIPs; unzip to get the final PDF and metadata.

Endpoint: List endpoint for documents.signabledocument.

GET .../documents/signing/signabledocument/list/<content-type>/?_page=1&_page_size=500&object_id__in=<contract-id-1>,<contract-id-2>

Query parameters:

  • _page — Page number (e.g. 1)
  • _page_size — Page size (e.g. 500)
  • object_id__in — Comma-separated contract IDs from step 2

Step 5: Notifications for tenants

Endpoint: GET /communication/notification/list/

GET .../communication/notification/list/?_page=1&_page_size=500&sent_to_tenant__in=<tenant-id-1>,<tenant-id-2>

Query parameters:

  • _page — Page number (e.g. 1)
  • _page_size — Page size (e.g. 500)
  • sent_to_tenant__in — Comma-separated tenant IDs

Step 6: Notification distributions

From the notifications in step 5, fetch their distributions.

Endpoint: GET /communication/notificationdistribution/list/

GET .../communication/notificationdistribution/list/?_page=1&_page_size=500&notification__in=<notification-id-1>,<notification-id-2>

Query parameters:

  • _page — Page number (e.g. 1)
  • _page_size — Page size (e.g. 500)
  • notification__in — Comma-separated notification IDs from step 5

Step 7 (optional): Sendouts

If a notification's content_type is communication.sendout and event_identifier indicates a sent sendout, get the sendout IDs from object_id and fetch communication.sendout.

Endpoint: GET /communication/sendout/list/

GET .../communication/sendout/list/?_page=1&_page_size=500&id__in=<sendout-id-1>,<sendout-id-2>

Query parameters:

  • _page — Page number (e.g. 1)
  • _page_size — Page size (e.g. 500)
  • id__in — Comma-separated sendout IDs from notifications (object_id)

Step 8: Attested invoices for tenant

Endpoint: GET /accounting/invoices/invoice/list/

GET .../accounting/invoices/invoice/list/?_page=1&_page_size=500&tenant=<tenant-id>&attested_date__isnull=False

Query parameters:

  • _page — Page number (e.g. 1)
  • _page_size — Page size (e.g. 500)
  • tenant — Tenant ID
  • attested_date__isnullFalse to only include attested invoices

Step 9: Attested invoices for sub-tenant

Endpoint: GET /accounting/invoices/invoice/list/

GET .../accounting/invoices/invoice/list/?_page=1&_page_size=500&sub_tenant=<tenant-id>&attested_date__isnull=False

Query parameters:

  • _page — Page number (e.g. 1)
  • _page_size — Page size (e.g. 500)
  • sub_tenant — Sub-tenant (tenant) ID
  • attested_date__isnullFalse to only include attested invoices

Step 10: Invoice recipients for tenants

  • From recipients' invoice attribute, build the set of invoice IDs for the next steps.

Endpoint: GET /accounting/invoices/invoicerecipient/list/

GET .../accounting/invoices/invoicerecipient/list/?_page=1&_page_size=500&tenant__in=<tenant-id-1>,<tenant-id-2>

Query parameters:

  • _page — Page number (e.g. 1)
  • _page_size — Page size (e.g. 500)
  • tenant__in — Comma-separated tenant IDs

Step 11: Invoices by ID

Endpoint: GET /accounting/invoices/invoice/list/

GET .../accounting/invoices/invoice/list/?_page=1&_page_size=500&id__in=<invoice-id-1>,<invoice-id-2>

Query parameters:

  • _page — Page number (e.g. 1)
  • _page_size — Page size (e.g. 500)
  • id__in — Comma-separated invoice IDs from recipients (step 10)

Step 12: Debt invoices for those invoices

Endpoint: GET /accounting/debt/debtinvoice/list/

GET .../accounting/debt/debtinvoice/list/?_page=1&_page_size=500&invoice__in=<invoice-id-1>,<invoice-id-2>

Query parameters:

  • _page — Page number (e.g. 1)
  • _page_size — Page size (e.g. 500)
  • invoice__in — Comma-separated invoice IDs from step 11

Step 13: Payments (various filters)

  • Payments distributed to invoices
  • Payments originally matched but not distributed
  • Payments originally matched or distributed
  • Unhandled payments for tenants
  • All Payments for tenants
  • Payments distributed to debt invoices

Endpoint: GET /accounting/payments/invoicepayment/list/

Payments distributed to invoices:

GET .../accounting/payments/invoicepayment/list/?_page=1&_page_size=500&invoice__in=<invoice-id-1>,<invoice-id-2>

Query parameters:

  • _page — Page number (e.g. 1)
  • _page_size — Page size (e.g. 500)
  • invoice__in — Comma-separated invoice IDs

Payments originally matched but not distributed:

GET .../accounting/payments/invoicepayment/list/?_page=1&_page_size=500&original_invoice__in=<invoice-id-1>,<invoice-id-2>&invoice__isnull=true&debt_invoice__isnull=true

Query parameters:

  • _page — Page number (e.g. 1)
  • _page_size — Page size (e.g. 500)
  • original_invoice__in — Comma-separated invoice IDs
  • invoice__isnulltrue (not yet distributed to an invoice)
  • debt_invoice__isnulltrue (not distributed to a debt invoice)

Payments originally matched or distributed to invoices:

GET .../accounting/payments/invoicepayment/list/?_page=1&_page_size=500&invoices_indirect=<invoice-id-1>,<invoice-id-2>

Query parameters:

  • _page — Page number (e.g. 1)
  • _page_size — Page size (e.g. 500)
  • invoices_indirect — Comma-separated invoice IDs (matched or distributed)

Unhandled payments for tenants:

GET .../accounting/payments/invoicepayment/list/?_page=1&_page_size=500&tenant__in=<tenant-id-1>,<tenant-id-2>&invoice__isnull=true&original_invoice__isnull=true&debt_invoice__isnull=true

Query parameters:

  • _page — Page number (e.g. 1)
  • _page_size — Page size (e.g. 500)
  • tenant__in — Comma-separated tenant IDs
  • invoice__isnulltrue
  • original_invoice__isnulltrue
  • debt_invoice__isnulltrue

Payments for tenants (all):

GET .../accounting/payments/invoicepayment/list/?_page=1&_page_size=500&tenant__in=<tenant-id-1>,<tenant-id-2>

Query parameters:

  • _page — Page number (e.g. 1)
  • _page_size — Page size (e.g. 500)
  • tenant__in — Comma-separated tenant IDs

Payments distributed to debt invoices:

GET .../accounting/payments/invoicepayment/list/?_page=1&_page_size=500&debt_invoice__in=<debt-invoice-id-1>,<debt-invoice-id-2>

Query parameters:

  • _page — Page number (e.g. 1)
  • _page_size — Page size (e.g. 500)
  • debt_invoice__in — Comma-separated debt invoice IDs from step 12

Step 14: General errands (reported by tenants)

Serialization can depend on errand type/sub-type and client; contact support for details.

Endpoint: GET /errands/generalerrands/reporting/generalerrand/

GET .../errands/generalerrands/reporting/generalerrand/?_page=1&_page_size=500&reporter_tenant__in=<tenant-id-1>,<tenant-id-2>

Query parameters:

  • _page — Page number (e.g. 1)
  • _page_size — Page size (e.g. 500)
  • reporter_tenant__in — Comma-separated tenant IDs (reported by these tenants)

Step 15: General errands (created by tenants)

Endpoint: GET /errands/generalerrands/reporting/generalerrand/

GET .../errands/generalerrands/reporting/generalerrand/?_page=1&_page_size=500&creator_tenant__in=<tenant-id-1>,<tenant-id-2>

Query parameters:

  • _page — Page number (e.g. 1)
  • _page_size — Page size (e.g. 500)
  • creator_tenant__in — Comma-separated tenant IDs (created by these tenants)

Step 16: General errands (tenants as reviewers/subscribers)

Endpoint: GET /errands/generalerrands/reporting/generalerrand/

GET .../errands/generalerrands/reporting/generalerrand/?_page=1&_page_size=500&tenant_reviewers__in=<tenant-id-1>,<tenant-id-2>

Query parameters:

  • _page — Page number (e.g. 1)
  • _page_size — Page size (e.g. 500)
  • tenant_reviewers__in — Comma-separated tenant IDs (tenants as reviewers/subscribers)

Step 17: General errand files

From the errands in steps 14–16, fetch attached files.

Endpoint: GET /errands/generalerrands/reporting/generalerrandfile/

GET .../errands/generalerrands/reporting/generalerrandfile/?_page=1&_page_size=500&errand__in=<errand-id-1>,<errand-id-2>

Query parameters:

  • _page — Page number (e.g. 1)
  • _page_size — Page size (e.g. 500)
  • errand__in — Comma-separated errand IDs from steps 14–16

Step 18: Inspection errands for apartments

Endpoint: GET /errands/inspections/reporting/inspectionerrand/

GET .../errands/inspections/reporting/inspectionerrand/?_page=1&_page_size=500&apartment__in=<apartment-id-1>,<apartment-id-2>

Query parameters:

  • _page — Page number (e.g. 1)
  • _page_size — Page size (e.g. 500)
  • apartment__in — Comma-separated apartment IDs from step 1

Step 19: Inspection faults for those inspections

Endpoint: GET /errands/inspections/reporting/inspectionerrandfault/

GET .../errands/inspections/reporting/inspectionerrandfault/?_page=1&_page_size=500&inspection_errand__in=<inspection-id-1>,<inspection-id-2>

Query parameters:

  • _page — Page number (e.g. 1)
  • _page_size — Page size (e.g. 500)
  • inspection_errand__in — Comma-separated inspection errand IDs from step 18