In this tutorial, we’ll go through the necessary steps to implement GoToScan application with your web backend.
IMPORTANT: GoToScan is in BETA, please reach out to email@example.com to get development access.
Before we start, you might wonder what’s the purpose of GoToScan and how it’s different from other CubiCasa scanning solutions. GoToScan is designed to be an invitation based and use case agnostic app that only provides authentication and scanning access to your end users. For example, if your company does kitchen renovations and right now your customers find it hard and time consuming to replica their kitchen into a 3D model online or you need to send out a professional in order to provide a quote, you can dramatically improve your quoting process with GoToScan. Simply send a GoToScan link to your customer, let them scan the kitchen and you’ll receive a digital version of the kitchen within 24 hours (or even faster if you’ve agreed on a faster SLA).
GoToScan is the right solution for you if:
- You do not have an existing mobile app or a mobile development team
- You have your own website / web service to distribute generated floor plans and/or floor plan data
- You’ll plan to invoice your end users and CubiCasa will invoice you
- Your end users are willing to install GoToScan application on their mobile devices
- Only iOS application is available to begin with
GoToScan is not the right solution for you if:
- You plan to embed CubiCasa’s scanning technology into your own mobile application
- You want complete control over the design and branding of the application
You’ll need a few things before you can follow this tutorial. Let’s go through them first.
- CubiCasa API key
- GoToScan installed on your iOS device
- Web server listening to CubiCasa backend delivery webhook
- CubiCasa Exporter API config JSON (there are examples in the end of this document)
Using GoToScan consists of these steps:
- Generating a GoToScan token from CubiCasa Backend
- Creating a GoToScan link to be opened on your mobile device
- Taking a scan and uploading it from GoToScan
- Receiving a webhook call to your server
- Create your floor plans or property data with CubiCasa Exporter API
Generating a GoToScan authentication token
Generating a GoToScan authentication token is easy. You just need to make a HTTP GET request to our backend.
curl --header "X-API-KEY: 0d128ef7-89d1-4a64-925c-8149cd0ed5bc" https://api.cubi.casa/conversion/gotoscan/token
Note: You need to replace the API key with your own CubiCasa API key.
Your response will look something like this:
Creating a GoToScan link to be opened on your mobile device
Creating a GoToScan requires you to combine a base url and an array of URL parameters. One of the parameters is the token you created in step one. The others are related to scan address, your own scan ID and scanning settings. Full documentation is available on our GoToScan documentation page.
Important: The link should be opened on your mobile device. Please replace the values within <> marks.
Take your first scan and upload it
Once your link is created, you can open it on your mobile device. If you do not have GoToScan installed yet, your phone will ask to install it from the App Store. Once the app is installed, the app will open up and show the address of the scan. Below you can see each step in the scanning progress.
Receiving a webhook call to your server
In the real world, your server would set up to listen to the webhook calls from our server. There are multiple tutorials available on the internet on how to deploy a webhook listener to your server. You can check some tutorials at the end of this document. In this documentation we’ll go through what you’ll receive from our Conversion API. The POST request to your webhook (which was defined in the GoToScan link), will include following body:
The “ticket_id” is generated by CubiCasa. You should store it to your database, because the “ticket_id” is needed to create Fix Requests. The “model_id” is used with Exporter API to render the floor plans. The “event” will be always “delivered” at this point of the scan life cycle. The “external_id” is define by you and it will be the same as in the GoToScan link that you created.
You can fake a delivery e.g. by using Postman. The model ID in the example payload is an actual floor plan that you can use to test. If you’ve done any other scans through CubiCasa, you can use those scans to test as well.
Create your floor plans or property data with CubiCasa Exporter API
Your floor plans are rendered using the Exporter API. Exporter API let’s you to define the style of a floor plan including wall colors, floor colors, logos, strokes, opacity, units and language. Visit the full Exporter API documentation to get to know all its capabilities.
Below is an example of an Exporter API call that you can use to create necessary floor plan listing images and GLA images as well as GLA calculations.
X-api-key: <Your API key>
See different configs from our Exporter API documentation examples
Exporter API will respond a JSON that will include direct links to your files:
Ready to get Started with GoToScan?
Fill out the contact form and our experts will setup a meeting with you and get you started with GoToScan!
Here are some tutorials to easily setup some weebhook listeners: