Skip to main content

Partner REST APIs

Mappedin's Partner REST APIs are a set of APIs that allow partners to manage the workspaces of their tenants, creating a multi-tenant environment. They provide the ability to create, update, and delete workspaces, as well as manage the users, permissions and maps within a workspace.

Interested in Mappedin Partner APIs? Contact us to become a partner.

A full list of endpoints is available in the Partner REST API Reference.

Authentication

The Partner REST APIs are authenticated using a bearer token. The token is generated using a partner API key and secret and is used to authenticate requests to the APIs.

Using the Partner API key and secreted provided by Mappedin, make a POST call to https://app.mappedin.com/api/v1/api-key/token, passing the key and secret within the body of the call in JSON format.

The body of the call should be formatted as follows:

{
"key": "YOUR_KEY",
"secret": "YOUR_SECRET"
}

The token API responds with JSON that contains a bearer token that can be used to authenticate to other Mappedin REST API endpoints.

The response will be formatted as follows:

{
"access_token": "YOUR_TOKEN_HERE",
"expires_in": 172800
}

Refer to the Exchange API Key and secret for JWT REST API documentation for more information and examples.

Onboarding a New Tenant

The onboarding process for a new tenant or customer is as follows:

1. Create a New Workspace

Each tenant should have their own workspace. The workspace is the top level object for Mappedin users. Workspaces are created using the Create Enterprise Workspace endpoint.

To create a new workspace, make a POST call to https://app.mappedin.com/api/v1/workspace/enterprise-subscription. The body of the call should be formatted as follows:

{
"name": "TENANT_WORKSPACE_NAME",
"mapLimit": 1
}

The name specifies the name of the new tenant workspace. The mapLimit is the number of maps that the tenant can have in their workspace.

2. Invite the Tenant to the Workspace

After workspace creation, the partner should invite the tenant to the workspace. This is done using the Create a workspace invite endpoint. The initialRole can be either admin or editor.

To invite the tenant to the workspace, make a POST call to https://app.mappedin.com/api/v1/workspace/{workspaceId}/invite. Replace {workspaceId} with the ID of the workspace created in the first step. The body of the call should be formatted as follows:

{
"email": "TENANT_EMAIL",
"initialRole": "admin"
}

3. Create a Map

This step is optional, it is valid to allow the tenant to create their own map. If the partner wants to create the map, they can do so using the Create a map endpoint.

To create a map, make a POST call to https://app.mappedin.com/api/v1/workspace/{workspaceId}/map. Replace {workspaceId} with the ID of the workspace created in the first step. The body of the call should be formatted as follows:

{
"name": "MAP_NAME"
}

4. Other Management Operations

Mappedin Partner REST APIs provide many more endpoints for listing and managing workspaces, users, permissions and maps. Refer to the Partner REST API Reference for a full list of endpoints.

Accessing Tenant Maps

There are two ways to access a tenant's map:

  1. Using Mappedin SDKs.
  2. Using the Mappedin REST APIs.

Using Mappedin SDKs

Tenant maps can be loaded in Mappedin SDKs using an API key and secret that has been created in the tenant's workspace. This can be created by a tenant user within their own workspace. Refer to Create a Key & Secret for instructions.

Coming Soon: Tenant API key management via Partner REST APIs.

Using the Mappedin REST APIs

A Mappedin Map can be downloaded as a Mappedin Venue Format (MVF) file. Mappedin Venue Format (MVF) is a GeoJSON based format containing geometry data associated with an indoor map. Refer to Downloading an MVF Using the Mappedin REST API for instructions.

The MVF file can be hosted on a private network and used to load the map in Mappedin SDKs. Refer to Offline Mode for instructions.