First floor plan is free!

Hi, how can we help you?

Help Center » CubiCasa API » GoToScan Implementation Tutorial

GoToScan Implementation Tutorial

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 developers@cubicasa.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

Prerequisites
You’ll need a few things before you can follow this tutorial. Let’s go through them first.

  1. CubiCasa API key
  2. GoToScan installed on your iOS device
  3. Web server listening to CubiCasa backend delivery webhook
  4. CubiCasa Exporter API config JSON (there are examples in the end of this document)

 

The implementation

Using GoToScan consists of these steps:

  1. Generating a GoToScan token from CubiCasa Backend
  2. Creating a GoToScan link to be opened on your mobile device
  3. Taking a scan and uploading it from GoToScan
  4. Receiving a webhook call to your server
  5. 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:
{
"id": "bfad08e6-f881-4d42-82d8-7eb144eb7bcf",
"token": "eyJpZDI6ICI0MjM5OzA3AC1jMDdmLTQ2MzAtY2Y3MC1hOPU0ZmJOOGP2ZDgiLCAidXNlcl9pZCI6ICI1AGQa2NGI45Ni01YzhmLTRhOTctYWM2Yi1iN2QxMThkMzWkMTgiLCAiaXNzdWVkX2F0IjogIjIwMjEtMTEtMDQUMTI5Mzc4MjVaIn0sMNf0D-L82MJ9SxrsPsmKlTd1oNtqCdla_m650OvwwQNjNoCeZn-oclJdtN_XOs2Z_8uB41PF4KKU0cwyYLoL",
"valid_until": "2021-11-11T12:37:25.947127Z"
}

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.

Example link:
gotoscan:gotoscan?token=<auth_token>&external_id=external-id-1&webhook_url=https://example.com/webhooks/listen&priority=fast&suite=A1&street_address=360%20Queen%20St%20W&city=Toronto&state=ON&postcode=M5V%202A4&country=CA&client_name=ScanDone%20Inc

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:
{
"ticket_id": "341449cf-f258-4d8c-83c2-75c4561391a9",
"event": "delivered",
"model_id": "63691682-d524-4709-b3c1-ca950990a2eb",
"external_id": "External-ID-1"
}

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.
POST https://api.cubi.casa/exporter/floorplan/<MODEL_ID>

Headers:
X-api-key: <Your API key>

Body:
See different configs from our Exporter API documentation examples

Exporter API will respond a JSON that will include direct links to your files:
{
"single": {
"png": [
"https://s3-us-west-2.amazonaws.com/cubi.casa.exporter.output/6862c90645f64084a0113b6eed66c1c6/single_1-aurinkotuulenkatu-cctestopt-helsinki-uusimaa-finland_1.png",
"https://s3-us-west-2.amazonaws.com/cubi.casa.exporter.output/6862c90645f64084a0113b6eed66c1c6/single_1-aurinkotuulenkatu-cctestopt-helsinki-uusimaa-finland_0.png"
]
},
"compose": {
"png": [
"https://s3-us-west-2.amazonaws.com/cubi.casa.exporter.output/6862c90645f64084a0113b6eed66c1c6/compose_1-aurinkotuulenkatu-cctestopt-helsinki-uusimaa-finland_0.png"
]
}
}

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!

 

Select your zone *

Select your business type *

 

Here are some tutorials to easily setup some weebhook listeners:

  • https://elements.heroku.com/buttons/aimylogic/python-webhook
  • https://medium.com/mindorks/building-webhook-is-easy-using-aws-lambda-and-api-gateway-56f5e5c3a596
  • https://zapier.com/page/webhooks/
cubicasa book a demo

Digital GLA is LIVE

We launched a new solution for appraisals that allows capturing Gross Living Area (GLA) with a mobile device. Our new digital GLA service allows you to get true GLA according to ANSI standards without measuring or drawing.

The package includes a highly-detailed PNG floor plan file with a special GLA layout that highlights included and excluded areas and total area calculations by floor. P.S: The first scan is free of charge.

Interested in testing CubiCasa Digital GLA? Get in touch today. We’d love to know how our scanning technology compares with your current floor plan sketch and GLA numbers. Connect with our sales team at sales@cubicasa.com.

Learn more

No thanks.