Plans

View ESAPI documentation here.

The Plans APIs are for querying and manipulating the contents of plans.

Types

Features

Assembly Area

If position is pushed as null, the leaderline icon will be placed at the centroid of the plan. In responses position is never null.

Diagram

Fixed Icon

If position is pushed as null, the leaderline icon will be placed at the centroid of the plan. In responses position is never null.

iconType is not validated when pushing the feature and will result in a ? icon in PlanStudio if it’s missing from your Icon Library.

Leaderline Icon

If position is pushed as null, the leaderline icon will be placed at the centroid of the plan. In responses position is never null.

iconType is not validated when pushing the feature and will result in a ? icon in PlanStudio if it’s missing from your Icon Library.

Room

Zoned Icon

Zone

  • type: zone
  • zoneType: common | identified | interior | otherTenanted | presentation | private | tenanted
  • geometry: <Polygon>
  • data: <Data[]>

Identified Zone

Zones with a zoneType of identified require additional properties.

Data

The Data type maps Data Fields as configured in PlanStudio. Data properties for all features are populated with their configured Data Fields from PlanStudio, even if the feature does not yet have a value for it.

The key property must be a validly formatted Data Field code (dfld_[a-z0-9]{25}). The code does not need to exist in your Data Fields - if you generate your own codes they will appear as unlinked fields in PlanStudio that you can register.

The name property must be a non-empty, user-facing string that describes the data you’re saving (i.e. Asset ID).

The value property may be any string. It should match the expected format for the type of Data Field you’ve registered against the Data Field Code in PlanStudio.

POST PushFeatures

Add Features to a plan.

Due to our internal handling of versioning plan data, it’s possible this API call may trigger a migration to the latest version if the plan has not been edited recently. If this API is called in parallel during the migration, one of the calls may fail with a 422 error. Retry the failed API call in this circumstance.

Request

POST https://api.locatrix.com/esapi/api/v1/Plans/{plan code}/PushFeatures?parameters

Headers

Header Required Description
Authentication yes Bearer token
X-CSS-Partner-Code yes Partner Code that owns the plan you wish to push features to.

Parameters

Parameter Required Description
author no A plain text field for identifying who is responsible for adding features to the plan. This allows you to identify users from your own system in addition to the API key.

Body

{
  "features": [
    <array of Features>
  ]
}

Response

Success

Status Code: 200

No response body.

Failure

Error responses vary depending on the involved subsystems.

Status Code: 422

A parallel request triggered a migration, retry the request.

GET Features

Get Features from a plan.

Request

GET https://api.locatrix.com/esapi/api/v1/Plans/{plan code}/Features

Headers

Header Required Description
Authentication yes Bearer token
X-CSS-Partner-Code yes Partner Code that owns the plan you wish to get features from.

Response

Success

Status Code: 200

Body

{
  "features": [
    <array of Features>
  ]
}