The InstaVid360 app communicates with third party system via the InstaVid360 backend web services. The InstaVid360 backend web services proxy all requests to ensure end-to-end security, uniformity between different third party systems and load balancing.
The InstaVid360 app is available in both the Apple and Google Play app stores. The InstaVid360 app allows for the creation and sending of full 360 exterior, 360 interior spin imagery, as well as video content.
The 360 spin and video content is linked to third party inventory systems which allows for spin and video content to be displayed on websites and online vehicle portals.
InstaVid360 prefers JSON or XML RESTful web services when engaging in integration with third parties. We are able to customise our backend ecosystem to adjust for existing stock solutions.
Authentication
The InstaVid360 app requires dealer users to log in, in order to access their InstaVid360 content.
For simplicity, dealer users login to InstaVid360 with the same username and password used on third party systems. InstaVid360 securely proxies the authentication request from the app through to the third party web services.
InstaVid360 will customise the user authentication around third party authentication web services. InstaVid360 prefers JSON or XML RESTful web services.
Example third party web service: POST: https://third.party.com/api/auth
If your authentication requires fields in addition to the username and password (such as a Dealer Number), InstaVid360 is able to capture these from the user and use the details in the authentication process. If your API calls require individual user permissions to fetch stock and send spin information via a Webhook, please include a Token (and Refresh Token if the token expires) to be used. The user is not required to log into the app on every usage and will be remembered internally.
Whilst this solution is the fastest to implement in most third party systems, we are able to
authenticate users via an existing OAuth 2.0 framework on the client side.
Inventory/Stock Integration
The InstaVid360 app allows the dealer user to link spin and video content to third party stock items.
In order to display the third party stock list within the InstaVid360 app, the InstaVid360 backend requires secure access to the third party stock list web service. The InstaVid360 backend will use secure authentication to retrieve third party stock items and proxy them into the InstaVid360 app.
InstaVid360 prefers JSON or XML RESTful web services.
The following fields are expected to enable a dealership to navigate and search with ease through the inventory:
Field name
Description
Data type
Required
vehicle_id
Unique identifier for the vehicle in your system
alphanumeric
Required
stock_code
Reference for this vehicle at the dealership
alphanumeric
Optional (Defaults to vehicle_id)
brand
Brand of the vehicle, e.g. Audi
alphanumeric
Required
range
Range of the vehicle, e.g. Q5
alphanumeric
Required
derivative
Model derivative, e. g. 2.0 TFSI automatic
alphanumeric
Required
Year
Manufacturing or first registration year of the vehicle
4-digit integer
Optional
mileage
Current odometer reading for the vehicle
integer
Required
mileage_unit
Unit of the odometer reading
text ("km" or "mi")
Required
price
Advertised price for the vehicle
integer
Optional (recommended)
currency
Currency of the price in ISO 4217, e.g. USD, EUR, ZAR
Text (3 letters)
Required (if price is available)
colour
Colour of the vehicle
Text
Optional (recommended)
reg
Registration number of the vehicle
alphanumeric
Optional (recommended)
vin
VIN number of the vehicle
alphanumeric
Optional (recommended)
image
Link to an image for this vehicle, minimum size 800x600px recommended
Alphanumeric (url)
Optional (recommended)
Example third party web service: GET: https://third-party.com/api/stockfeed?dealer_id=12345
If required, this call can be authenticated, either via a global InstaVid360 Username/Password Token or user credential tokens.
Gallery Integration
Below is a high level view of the integration needed for InstaVid360 gallery image transfers, as we offer a very flexible solution, we would advise that InstaVid360 be contacted by a backend developer in order to iron out your preferred method of image ingestion.
InstaVid360 will require a feed that in addition to the UniqueReferenceNumber (VIN ⁄ Stock Code ⁄ Internal Vehicle ID) should contain the standard inventory fields (brand, range, derivative, mileage, mileage unit, price, currency, colour, registration number, VIN) as well as the image URLs for the vehicle.
The images that are received in the feed will be displayed within the InstaVid360 app.
The InstaVid360 app will allow users to add new images, remove existing images as well as rearrange the image order.
InstaVid360 will POST a json array containing the new images together with essential vehicle information (VIN ⁄ Stock Code ⁄ Internal Vehicle ID).
The list of images may contain a combination of images that were originally supplied, images that were added from within the InstaVid360 app, with any images that were removed in app not being included in the list. Note: images will be submitted based on the sort order in the app.
InstaVid360 is a flexible solution and does offer the ability to setup an image identifier which would allow images to be linked based on 3rd party storage logic.
Once InstaVid360 passes these images to you in a json array, you would need to be download and ingest them into your system.
When InstaVid360 pull's the inventory again, we will replace the internal list of images that we have for a vehicle with what has been supplied in the feed. We would expect the feed to now contain a combination of originally supplied inventory images as well as images that were added using the InstaVid360 app.
Push Spin/Video Codes to Inventory/Stock System
The InstaVid360 app is used link spin and video content to stock items.
In order to know which stock item should display a specific spin or video, InstaVid360 will push this information back to the third party stock system via a webhook.
Each spin or video created using the InstaVid360 app has a unique code. The InstaVid360 backend will securely push the spin or video code to the third party stock system web services, along with the third party unique identifier for the stock item.
InstaVid360 prefers JSON or XML RESTful web services.
Example third party web service: POST: https://third.party.com/api/stockitem
The spin or video elements are not necessarily both present in the same call. If a spin or video is changed, the new value will be supplied, if deleted, the values will be set to null.
If required, this call can be authenticated, either via a global InstaVid360 Username/Password/Token or user credential tokens.
To integrate InstaVid360 360° Spin and video content on websites, you would use the InstaVid360 javascript
loader.
The implementation of the InstaVid360 javascript player is provided below and this can be customised to suit the
context.
There are several variables which can be adjusted for web delivery.
Sizing is flexible although the 360° Spin and video content are served at an industry standard 16:9 or
4:3 aspect ratio
360° Spin resolutions available are: 360, 720 (recommended) and 1080.
Normal 360° Spin frame rate per 360° Spin available: 64 (recommended) up to max. 200
Using the sample HTML script snippet your front-end developers will be able to insert the InstaVid360 spin
player on the dealership VDP. The script will attempt to find the 360° Spin code and/or video
associated with the vehicle of choice and display the player which the user can interact with. The player will
not display when the script fails to find the associated spin code for the vehicle.
The spin player only requires one or both of the following fields: data-spin and/or data-video on the script element.
Please follow these steps when implementing the InstaVid360 spin player:
Insert script snippet on page where the player is to be displayed. Like this example
On this script add the spin code associated with the vehicle. Like this example
The player loads the content for the referenced vehicle. Like this example
You'll need to look out for these things
position; displays in the specified area
size; player inherits the size of the parent container
styling; certain website elements might look different based on the website CSS
interactivity; exterior and interior can be rotated
content; hotspots, buttons and gallery items loaded for the player
console errors
Once you have something, send us a link
We will review your implementation and do QA to make sure everything is 100%
Using the InstaVid360 app you will be able to create a spin for your vehicle
Once the spin is ready it will be available to display on your VDP
Ensure that the function is URL encoded. Example: ...&onLoad=function%28e%29%7Bwindow.top.postMessage%28%27Loaded%20Successfully%20%27%2C%20%27%2A%27%29%7D
To receive communication from the player on your parent site, use window.onmessage. Example:
window.onmessage = function(e) {
if (e.data){
console.log(e.data);
}
};
Final output should look something like this example:
If you would like the iframe's height to auto-adjust, you can include data-spin-resize="true" in the iframe element like the below example:
Parameters to collect information from the player:
From version 0.7 onwards, the InstaVid360 player provides front end developers with functions to detect player events and errors. These functions and their uses are described below.
metricsReturn function
The function to retrieve interaction events is the metricsReturn() function and it should be called as follows
The function stored in this parameter will be executed once an error occurs within the player. It will also return a variable containing the exact error.
Field: data-onError
Example:
<!-- element -->
<div id="spin-div" style="max-width: 640px; margin: 0 auto;"></div>
<!-- script -->
<script src="https://static.instavid360.com/p/0.7.latest/spin360.lite.js"></script>
<script>
var spinplayer = loadSpin360("spin-div", {
spin:"16303531620341_5edd084cd02986cc88410dfa48eaeeb8ae70b6cf1b517b7ea",
smoothing: 5,
language:"en",
onError: function(error){
console.log("Spin360 player failed to load - "+error);
}
});
</script>
Or:
<div id="spin-div" style="max-width: 640px; margin: 0 auto;">
<script src="https://static.instavid360.com/p/0.7.latest/spin360.lite.js"
data-spin="16303531620341_5edd084cd02986cc88410dfa48eaeeb8ae70b6cf1b517b7ea"
data-onError="function(error){
console.log('Spin360 player failed to load -'+error);}">
</script>
</div>
Functions that can be used outside of the player:
Note: the below functions require Spin360.getPlayer(0) to be assigned when referencing the player.
validSpin()
Returns true if a valid spin is found.
Example: var player = Spin360.getPlayer(0); var validSpin =
player.validSpin();
validVideo()
Returns true if a valid video is found.
Example: var player = Spin360.getPlayer(0); var validVideo =
player.validVideo();
The below functions are used to destroy the player and clear the spin container. Usage of
Spin360.getPlayer(0) isn't a requirement for these.
Spin360.destroyAll()
Destroys the Spin360 array.
Example: Spin360.destroyAll();
Spin360.emptyElement()
Clears the spin container/spin div.
Example: Spin360.emptyElement(spindiv);
Video is available in 720p mp4 format. 3rd parties may display the video content in their own player.
InstaVid360 recommends either JW Player (https://www.jwplayer.com/) or Video.js (https://videojs.com/)
In order for 3rd parties to integrate InstaVid360 spin content on their websites, they will need to use the
InstaVid360 javascript loader. The InstaVid360 javascript player can be customised to suit the context.
There are several variables which can be adjusted for web delivery.
Sizing is flexible although the spin and video content is served at an industry standard 16x9 aspect ratio
Spin resolutions available are: 360, 720 (recommended) and 1080
Spin frame rate per 360 spin available: 64 (recommended) up to max 200
There are 2 ways to embed the player into your website, method 1 involves adding a lite loading script into the
body of the element that you want the player to display and method 2 involves loading the external scripts and
then loading the player manually.
Method 1 (Inline)
Add script into HTML where player should appear and using the format below.
Using the sample HTML script snippet your front-end developers will be able to insert the InstaVid360 spin
player on the dealership front-page VDP. The script will attempt to use the spin code associated with the
vehicle of and display the player which the user can interact with. The player will not display when the
script fails to find the associated spin code for the vehicle.
The spin player only requires one of the vehicle fields: data-spin attribute on the script element.
Please follow these steps when implementing the InstaVid360 spin player:
Insert script snippet on page where the player is to be displayed. Like this example
On this script add the spin code value associated with the vehicle. Like this example
The player loads the content for the referenced vehicle. Like this example
You'll need to look out for these things
position; displays in the specified area
size; player inherits the size of the parent container
styling; certain website elements might look different based on the website CSS
interactivity; exterior and interior can be rotated
content; hotspots, buttons and gallery items loaded for the player
console errors
Once you have something, send us a link
We will review your implementation and do QA to make sure everything is 100%
Using the InstaVid360 app you will be able to create a spin for your vehicle
Once the spin is ready it will be available to display on your VDP
Spin player available settings:
Mandatory
Spin Code
Unique code for spin. Required
Field: data-spin
Customisation
Controls Align
Set position of control buttons
Field: data-control-align
Default: bottom
Options: top, middle, bottom
Controls Hover
Enable, disable "Go inside/outside" hover
buttons
Field: data-control-hover
Default: true
Options: true, false
Controls Scale
Enable, disable control button responsiveness
Field: data-control-scale
Default: true
Options: true, false
Controls Shadow
Enable, disable control button outline shadow
Field: data-control-shadow
Default: true
Options: true, false
Controls Text
Enable, disable control text variation of certain
buttons
Field: data-control-titles
Default: true
Options: true, false
Controls Titles
Enable, disable control button title tooltips
Field: data-control-titles
Default: true
Options: true, false
Cursor
Custom cursor set option
Field: data-cursor
Default: basic
Options: basic, none
Exterior Keyframes
Degree interval between exterior gallery frame
images
Field: data-ekf
Default: 45
Options: range between 10 - 180
Fullscreen
Enable, disable full-screen feature
Field: data-fullscreen
Default: true
Options: true, false
Gallery
Enable, disable or hide gallery feature
Field: data-gallery
Default: true
Options: true, false, hide
Height
Number of pixels or percentage string of player
height
Set up the player to display the desired hotspot type(s). Do so by using the hotspotType parameter and its possible values: all, feature, danger, warning, or none.The default is all
Use the 360° Spin Player functions to detect player events and errors. :
a. onError Function:
The function stored in this parameter will be executed once an error occurs within the player. It will also return a variable containing the exact error.
Inline method with onError Function:
<div id="spin-div" style="max-width: 640px; margin: 0 auto;">
<script src="https://static.instavid360.com/p/0.8.latest/spin360.lite.js"
data-spin="16152148091156_f3bcba7002732736acdf08cf7d45efbade11622c52cb26340"
data-onError="function(error){ console.log('Spin360 player failed to load -'+error); }"></script>
</div>
Advanced method with onError Function:
<!-- element -->
<div id="spin-div" style="max-width: 640px; margin: 0 auto;"></div>
<!-- script -->
<script src="https://static.instavid360.com/p/0.8.latest/spin360.lite.js"></script>
<script>
var spinplayer = loadSpin360("spin-div", {
"spin":"16152148091156_f3bcba7002732736acdf08cf7d45efbade11622c52cb26340",
"onError":"function(error){ console.log('Spin360 player failed to load -'+error); }"
});
</script>
b. 360° Spin Player Events
The function to retrieve interaction events from the player is the metricsReturn() function, and it should be called as follows:
The possible events are described in the following tables:
Control Bar Button Clicks
Event Type
Event Name
Description
button_click
exterior
The exterior button was clicked. The exterior spin is displayed
button_click
interior
The interior button was clicked. The interior spin is in focus
button_click
video
The video button was clicked. The stock video is played
button_click
camAngles_toggle_on
he default angles button was clicked to show the default angles grid
button_click
camAngles_toggle_off
The default angles button was clicked to hide the default angles grid
button_click
gallery_toggle_on
The gallery button in the control bar was clicked to show the hotspot gallery
button_click
gallery_toggle_off
The gallery grid was closed either by the clicking the gallery toggle button or the close button
button_click
gyro_toggle_on
The motion control button on the control bar was clicked (mobile only) to enable motion control panning of the 360° Spin
button_click
gyro_toggle_off
The motion control button on the control bar was clicked (mobile only) to disable motion control panning of the 360° Spin
button_click
hotspot_toggle_on
The hotspot label button in the control bar was clicked to display the hotspot text
button_click
hotspot_toggle_off
The hotspot label button in the control bar was clicked to hide the hotspot text
button_click
zoom_in
The zoom in button on the control bar was clicked. Zooming in on the spin
button_click
zoom_out
The zoom out button on the control bar was clicked. Zooming out on the spin.
button_click
zoom_exit
The zoom exit button on the control bar was clicked. Resetting the zoom of the spin
button_click
fullscreen
The fullscreen button on the control bar was clicked. Bringing the player to fullscreen
button_click
fullscreen_exit
The fullscreen exit button on the control bar was clicked. Returning the player to normal view
Hotspots and Floating Buttons Clicks
Event Type
Event Name
Description
button_click
exterior_float
The "Go Outside" hotspot was clicked on the spin. Exterior spin is displayed
button_click
interior_float
The "Go Inside" hotspot was clicked on the spin. Interior spin is displayed
button_click
hotspot_view
A hotspot or key frame was viewed
button_click
hotspot_exit
The close button on the hotspot was clicked. Closing the hotspot and returning to spin view
Other Events
Event Type
Event Name
Description
interior_view
N/A
Gets called when mode is set to Interior/Interior spin is displayed
spin_interaction
N/A
Gets called whenever there is any kind of interaction with the player (spin panning, switching modes, zooming, playing video etc.)
exterior_view
N/A
Gets called when mode is set to Exterior/Exterior spin is displayed
spin_loaded
N/A
Runs once at the start of the script
exterior_spin
N/A
Exterior spin is being panned
interior_spin
N/A
Interior spin is being panned
spin_ping
N/A
The player records the spin view duration
hotspot_view
N/A
Gets called when a hotspot is displayed on the screen
video
N/A
Gets called when mode is set to Video/Video is displayed
Reporting API
The reporting API returns statistics data in JSON format which your developers can work with. InstaVid360 will provide access to these webservice endpoints after setup is completed.
Authenticating:
Requests to the reporting API endpoints require authentication using Bearer token authorization as an HTTP header e.g. HTTP_AUTHORIZATION = Bearer {token}
Retrieving sample data:
Include sample token: RsFrHL1ST8JBZKDD0gh89TJSPLihZ5nWcssWsdoDkmScA7nn0IIo7UlrRo5P
Set timezone: ( `timezone` default is UTC )
Use the `timezone` as a query string parameter to retrieve data for the required timezone e.g. timezone=Europe-Berlin
Set date range: ( `date_from` default is the first day the current month ⁄ `date_to` default is yesterday )
Use the `date_from` and `date_to` query string parameter(s) to set the date range for the data e.g. date_from=2021-08-01&date_to=2021-08-31
Example with filtered options:
https://reports.instavid360.com/api/v2/portal/sample/usage/group?date_from=2021-08-01&date_to=2021-08-31&timezone=Europe-London
Retrieving sample data
You will be able to test using the sample token provided and the endpoints below to pull sample data.
This is the type of period to format stats data. The values are Y for year, M for month, or D for day.
period_start
This is the start time/date period for stats.
sessions
This is the count of instances where loading the spin player was attempted within the period.
min_duration
This is the shortest duration (seconds) of all sessions within the period.
max_duration
This is the longest duration (seconds) of all sessions within the period.
avg_duration
This is the average duration (seconds) of all sessions within the period.
spin_loaded
This is the count of times the spin player completed loading within the period.
exterior_view
This is the count of events when the exterior spin came into focus. This could be by loading the exterior spin
or toggling into the exterior from the interior
exterior_spin
This is the count of times the exterior spin was rotated within the period.
interior_view
This is the count of events when the interior spin came into focus. This could be by loading the interior spin
or toggling into the interior spin from the exterior spin.
interior_spin
This is the count of times the interior spin was rotated within the period.
hotspot_view
This is the count of hotspot views for the spin within the period.
gallery_scroll
This is the count of scrolls through the spin image gallery within the period.
button_click
This is the count of button clicks for the spin within the period.
spin_interaction
This is the count of spin interactions within the date period. A spin interaction is recorded for every
click/tap and release event.
spin_loaded_unique
This is the unique count of times the spin was loaded within the period.
exterior_view_unique
This is the count of unique exterior_views.
exterior_spin_unique
This is the count of unique events when the the exterior spin was rotated within the period.
interior_view_unique
This is the count of unique interior_views.
interior_spin_unique
This is the count of unique events when the the interior spin was rotated within the period.
hotspot_view_unique
This is the count of unique hotspot views within the period.
gallery_scroll_unique
This is the sum of unique scrolls in the spin image gallery within the period.
button_click_unique
This is the count of unique button clicks for the spin within the period.
spin_interaction_unique
This is the count of unique interactions with the spin within the period.
This is the type of period to format stats data. The values are Y for year, M for month, or D for day.
period_start
This is the start time/date period for stats.
sessions
This is the count of instances where loading the spin player was attempted within the period.
min_duration
This is the shortest duration (seconds) of all sessions within the period.
max_duration
This is the longest duration (seconds) of all sessions within the period.
avg_duration
This is the average duration (seconds) of all sessions within the period.
spin_loaded
This is the count of times the spin player completed loading within the period.
exterior_view
This is the count of events when the exterior spin came into focus. This could be by loading the exterior spin
or toggling into the exterior from the interior
exterior_spin
This is the count of times the exterior spin was rotated within the period.
interior_view
This is the count of events when the interior spin came into focus. This could be by loading the interior spin
or toggling into the interior spin from the exterior spin.
interior_spin
This is the count of times the interior spin was rotated within the period.
hotspot_view
This is the count of hotspot views for the spin within the period.
gallery_scroll
This is the count of scrolls through the spin image gallery within the period.
button_click
This is the count of button clicks for the spin within the period.
spin_interaction
This is the count of spin interactions within the date period. A spin interaction is recorded for every
click/tap and release event.
spin_loaded_unique
This is the unique count of times the spin was loaded within the period.
exterior_view_unique
This is the count of unique exterior_views.
exterior_spin_unique
This is the count of unique events when the the exterior spin was rotated within the period.
interior_view_unique
This is the count of unique interior_views.
interior_spin_unique
This is the count of unique events when the the interior spin was rotated within the period.
hotspot_view_unique
This is the count of unique hotspot views within the period.
gallery_scroll_unique
This is the sum of unique scrolls in the spin image gallery within the period.
button_click_unique
This is the count of unique button clicks for the spin within the period.
spin_interaction_unique
This is the count of unique interactions with the spin within the period.
This is the type of period to format stats data. The values are Y for year, M for month, or D for day.
period_start
This is the start time/date period for stats.
sessions
This is the count of instances where loading the spin player was attempted within the period.
min_duration
This is the shortest duration (seconds) of all sessions within the period.
max_duration
This is the longest duration (seconds) of all sessions within the period.
avg_duration
This is the average duration (seconds) of all sessions within the period.
spin_loaded
This is the count of times the spin player completed loading within the period.
exterior_view
This is the count of events when the exterior spin came into focus. This could be by loading the exterior spin
or toggling into the exterior from the interior.
exterior_spin
This is the count of times the exterior spin was rotated within the period.
interior_view
This is the count of events when the interior spin came into focus. This could be by loading the interior spin
or toggling into the interior spin from the exterior spin.
interior_spin
This is the count of times the interior spin was rotated within the period.
hotspot_view
This is the count of hotspot views for the spin within the period.
gallery_scroll
This is the count of scrolls through the spin image gallery within the period.
button_click
This is the count of button clicks for the spin within the period.
spin_interaction
This is the count of spin interactions within the date period. A spin interaction is recorded for every
click/tap and release event.
spin_loaded_unique
This is the unique count that customer have loaded the spin during this date period.
exterior_view_unique
This is the count of unique exterior_views.
exterior_spin_unique
This is the count of unique events when the the exterior spin was rotated within the period.
interior_view_unique
This is the count of unique interior_views.
interior_spin_unique
This is the count of unique events when the the interior spin was rotated within the period.
hotspot_view_unique
This is the count of unique hotspot views within the period.
gallery_scroll_unique
This is the sum of unique scrolls in the spin image gallery within the period.
button_click_unique
This is the count of unique button clicks for the spin within the period.
spin_interaction_unique
This is the count of unique interactions with the spin within the period.