Skip to main content

planpoint-sdk-go

Official Go SDK for the Planpoint API.

Installation

Note: Responses use JSON200 or JSON201 depending on the endpoint. login, getFloors, and getLeads return JSON200. All other endpoints return JSON201.

Quick Start

API Reference

Authentication

LoginWithResponse(ctx, body)

Authenticate and receive a JWT token. Returns: *LoginResponse{ JSON200: *AuthResponse{ AccessToken, Message } }

Projects

GetMyProjectsWithResponse(ctx)

List all projects belonging to the authenticated user. Requires auth. Returns: *GetMyProjectsResponse{ JSON201: *[]ProjectSummary } ProjectSummary: { Id, Name, Namespace?, HostName?, Status?, Paused?, CreatedAt? }

FindProjectWithResponse(ctx, body)

Find a public project by namespace and hostname. No auth required. Returns: *FindProjectResponse{ JSON201: *Project }

GetProjectWithResponse(ctx, id)

Get a project by ID. Requires auth. Returns: *GetProjectResponse{ JSON201: *Project }

UpdateProjectWithResponse(ctx, id, body)

Update project settings. Requires auth. Returns: *UpdateProjectResponse{ JSON201: *Project }

Groups

GetGroupsWithResponse(ctx)

List all groups for the authenticated user. Requires auth. Returns: *GetGroupsResponse{ JSON201: *GroupsListResponse{ Records, Count } }

GetGroupWithResponse(ctx, id)

Get a group by ID. Requires auth. Returns: *GetGroupResponse{ JSON201: *Group }

CreateGroupWithResponse(ctx, body)

Create a new group. Requires auth. Returns: *CreateGroupResponse{ JSON201: *Group }

UpdateGroupWithResponse(ctx, id, body)

Update a group. Requires auth. Returns: *UpdateGroupResponse{ JSON201: *Group }

Floors

GetFloorsWithResponse(ctx, params)

List all floors for a project. Requires auth. Returns: *GetFloorsResponse{ JSON200: *[]FloorFull } FloorFull: { Id, Name?, Project, Level?, Position?, Path?, Image? }

GetFloorWithResponse(ctx, id)

Get a floor by ID. Requires auth. Returns: *GetFloorResponse{ JSON201: *FloorFull }

CreateFloorWithResponse(ctx, body)

Create a new floor. Requires auth. Returns: *CreateFloorResponse{ JSON201: *FloorFull }

UpdateFloorWithResponse(ctx, id, body)

Update a floor. Requires auth. Returns: *UpdateFloorResponse{ JSON201: *FloorFull }

Units

GetUnitsWithResponse(ctx, params)

List all units for a project. Requires auth. Returns: *GetUnitsResponse{ JSON201: *UnitsListResponse{ Records, Count } } UnitFull: { Id, Floor, Name?, UnitNumber?, Status?, Price?, Bed?, Bath?, Sqft?, Model? } Status values: Available | OnHold | Sold | Leased | Unavailable

GetUnitWithResponse(ctx, id)

Get a unit by ID. Requires auth. Returns: *GetUnitResponse{ JSON201: *UnitFull }

CreateUnitWithResponse(ctx, body)

Create a new unit. Requires auth. Returns: *CreateUnitResponse{ JSON201: *UnitFull }

UpdateUnitWithResponse(ctx, id, body)

Update a unit. Requires auth. Returns: *UpdateUnitResponse{ JSON201: *UnitFull }

DeleteUnitWithResponse(ctx, id)

Delete a unit. Requires auth. Returns: *DeleteUnitResponse

BatchUpdateUnitsWithResponse(ctx, body)

Update multiple units at once. Requires auth. Returns: *BatchUpdateUnitsResponse{ JSON201: *[]UnitFull }

Leads

GetLeadsWithResponse(ctx, params)

List all leads for a project. Requires auth. Returns: *GetLeadsResponse{ JSON200: *[]Lead } Lead: { Id?, Name?, Email?, Phone?, Message?, Unit?, CreatedAt? }