This document outlines the API workflow required to embed a public, read-only version of the Scanifly 3D design viewer into your platform. This is the ideal method for showcasing a finalized design to external stakeholders, such as in a customer-facing proposal or a public portfolio, as it does not require the viewer to have a Scanifly login.
The process involves three main stages:
- Create a Project: Establish a new project in Scanifly via the API.
- Create a Design: Create a design within that project to generate the necessary IDs for embedding.
- Construct the Public Read-Only Iframe URL: Build the URL using the project and design IDs, and add the
embed=true
parameter.
Stage 1: Create a Project
First, create a project in Scanifly. This serves as the container for the design and its associated data.
Refer to the Project (Create and Update) page for more details on this process.
Successful Response (201 Created
)
201 Created
)The response will contain the full project object. You must capture and store the id
from this response, as it is the Project ID required for the subsequent steps.
Stage 2: Create a Design
Next, create the specific design you want to display in the public viewer.
Refer to the Designs (Create and Get) page for more details on this process.
Successful Response (201 Created
)
201 Created
)The API will return the full design object. Capture and store the id
from this response, as this is the Design ID needed to construct the embed URL.
Stage 3: Construct and Implement the Public Read-Only Iframe
With the Project ID and Design ID, you can construct the URL for the iframe. The critical component for this use case is the embed=true
parameter.
URL Structure
The src
attribute of the iframe is built using the base URL, the Project ID, the Design ID, and the embed=true
parameter.
https://3d.scanifly.com?ID={Scanifly Project ID}&did={Scanifly Design ID}&embed=true
ID
: The Project ID from Stage 1.did
: The Design ID from Stage 2.embed=true
: This specific parameter combination instructs the application to load in a read-only mode, without the surrounding UI elements. Crucially, this makes the embedded viewer publicly accessible, meaning anyone with the link can view it without needing to log in to Scanifly.
Example HTML Implementation
<iframe
src="https://3d.scanifly.com?ID=68cb22b3a0f838c060d76e7a&did=68cb22b973906679bc07f60b&embed=true"
width="1500"
height="1030"
style="border:none;"
title="Scanifly Public Read-Only 3D Design">
</iframe>