Skip to main content

planpoint-sdk

Official Python SDK for the PlanPoint API.

Installation

pip install planpoint-sdk

Quick Start

import planpoint

# 1. Authenticate
auth_client = planpoint.PlanpointApi(token=None)
login_response = auth_client.authentication.login(
    username="you@example.com",
    password="yourpassword"
)
token = login_response.token

# 2. Create an authenticated client
client = planpoint.PlanpointApi(token=token)

# 3. Fetch your projects
projects = client.projects.get_my_projects()
for p in projects:
    print(p.name, p.namespace)

API Reference

Authentication

client.authentication.login(**kwargs)

Authenticate and receive a JWT token.
ParamTypeRequiredDescription
usernamestrYesUser email
passwordstrNoUser password
impersonateboolNoImpersonate another user
Returns: LoginResponse.token: str

Projects

client.projects.get_my_projects()

List all projects belonging to the authenticated user. Requires auth. Returns: list[ProjectSummary].name, .namespace, .host_name, .status, .paused, .created_at

client.projects.find_project(**kwargs)

Find a public project by namespace and hostname. No auth required.
ParamTypeRequiredDescription
namespacestrYesProject namespace
host_namestrYesAllowed hostname
Returns: Project — full project with floors, units, settings

client.projects.get_project(**kwargs)

Get a project by ID. Requires auth.
ParamTypeRequiredDescription
idstrYesProject ObjectId
Returns: Project

client.projects.update_project(**kwargs)

Update project settings. Requires auth.
ParamTypeRequiredDescription
idstrYesProject ObjectId
requestdictYesFields to update
Returns: Project

Groups

client.groups.get_groups()

List all groups for the authenticated user. Returns: GroupsListResponse.records: list[Group], .count: int

client.groups.get_group(**kwargs)

Get a group by ID.
ParamTypeRequiredDescription
idstrYesGroup ObjectId
Returns: Group.name, .namespace, .host_name, .type, .projects, .is_owner, .is_admin, .is_editor

client.groups.create_group(**kwargs)

Create a new group.
ParamTypeRequiredDescription
namestrYesGroup name
namespacestrNoNamespace
host_namestrNoHostname
typestrNoGroup type
property_typestrNoProperty type
Returns: Group

client.groups.update_group(**kwargs)

Update a group.
ParamTypeRequiredDescription
idstrYesGroup ObjectId
requestdictYesFields to update
Returns: Group

Floors

client.floors.get_floors(**kwargs)

List all floors for a project.
ParamTypeRequiredDescription
pidstrYesProject ObjectId
Returns: list[FloorFull].name, .project, .level, .position, .path, .image

client.floors.get_floor(**kwargs)

Get a floor by ID.
ParamTypeRequiredDescription
idstrYesFloor ObjectId
Returns: FloorFull

client.floors.create_floor(**kwargs)

Create a new floor.
ParamTypeRequiredDescription
projectdictYes{"_id": "<project_id>"}
namestrYesFloor name
positionintNoDisplay order
pathstrNoSVG/image path
alternative_pathslist[str]NoAdditional paths
Returns: FloorFull

client.floors.update_floor(**kwargs)

Update a floor.
ParamTypeRequiredDescription
idstrYesFloor ObjectId
requestdictYesFields to update
Returns: FloorFull

Units

client.units.get_units(**kwargs)

List all units for a project.
ParamTypeRequiredDescription
pidstrYesProject ObjectId
Returns: UnitsListResponse.records: list[UnitFull], .count: int UnitFull fields: .floor, .name, .unit_number, .status, .price, .bed, .bath, .sqft, .model, .orientation, .parking status values: Available | OnHold | Sold | Leased | Unavailable

client.units.get_unit(**kwargs)

Get a unit by ID.
ParamTypeRequiredDescription
idstrYesUnit ObjectId
Returns: UnitFull

client.units.create_unit(**kwargs)

Create a new unit.
ParamTypeRequiredDescription
floordictYes{"_id": "<floor_id>"}
Returns: UnitFull

client.units.update_unit(**kwargs)

Update a unit.
ParamTypeRequiredDescription
idstrYesUnit ObjectId
requestdictYesFields to update
Returns: UnitFull

client.units.delete_unit(**kwargs)

Delete a unit.
ParamTypeRequiredDescription
idstrYesUnit ObjectId
Returns: dict{ "message": str }

client.units.batch_update_units(**kwargs)

Update multiple units at once.
ParamTypeRequiredDescription
idslist[str]YesUnit ObjectIds to update
patch_datadictYesFields to apply to all
Returns: list[UnitFull]

Leads

client.leads.get_leads(**kwargs)

List all leads for a project.
ParamTypeRequiredDescription
pidstrYesProject ObjectId
Returns: list[Lead].name, .email, .phone, .message, .unit, .created_at