PLNAR REST API Specification (4.4.0)

Download OpenAPI specification:

INTRODUCTION

PLNAR Snap allows users to easily convert measurable 3D models of their interior spaces using smartphone photos captured using the PLNAR Snap App. The Snap project lifecycle begins in the portal where users create projects for reporters in the field who download the the Snap app and instructed to take photos using the Snap flow. Once uploaded from the Snap app, photos are analyzed using PLNAR's AI back-end system and assembled into an accurate digital twin (3D model) of the user's interior space. When finished, the extracted measurements and 3D model can be viewed and interacted with in the PLNAR portal.

PLNAR API

As an alternative to creating projects directly from the PLNAR portal, we provide a public API. The API allows provisioned users to create projects, receive callbacks for key project lifecycle events, and fetch project data directly from their own environments.

The base url for calling the api is https://api.plnar.ai/api/{version}/

AUTHENTICATION

Authentication credentials (client_id and client_secret) are supplied to provisioned company admininstrators in the PLNAR portal. These can be used to request Oauth bearer tokens via the /oauth/token (POST) route which can be used for the downstream API calls. Upon expiration, a new bearer token can be requested as needed.

CREATING PROJECTS

The project creation process is handled using the /project (POST) route. Authentication is performed via the request header while data for the request is provided in the request body. Key data elements include:

  • reporter (required) information is required for the person in the field using the PLNAR Snap app/

  • user (optional) information can be provided to assign the project to an existing user in the PLNAR portal. If user data is not provided, the project will be created in an unassigned state.

  • referenceNumber (optional) can be provided to bind the project to a project ID within your home system.

  • perilType (optional) can be provided for projects representing property claims and/or restoration work.

  • referringSource (optional) can be used to store the referring URL for source referencing, market tracking, etc, .

  • notifications (optional, default=true) which signals whether reporter entry into PLNAR SNAP process should be initiated directly via PLNAR-provided SMS (true) or whether engagement will be handled directly by you using the generated uploadUrl and the redirect method of your choice.

  • communication (optional) Settings which can be used to customized the communications (SMS and emails) sent to the reporter. This provides control of personalization and organization (company) branding in the SMS and email along with the ability to use a custom organization name. This is useful for custom and sub branding under your official company name.

Additional required and optional data elements are further documented below.The response for a successful project creation request will contain all the data necessary to bind the project into your system and to allow downstream tracking of your using the project fetch API.

PROJECT_DATA

After a project is created, interior data (photos, metadata, etc) will be collected in the field by the reporter and uploaded to the PLNAR servers. The data will then be assembled into 3D models of each interior space (room) and reports for the project will be generated. As the data is made available, it will be accessable via both callbacks and the fetch API. Key data components accessible via API include:

  • photos: Direct links to all photos uploaded by the reporter will be available immediately on submission to give you immediate insight to the project as the 3D model and measurement data is being assembled.

  • rooms: A list of rooms and summaries of perimeter, area, and volume measurements for floors, walls, doors, openings, windows foreach room and aggregated for the room. Counts of objects will also be providedl in addition to measurement data for all objects in each room.

  • data: Perimeter, area, and volume measurements for floors, walls, doors, openings, windows foreach room and aggregated for the entire project. Counts of objects will also be provided.

  • shareUrl: (optional) A direct link to the project in the PLNAR portal giving you access to the 3D model, measurement data, reports, exports, etc in an embeddable URL. Your organization needs to be provisioned for share links, or you can enable projects individually, for share links to be available.

  • attachments: Links to reports containing photos, measurements, take-offs raw photos, 2D plan underlays, etc that allow you to share data for your project and upload to your back end integrations as necessary.

The project data will be progressively made available in your project as it moves through its lifecycle. All of the data will be available once the project is in the completed state.

WEBHOOK AND CALLBACKS

PLNAR projects created via the API will fire (POST) callbacks containing project data to a webhook address for all key lifecycle events. These include:

  • project.created Noting that a project has been created.

  • project.inProgress Signaling that a reporter (policyholder, homeowner, etc) has begun documenting their interior using the PLNAR Snap app.

  • project.submitted Alerting you that the project (room data, photos) has been successfully uploaded by the reporter and has begun processing.

  • project.completed Letting you know that the project has completed processing.

In addition to project events, callbacks will be fired for both reporter and user events including:

  • creation Sent when a user or reporter is created.

  • updates Sent when a user or reporter is updated.

  • deletion Sent when a user or reporter is deleted in the PLNAR portal.

You can set up the webhook address for your organization directly in the portal company tab. If left empty, no callbacks will be fired during the project lifecycle but you can still query projects using the fetch API. For security, each request provides a signature (SHA-256 HMAC) which is accessable via the x-plnar-signature key in the request header. The signature is encoded using the secret you provide when setting up the webhook for your organization.

UPDATING PROJECTS

At any point after a project has been created, you can update project data using the /project/{orderNumber} (PUT) route. Project parameters that can be updated include project name, notes, referring source (URL), reporter attributes, address, and communication settings among others. Authentication is handled in the request header and the orderNumber (provided in the project creation API response) just needs to be appended to the route. The response will contain all the data available for the project in its current state.

FETCHING PROJECTS

You can also fetch project data using the /project/{orderNumber} (GET) route. Authentication is handled in the request header and the orderNumber (provided in the project creation API response) just needs to be appended to the route. The response will contain all the data available for the project in its current state.

If you need any further assistance with the PLNAR API, please contact plnar-support@plnar.ai .

Acquiring a Bearer Token

/oauth/token

Request Body schema: application/x-www-form-urlencoded
required
grant_type
required
string
Value: "client_credentials"
client_id
required
string

The client identifier issued during the registration process.

client_secret
required
string

The client secret.

Responses

Response samples

Content type
application/json
{
  • "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJENzk5MkE4NC01Rjc2LTRERjEtQkIxQi03RTZFNDJERTdGRkYiLCJqdGkiOiI3OWM2MTUzMDI5Njc1NDRhMzZmMGE2YzcxYjA1ZTYzZjE1OWVmYjAxYWQxZmRmYTU2MmEzNTk1Njg4ZmEzMGI5IiwiaWF0IjoxNjMxNjQ2MzI5LCJuYmYiOjE2MzE2NDYzMjksImV4cCI6MTYzMTY0OTkyOSwic3ViIjoiNjEzYTgzZDdmOWVkNzkyOGQxYzJlOTI2In0.mCDoyPs5HAe1qKdrRWtmSLcZPrS8lsCWXPBl4_UU5qU",
  • "token_type": "bearer",
  • "expires_in": 3600
}

Creating a PLNAR Project

/project

Authorizations:
BearerAuth
Request Body schema: application/json
required
name
required
string

The provided name for the project. Name can be anything assigned to the project and does not not to be unique.

jobType
string
Enum: "photoFirst" "2d+" "fullScope" "full3d+" "3dSnapPlan"

"Supported job types: 'photoFirst' (SnapShot), 'fullScope' (Full-3D), 'full3d+' (Full-3D + Floorplanning), '3dSnapPlan' (Basic-3D + Floorplanning). Job Type availability based on org enterprise agreement."

type
required
string
Enum: "PLNAR Pro" "PLNAR Snap" "PLNAR Pic"

The project type to be created, PLNAR Pro, PLNAR Snap or PLNAR Pic

required
object

This refers to the reporter (e.g. policyholder, customer, etc) who is submitting the project via the SNAP App. This person will optionally receive a project activation SMS if notifications are set to true.

object

This refers to the PLNAR user (e.g. adjuster, contractor) to whom the project will be assigned. This person will receive notifications of project status and be allowed to log into the PLNAR portal to access the project. This field is optional and if omitted, the project will be assigned to the default user for the company.

object

The address where the project data is taken. Typically this will be the property of the reporter or the assignment location if the project is taken on behalf of the user.

referenceNumber
string

The optional reference number for the project to enable tracking across organizations.

isDemo
boolean

Flag to determine whether the project was created as a demo project.

referringSource
string

Can be used to store the source URL or any tracking formation for the origination of the project. An example would be to capture marketing parameters.

perilType
string

The type of peril the project was assigned to cover. This can be used for projects addressing property insurance claims or restorations.

notes
string

Used to store any project notes related to the project.

notifications
boolean

Determines whether the reporter / project recipient will receive notifications for the project.If set to true, the reporter will receive an SMS & Email containing the project link that they can use to download and open the pre-previsioned project. If set to false, the developer will be responsible for providing the reporter with the project link.

smsNotifications
boolean

Controls SMS notifications for the project. If set to true (default), SMS notifications will be sent. If set to false, SMS notifications will be disabled while email notifications continue.

object

The address where the project data is taken. Typically this will be the property of the reporter or the assignment location if the project is taken on behalf of the user.

webhookUrl
string

The URL to send webhook events detailing the current status changes of the project over time.

webhookSecret
string

This is the secret used to sign the HMAC signature 'x-plnar-signature' to verify the webhook is legitimate

object

Optional export settings applied when the project completes.

Responses

Callbacks

Request samples

Content type
application/json
{
  • "name": "Project Name",
  • "jobType": "photoFirst",
  • "type": "PLNAR Snap",
  • "reporter": {
    },
  • "user": {
    },
  • "address": {
    },
  • "referenceNumber": "SKU#123456789",
  • "isDemo": false,
  • "referringSource": "portal.plnar.ai/#/?=marketingParameter",
  • "perilType": "water damage",
  • "notes": "These are notes describing the project",
  • "notifications": true,
  • "smsNotifications": true,
  • "communication": {
    },
  • "webhookSecret": "SECRET_STRING_VALUE",
  • "settings": {
    }
}

Response samples

Content type
application/json
{}

Callback payload samples

Callback
Content type
application/json
{}

Updating a PLNAR Project

/project/{orderNumber}

Authorizations:
BearerAuth
path Parameters
orderNumber
required
string

The order number for the PLNAR project. This is the auto-generated PLNAR code used for customer reference.

Request Body schema: application/json
required
name
string

The new name for the project. Name can be anything assigned to the project and does not not to be unique.

object

The address where the project data is taken. Typically this will be the property of the reporter or the assignment location if the project is taken on behalf of the user.

object

This refers to the reporter (e.g. policyholder, customer, etc) who is submitting the project via the SNAP App. This person will optionally receive a project activation SMS if notifications are set to true.

referenceNumber
string

The optional reference number for the project to enable tracking across organizations.

referringSource
string

Can be used to store the source URL or any tracking formation for the origination of the project. An example would be to capture marketing parameters.

notes
string

Used to store any project notes related to the project.

notifications
boolean

Determines whether the reporter / project recipient will receive notifications for the project.If set to true, the reporter will receive an SMS & Email containing the project link that they can use to download and open the pre-previsioned project. If set to false, the developer will be responsible for providing the reporter with the project link.

object

The address where the project data is taken. Typically this will be the property of the reporter or the assignment location if the project is taken on behalf of the user.

Responses

Request samples

Content type
application/json
{
  • "name": "Project Name",
  • "address": {
    },
  • "reporter": {
    },
  • "referenceNumber": "SKU#123456789",
  • "referringSource": "portal.plnar.ai/#/?=marketingParameter",
  • "notes": "These are notes describing the project",
  • "notifications": true,
  • "communication": {
    }
}

Response samples

Content type
application/json
{}

Fetching a PLNAR Project

/project/{orderNumber}

Authorizations:
BearerAuth
path Parameters
orderNumber
required
string

The order number for the PLNAR project. This is the auto-generated PLNAR code used for customer reference.

Responses

Response samples

Content type
application/json
{}

Generate Insights for Photo

/insights

File Restrictions

  • Mime Type: The file must be a JPEG
  • File Size: The file must be < 5Mb
Authorizations:
BearerAuth
Request Body schema: multipart/form-data
required
photo
required
string <binary>

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Fetching a Project's Room Model

/project/{orderNumber}/{roomUuid}/export

Authorizations:
BearerAuth
path Parameters
orderNumber
required
string

The order number for the PLNAR project. This is the auto-generated PLNAR code used for customer reference.

roomUuid
required
string

The UUID of the room to export

query Parameters
type
required
string
Enum: "gltf" "dxf"

The format of the room model returned

Responses

Response samples

Content type
application/json
{
  • "code": "error_code",
  • "message": "Error message."
}

Upgrading a PLNAR Project

/project/{orderNumber}/upgrade

Authorizations:
BearerAuth
path Parameters
orderNumber
required
string

The order number for the PLNAR project. This is the auto-generated PLNAR code used for customer reference.

query Parameters
targetSku
required
string
Enum: "fullScope" "full3d+ (full3d%2B url encoded)"

The SKU to upgrade the project to

Responses

Response samples

Content type
application/json
{}