Skip to content

CLI Reference

Command-line interface for the PropertyMe API. Outputs JSON to stdout for easy parsing and automation.

Authentication

One-time setup required before using data commands:

pypropertyme auth

This opens a browser for OAuth login. Tokens are stored in ~/.pypropertyme/tokens.json and automatically refresh.

Command Overview

Command Description --id Additional Options
auth Authenticate with PropertyMe API - -
contacts Contact management Yes -
properties Property listings Yes --type
tenancies Tenancy management No --balances
members Team members No -
tasks Task management Yes -
inspections Inspection records Yes -
jobs Maintenance jobs Yes -

All data commands support -o, --output PATH to save to file instead of stdout.

Commands

auth

Authenticate with PropertyMe API via OAuth.

pypropertyme auth

contacts

List all contacts or fetch a single contact by ID.

When fetching by ID, returns full contact details including folio_id, contact code, and nested contact information.

# List all contacts
pypropertyme contacts

# Get full contact details by ID
pypropertyme contacts --id <contact_id>

# Save to file
pypropertyme contacts -o contacts.json

properties

List properties with optional filtering, or fetch by ID.

When fetching by ID, returns full property details including ownership, tenancy, listings, and financial information.

Options:

Option Description
--id TEXT Fetch single property by ID (returns full details)
--type [all\|sales\|rentals\|archived\|vacant] Filter by property type (default: all)
-o, --output PATH Save to file
# List all properties
pypropertyme properties

# List only rental properties
pypropertyme properties --type rentals

# List sales properties
pypropertyme properties --type sales

# List archived properties
pypropertyme properties --type archived

# List vacant properties
pypropertyme properties --type vacant

# Get full property details by ID
pypropertyme properties --id <property_id>

tenancies

List tenancies or tenancy balances.

Options:

Option Description
--balances Fetch tenancy balances instead of tenancies
-o, --output PATH Save to file

Note

Does not support --id (API limitation).

# List all tenancies
pypropertyme tenancies

# List tenancy balances (financial data)
pypropertyme tenancies --balances

# Save to file
pypropertyme tenancies -o tenancies.json

members

List team members.

Note

Does not support --id (API limitation).

# List all team members
pypropertyme members

# Save to file
pypropertyme members -o members.json

tasks

List tasks or fetch by ID.

# List all tasks
pypropertyme tasks

# Get single task by ID
pypropertyme tasks --id <task_id>

# Save to file
pypropertyme tasks -o tasks.json

inspections

List inspections or fetch a single inspection by ID.

When fetching by ID, returns full inspection details including property, owner, tenant, and inspection report data.

Note

API returns inspections filtered by 'changed' timestamp, may not include all historical records.

# List recent inspections
pypropertyme inspections

# Get full inspection details by ID
pypropertyme inspections --id <inspection_id>

# Save to file
pypropertyme inspections -o inspections.json

jobs

List maintenance jobs or fetch by ID.

# List all maintenance jobs
pypropertyme jobs

# Get single job by ID
pypropertyme jobs --id <job_id>

# Save to file
pypropertyme jobs -o jobs.json

Output Format

All data commands output JSON to stdout by default. Status messages go to stderr.

Array output (list commands):

[
  {"id": "abc-123", "name": "...", ...},
  {"id": "def-456", "name": "...", ...}
]

Single record (with --id):

[
  {"id": "abc-123", "name": "...", ...}
]

Empty result:

[]

Entity Fields

For a complete list of fields available on each entity, see the API Reference.

Common Workflows

Export All Data

pypropertyme contacts -o contacts.json
pypropertyme properties -o properties.json
pypropertyme tenancies -o tenancies.json
pypropertyme members -o members.json
pypropertyme tasks -o tasks.json
pypropertyme inspections -o inspections.json
pypropertyme jobs -o jobs.json

Filter with jq

# Get contact emails
pypropertyme contacts | jq '.[].email'

# Find properties with rent > $2000/month
pypropertyme properties | jq '[.[] | select(.rent_amount > 2000 and .rent_period == "monthly")]'

# Get active tenancies only
pypropertyme tenancies | jq '[.[] | select(.is_active == true)]'

# Find overdue tasks
pypropertyme tasks | jq '[.[] | select(.task_status == "ToDo")]'

# Get open jobs
pypropertyme jobs | jq '[.[] | select(.status == "Assigned" or .status == "Quoted")]'

Get Specific Records

# Get property details for reporting
pypropertyme properties --id <id> | jq '.[0] | {address: .address, owner: .ownership, tenancy: .tenancy}'

# Get contact details
pypropertyme contacts --id <id> | jq '.[0] | {code: .code, folio_id: .folio_id, contact: .contact}'

# Find contact by email
pypropertyme contacts | jq '[.[] | select(.email == "someone@example.com")][0]'

Count Records

pypropertyme contacts | jq 'length'
pypropertyme properties | jq 'length'
pypropertyme tenancies --balances | jq '[.[] | select(.arrears_days > 0)] | length'

API Limitations

Read-Only Access

This CLI only supports GET operations. Cannot create, update, or delete records.

Not available via API:

  • Documents and attachments (POST-only endpoints)
  • Comments (POST-only endpoints)
  • Bills (POST-only endpoint)

--id Limitations

Command --id Status Workaround
contacts Works (returns ContactDetail) -
properties Works (returns PropertyDetail) -
tasks Works -
jobs Works -
inspections Works (returns InspectionDetail) -
members Not supported Use list + jq filter
tenancies Not supported Use list + jq filter
tenancies --balances Not supported Use list + jq filter

Pagination

  • Most list endpoints return all records
  • properties --type (sales/rentals/archived/vacant) uses pagination internally

Error Handling

Not authenticated:

Error: No token found. Please run 'pypropertyme auth' first.

Record not found:

Error: Contact with ID abc123 does not exist.

Network and API errors are displayed to stderr with descriptive messages.