# MapSet

MapSet APIs allow you to create and manage collections of maps with relative positioning for large-scale VPS coverage.

{% hint style="warning" %}
To whitelist your domain, follow: [Configuring Allowed Domains (CORS)](https://docs.multiset.ai/basics/credentials/configuring-allowed-domains-cors)
{% endhint %}

## Overview

A MapSet is a collection of two or more maps positioned relative to each other. This enables:

* Large area coverage by combining multiple scans
* Seamless localization across connected spaces
* Flexible map arrangement and positioning

{% hint style="info" %}
**Using Codes Instead of IDs**

All MapSet APIs use human-readable codes:

* **MapSet Code** (e.g., `MSET_ZIRWP1NV0WBH`) - Use this for all MapSet operations
* **Map Code** (e.g., `MAP_WUTCLWDXTK6U`) - Use this when adding maps to a MapSet

You can find these codes in the MultiSet Developer Portal or from API responses.
{% endhint %}

## Endpoints

### Create MapSet

Creates a new MapSet with two or more maps. Use **Map Codes** to reference the maps.

{% openapi src="<https://3163433004-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FokTDI7QVY04Zvb1pQ8Ry%2Fuploads%2Fgit-blob-8a663c2da27d00066259df9bd191a6cddcc3aadc%2Fmapset-crud-api.yaml?alt=media>" path="/map-set" method="post" %}
[mapset-crud-api.yaml](https://3163433004-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FokTDI7QVY04Zvb1pQ8Ry%2Fuploads%2Fgit-blob-8a663c2da27d00066259df9bd191a6cddcc3aadc%2Fmapset-crud-api.yaml?alt=media)
{% endopenapi %}

***

### Get MapSet Details

Retrieves details of a MapSet including all associated maps and their relative poses. Use the **MapSet Code** (e.g., `MSET_ZIRWP1NV0WBH`).

{% openapi src="<https://3163433004-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FokTDI7QVY04Zvb1pQ8Ry%2Fuploads%2Fgit-blob-8a663c2da27d00066259df9bd191a6cddcc3aadc%2Fmapset-crud-api.yaml?alt=media>" path="/map-set/{mapSetCode}" method="get" %}
[mapset-crud-api.yaml](https://3163433004-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FokTDI7QVY04Zvb1pQ8Ry%2Fuploads%2Fgit-blob-8a663c2da27d00066259df9bd191a6cddcc3aadc%2Fmapset-crud-api.yaml?alt=media)
{% endopenapi %}

***

### Update MapSet Details

Updates the name of an existing MapSet. Use the **MapSet Code**.

{% openapi src="<https://3163433004-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FokTDI7QVY04Zvb1pQ8Ry%2Fuploads%2Fgit-blob-8a663c2da27d00066259df9bd191a6cddcc3aadc%2Fmapset-crud-api.yaml?alt=media>" path="/map-set/details/{mapSetCode}" method="put" %}
[mapset-crud-api.yaml](https://3163433004-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FokTDI7QVY04Zvb1pQ8Ry%2Fuploads%2Fgit-blob-8a663c2da27d00066259df9bd191a6cddcc3aadc%2Fmapset-crud-api.yaml?alt=media)
{% endopenapi %}

***

### Add Map to MapSet

Adds a new map to an existing MapSet with its relative pose. Use the **MapSet Code** in the URL and **Map Code** in the request body.

{% openapi src="<https://3163433004-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FokTDI7QVY04Zvb1pQ8Ry%2Fuploads%2Fgit-blob-8a663c2da27d00066259df9bd191a6cddcc3aadc%2Fmapset-crud-api.yaml?alt=media>" path="/map-set/{mapSetCode}" method="put" %}
[mapset-crud-api.yaml](https://3163433004-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FokTDI7QVY04Zvb1pQ8Ry%2Fuploads%2Fgit-blob-8a663c2da27d00066259df9bd191a6cddcc3aadc%2Fmapset-crud-api.yaml?alt=media)
{% endopenapi %}

***

### Update Map Pose in MapSet

Updates the relative pose of a map within a MapSet.

{% hint style="info" %}
Use the `dataId` (MapSetData ID) from the **Get MapSet Details** response. This is the only operation that requires an internal ID.
{% endhint %}

{% openapi src="<https://3163433004-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FokTDI7QVY04Zvb1pQ8Ry%2Fuploads%2Fgit-blob-8a663c2da27d00066259df9bd191a6cddcc3aadc%2Fmapset-crud-api.yaml?alt=media>" path="/map-set/data/{dataId}" method="put" %}
[mapset-crud-api.yaml](https://3163433004-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FokTDI7QVY04Zvb1pQ8Ry%2Fuploads%2Fgit-blob-8a663c2da27d00066259df9bd191a6cddcc3aadc%2Fmapset-crud-api.yaml?alt=media)
{% endopenapi %}

***

### Delete Map from MapSet

Removes a map from a MapSet.

{% hint style="warning" %}
**Constraints:**

* Cannot delete the primary map (order=0)
* Cannot delete if it would leave less than 2 maps in the MapSet
* Use the `dataId` from the **Get MapSet Details** response
  {% endhint %}

{% openapi src="<https://3163433004-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FokTDI7QVY04Zvb1pQ8Ry%2Fuploads%2Fgit-blob-8a663c2da27d00066259df9bd191a6cddcc3aadc%2Fmapset-crud-api.yaml?alt=media>" path="/map-set/data/{dataId}" method="delete" %}
[mapset-crud-api.yaml](https://3163433004-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FokTDI7QVY04Zvb1pQ8Ry%2Fuploads%2Fgit-blob-8a663c2da27d00066259df9bd191a6cddcc3aadc%2Fmapset-crud-api.yaml?alt=media)
{% endopenapi %}

***

### Delete MapSet

Deletes a MapSet and all associated map data entries. The maps themselves are not deleted, only their association with the MapSet. Use the **MapSet Code**.

{% openapi src="<https://3163433004-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FokTDI7QVY04Zvb1pQ8Ry%2Fuploads%2Fgit-blob-8a663c2da27d00066259df9bd191a6cddcc3aadc%2Fmapset-crud-api.yaml?alt=media>" path="/map-set/{mapSetCode}" method="delete" %}
[mapset-crud-api.yaml](https://3163433004-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FokTDI7QVY04Zvb1pQ8Ry%2Fuploads%2Fgit-blob-8a663c2da27d00066259df9bd191a6cddcc3aadc%2Fmapset-crud-api.yaml?alt=media)
{% endopenapi %}

## Schemas

### RelativePose

The `relativePose` object defines a map's position and orientation within the MapSet coordinate system:

| Field         | Type   | Description                        |
| ------------- | ------ | ---------------------------------- |
| `position.x`  | number | X position coordinate              |
| `position.y`  | number | Y position coordinate              |
| `position.z`  | number | Z position coordinate              |
| `rotation.qx` | number | X component of quaternion rotation |
| `rotation.qy` | number | Y component of quaternion rotation |
| `rotation.qz` | number | Z component of quaternion rotation |
| `rotation.qw` | number | W component of quaternion rotation |

{% hint style="info" %}
The first map in a MapSet (order=0) typically uses identity pose: position (0,0,0) and rotation quaternion (0,0,0,1).
{% endhint %}
