Getting Started
“A Farsight Tour is a visual experience to showcase a space.”
The aim of an API Integration is to be able to send Farsight Tours to the end-customer with ease from the User’s existing infrastructure like CRMs, ERPs or similar. With the Farsight API, you can generate unique Tour links for each end-customer, which enables Farsight to track each end-customer’s behaviour while viewing the Tour.

So for example, let's say we have a particular lead that we want to send a Farsight Tour to. In this case, we can do either of the two scenarios mentioned below.

1. Copy-paste link to the Tour -

If you want to send a Tour to anyone, you can just go to the Tours section in your Farsight Account, click on Tour Links button of the Tour that you want to send which will slide out a bunch of option. You can copy the link to the Tour and send it in an Email or SMS. When the end-customer opens up the Email or SMS, sees the link and clicks on it, the Farsight Tour opens up and he can view the Tour. Now this link is generic and can be sent directly without any API Integration but, there is an essential element missing. The sender has no idea about if "that" particular user has opened the link. It could have been just anyone because the same link might also be embedded on the Website. There is no tracking associated with that link and the end-customer is sent to, which basically means no individually tracked data.

2. Sending a Tour through the Farsight Infrastructure -

The limitations above are overcome by attaching a special tracking mechanism to the sent Tour. How does this work? You go to the Tours section of your Farsight Account and on the Tour that you want to send you can see a Send Tour button. Once you select your Customer and click on the Send Tour button, Farsight becomes aware that you want to send a Tour to that particular Customer. You can create the Customer by Phone Number or Email or both (also select from an existing list of Customers) and then hit Send. Farsight will then attach a sync_code and ver_code (the Tracker elements) to that particular Tour which will funnel all of the data captured when the end-customer views the Tour back to the associated Customer. So, when you select that particular Customer, you will be able to see all of data analytics associated with that particular Customer.

This is the functionality that the API Integration would mimic in the Sellers CRMs, ERPs etc. because it lets you track Data of each Tour sent.
Experience
User Experience

1. Directly send Farsight Tours to your end-customer through you CRMs, ERPs etc.
2. During a Marketing Campaign, be able to integrate Farsight into the Lead Capture Workflow.
Developer Experience

1. Send, track and analyse Tours.
Integration Guide
Generate an API Key

To send requests to the Farsight API, you will need an API Key to authenticate your requests. You will be sending an API Key with each request to ensure the same. You can generate an API Key by logging into your Farsight Account and selecting Dev > API Keys. Click on “New API Key” to create a new one.

Sending a Request to Farsight

All requests will be sent with the base url: https://farsightx.com/.

The way the Farsight API works is, you send a request to generate a Tour. You will get a ver_code and sync_code. Both of these codes are used to uniquely identify a Tour. Hence, the end-customer that you send the Tour to can be tracked.
API Reference
Get Tours

Definition: [GET] - https://farsightx.com/api-get-tours/

Description: Get a list of all the Tours that the Account from which the Api Key is generated has access to.

Body Parameters:

api_key required
string

Example

Payload:
{
    'api_key': '240984213njklksd9890vsf89798234n98f89vs98a7f890'
}

Response:
{
    "message": "success", 
    "success": true,
    "tours": [
        {
            "description": "Amazing spatially aware Tour.",
            "id": "2e89598dc4e0a4e3d4ee99c3fb9d9b1e", 
            "name": "Farsight Demo"
        }, 
        {
            "description": "", 
            "id": "1c4715be26a5e0add3a57b29368e9dc2", 
            "name": 
            "this is a bitchin' app"
        }
    ]
}

Generate Tour

Definition: [POST] - https://farsightx.com/api-generate-tour-instance/

Description: This API Call will generate a Tour from the Account whose API Key is linked. If the name, email and phone number fields are provided, a Customer with all three fields filled in will be created, otherwise, the Customer will still be created but it will be populated with Fake Data. The call will return the ver_code and the sync_code of the initiated Tour along with the Tour URL and the Tour Controller URL. Note: You don't have to provide any Customer information as the sync_code and ver_code will help you identify your generated Tours.

Body Parameters:

api_key required
string

tour_id required
string
unique string to idenify each tour

name
string
name of the Customer

email
string
email of the Customer

phone_number
string
phone number of the Customer with country code

send_email
boolean
set true to send standard email with tour link from Farsight

send_sms
boolean
set true to send standard sms with tour link from Farsight

Example:

Payload:
{
    'api_key': '240984213njklksd9890vsf89798234n98f89vs98a7f890',
    'tour_id': '2849uh234h12394812h4kj1411k234b1kjl',
    'name': 'Quinston Pimenta',
    'email': 'quinston@quarkexp.com',
    'phone_number': '916534876234',
    'send_sms': 'true',
    'send_email': 'true'
}

Response:
{
    "success": true, 
    "message": "success",
    "ver_code": "254ccd5c7065f3aeb2dc3e40b685adf0", 
    "sync_code": "282794", 
    "short_tour_url": "https://goo.gl/GG7bF6", 
    "short_tour_controller_url": "https://goo.gl/hkHQMR", 
    "long_tour_url": "https://farsightx.com/TOUR/APP_ID/2e89598dc4e0a4e3d4ee99c3fb9d9b1e/?ver_code=254ccd5c7065f3aeb2dc3e40b685adf0&sync_code=282794", 
    "long_tour_controller_url": "https://farsightx.com/SERVER/APP_ID/2e89598dc4e0a4e3d4ee99c3fb9d9b1e/VER_CODE/254ccd5c7065f3aeb2dc3e40b685adf0/SYNC_CODE/282794/"
}
Get Tour Analytics

Definition: [GET] - https://farsightx.com/api-get-tour-instance-analytics/

Description: This API Call returns the analytics tracked when using the Tour.

Body Parameters:

api_key required
string

tour_id required
string
unique string to idenify each tour

ver_code required
string
combination of sync_code and ver_code identifies your generated tour

sync_code required
string
combination of sync_code and ver_code identifies your generated tour

Example

Payload:
{
    "api_key": "240984213njklksd9890vsf89798234n98f89vs98a7f890",
    "tour_id": "2849uh234h12394812h4kj1411k234b1kjl",
    "ver_code": "fakjl2983729jkfda9829487jkshf98234",
    "sync_code": "242342"
}

Response:
{
    "message": "success", 
    "success": true,
    "autonomous_tour": 
    {
        "duration": "52s", 
        "scenes": [
            {
                "scene_id": 4, 
                "duration": "52s", 
                "name": "Flat Entrance"
            }
        ]
    },
    "guided_tour": 
    {
        "duration": "36s", 
        "scenes": [
            {
                "scene_id": 4, 
                "duration": "9s", 
                "name": "Flat Entrance"
            }, 
            {
                "scene_id": 5, 
                "duration": "8s", 
                "name": "Kitchen"
            }, 
            {
                "scene_id": 6, 
                "duration": "13s", 
                "name": "Living Room"
            }, 
            {
                "scene_id": 7, 
                "duration": "6s", 
                "name": "Balcony"
            }
        ]
    }
}