Floor Plans API
Upload floor plans to be used in your maps.
The following file types are allowed with this API: PNG, JPG, JPEG, PDF, SVG, or DWG.
When a floor plan is uploaded, its geometry gets extracted into a Dataset that can be access and modified through the Datasets API. On this page, we show how the Floor Plans API lets you programmatically create and manage your floor plan uploads.
ENDPOINTS
POST /floor-plans/v1
GET /floor-plans/v1/:upload_id
PUT /floor-plans/v1/:dataset_id
DELETE /floor-plans/v1/:upload_id
GET /floor-plans/v1
The floor plan upload object
Properties
- Name
upload_id- Type
- string
- Description
The unique ID for the upload objet.
- Name
account_id- Type
- string
- Description
Unique identifier for the account.
- Name
dataset_id- Type
- string
- Description
The ID of the associated Dataset for this floor plan.
- Name
state- Type
- string
- Description
Indicates the state of the dataset processing for this floor plan. Options are
'pending','processing','completed', or'failed'
- Name
upload_url- Type
- string | null
- Description
The optional upload URL for the file.
- Name
updated_at- Type
- timestamp
- Description
Timestamp of when the account was last updated.
- Name
created_at- Type
- timestamp
- Description
Timestamp of when the account was created.
The account object
{
"upload_id": "hhoiuhf09wehf093h09urhfr0ffhh",
"account_id": "ajnvaslidvawudfw9gfogsyg9gsga",
"dataset_id": "203h0hdfodjfbdaboajbpjb2zxlcv",
"upload_url": "https://storage.waygomaps.com/floor-plans/hhoiuhf09wehf093h09urhfr0ffhh.pdf",
"state": "completed",
"updated_at": 705103200,
"created_at": 692233200
}
Upload a floor plan
This endpoint allows you to upload a floor plan, to be turned into a Dataset.
Required attributes
- Name
file- Type
- object
- Description
The floor plan file. Accepted file types: PNG, JPG, JPEG, PDF, SVG, or DWG.
POST /accounts/v1
curl https://api.waygomaps.com/floor-plans/v1 \
-H "Waygo-API-Key: eyJhbGciOiJIU...sXSJE_1AJgMEnI_g-WTerk" \
-H "Waygo-Account: n33f9h0fh9324hf9h439fh9h2f9h93h9" \
-F file="@floor-plan.png;type=image/png"
Response
{
"upload_id": "hhoiuhf09wehf093h09urhfr0ffhh",
"account_id": "ajnvaslidvawudfw9gfogsyg9gsga",
"dataset_id": "203h0hdfodjfbdaboajbpjb2zxlcv",
"upload_url": "https://storage.waygomaps.com/floor-plans/hhoiuhf09wehf093h09urhfr0ffhh.pdf",
"state": "completed",
"updated_at": 705103200,
"created_at": 692233200
}
Retrieve floor plan upload status
This endpoint allows you to retrieve the upload status for a floor plan.
GET /floor-plans/v1/:upload_id
curl https://api.waygomaps.com/floor-plans/v1/:upload_id \
-H "Waygo-API-Key: eyJhbGciOiJIU...sXSJE_1AJgMEnI_g-WTerk" \
-H "Waygo-Account: n33f9h0fh9324hf9h439fh9h2f9h93h9"
Response
{
"upload_id": "hhoiuhf09wehf093h09urhfr0ffhh",
"account_id": "ajnvaslidvawudfw9gfogsyg9gsga",
"dataset_id": "203h0hdfodjfbdaboajbpjb2zxlcv",
"upload_url": "https://storage.waygomaps.com/floor-plans/hhoiuhf09wehf093h09urhfr0ffhh.pdf",
"state": "processing",
"updated_at": 705103200,
"created_at": 692233200
}
Replace dataset with floor plan upload
This endpoint allows you to replace an existing dataset with a floor plan upload.
Required attributes
- Name
file- Type
- object
- Description
The floor plan file. Accepted file types: PNG, JPG, JPEG, PDF, SVG, or DWG.
PUT /floor-plans/v1/:dataset_id
curl -X PUT https://api.waygomaps.com/floor-plans/v1/:dataset_id \
-H "Waygo-API-Key: eyJhbGciOiJIU...sXSJE_1AJgMEnI_g-WTerk" \
-H "Waygo-Account: n39q9h0ph9324hf9h4vksh9h2f9h03hl" \
-F file="@floor-plan.png;type=image/png"
Response
{
"upload_id": "hhoiuhf09wehf093h09urhfr0ffhh",
"account_id": "ajnvaslidvawudfw9gfogsyg9gsga",
"dataset_id": "203h0hdfodjfbdaboajbpjb2zxlcv",
"upload_url": "https://storage.waygomaps.com/floor-plans/hhoiuhf09wehf093h09urhfr0ffhh.pdf",
"state": "processing",
"updated_at": 705103200,
"created_at": 692233200
}
Delete a floor plan
This endpoint allows you to delete a previously uploaded floor plan.
DELETE /floor-plans/v1/:upload_id
curl -X DELETE https://api.waygomaps.com/floor-plans/v1/:upload_id \
-H "Waygo-API-Key: eyJhbGciOiJIU...sXSJE_1AJgMEnI_g-WTerk" \
-H "Waygo-Account: n33f9h0fh9324hf9h439fh9h2f9h93h9"
List floor plan uploads
This endpoint allows you to list the floor plan uploads for your account. By default, this endpoint returns 20 uploads at a time.
GET /floor-plans/v1
curl -X GET https://api.waygomaps.com/accounts/v1/sub-accounts \
-H "Waygo-API-Key: eyJhbGciOiJIU...sXSJE_1AJgMEnI_g-WTerk" \
-H "Waygo-Account: n39q9h0ph9324hf9h4vksh9h2f9h03hl" \
-d skip=0 \
-d limit=20
Response
{
"uploads": [
{
"upload_id": "hhoiuhf09wehf093h09urhfr0ffhh",
"account_id": "ajnvaslidvawudfw9gfogsyg9gsga",
"dataset_id": "203h0hdfodjfbdaboajbpjb2zxlcv",
"upload_url": "https://storage.waygomaps.com/floor-plans/hhoiuhf09wehf093h09urhfr0ffhh.pdf",
"state": "processing",
"updated_at": 705103200,
"created_at": 692233200
},
// ...
],
total: 158,
skip: 0,
limit: 20
}