Synthesis VR API – Booking Widget

Table of Contents

How Can We Help?

You are here:

API

As explained, the booking widget just utilizes the API and gives a ready to use example. However, in many cases, that may not be enough and as you may want to better match your website design, integrate your own payment processor, use a different language and so on.
What usually would be enough is to open the widget page, copy all the source code in your own site and start editing the HTML / Javascript.
However, this still may not be sufficient for some of you, so here comes the direct API integration. If you are not a developer and you don’t have such on hand, please stick to the widget. The next would just confuse you unnecessary.


API CALL – AVAILABILITY

URL = https://api.synthesisvr.com/ Method = GET
Resource = /web/<public_key>/availability

Accepted parameters:

Parameter Format Description
people Integer the number of VR stations you wants to book
experience Integer the id of the experience type. If not provided, SynthesisVR would use the first experience type that is assigned on the widget
date String ; YYYY-
MM-DD
A date that isn’t in the past
duration Integer a duration that exists under your work hour
rules
customer_token String (optional) A token obtained via the

/web/<public_key>/customers/auth API call

JSON Response:

Name Type Description
balance String Shows the balance for the given customer_token or $0.00 if no balance is available
coupons Array

Shows the available vouchers against the given customer_token. Some vouchers may not appear if they are not allowed for the desired “people” ;

“experience” ; “date” and “duration” parameters

dows Integer Array

From 0 to 6. Points to the days of the week when reservations can be booked.

0 = Monday ; 6 = Sunday

special_days Array If a day of the week is disabled via the dows parameter, but there are exceptions.
stations Key – Object pairs The key refers to experience type id. Check the “Experience Type Object” for the object values.
times Key – Object pairs Represents the daily availability. Check the “Availability Object” for detailed description.

Experience Type Object:
 

Name Type Description
book_all Boolean This reservations requests to book all stations.
descr Text Description of the experience type
durations Integer Array Available durations in minutes
pcs String Array The SynthesisVR IDs of the VR stations
pos Integer If there are multiple experience types – the position of the current one
stations Integer The total number of PCs under this experience type
title String Title of the experience type

 
Availability Object:
 

Name Type Description
cost Float The final cost to be charged per station
endTimePre Timestamp – ISO 8601

A timestamp object pointing to when the session would end

moreOptions Key – Object pairs Additional paid options for the current object
precost Float The cost per station before discounts
startTime String The startTimePre parameter in a human readable format
startTimePre Timestamp – ISO 8601

A timestamp object pointing to when the session would start

stations Integer The number of available (free) stations.
value Time String – format HH:MM

The “time” value to be used with the

/web/<public_key>/book API call

 


API CALL – VALIDATE EMAIL

URL = https://api.synthesisvr.com/ Method = POST
Resource = /web/<public_key>/customers/validateEmail Accepted parameters:

Parameter Format Description
email String (optional) Email string to validate

JSON Response:

Name Type Description
status Boolean True = there is a customer with such email address. You could proceed to authentication.
False = no such customer exists. You could proceed with a signup process

API CALL – CUSTOMER AUTHENTICATION

 
 
URL = https://api.synthesisvr.com/ Method = POST
Resource = /web/<public_key>/customers/auth

Accepted parameters:

Parameter Format Description
email String Email string to authenticate
password String (optional) Password related to the given email
service String (optional) The name of an authentication service. Example: “facebook”
serviceString String

(optional) The value to be authenticated for the given service string.

JSON Response:

Name Type Description
cc String

Last 4 digits of the CC associated with the account (e.g. XXXX1234)

msg String Text description of the API call result
name String Customer name
pm String “0” = No payment method and no CC data collection is needed
status Integer 1 = Authenticated ; 0 = Invalid credentials
token String A string to be used with the AVAILABILITY and BOOK API calls


API CALL – CUSTOMER CREATION

URL = https://api.synthesisvr.com/ Method = POST
Resource = /web/<public_key>/customers/create

Accepted parameters:

Parameter Format Description
email String Email string to authenticate
password String (optional) Password related to the given email
service String (optional) The name of an authentication service. Example: “facebook”
serviceString String (optional) The value to be authenticated for the given service string.
name String Full customer’s name
additional JSON
key-value pairs

Additional information to keep per customer. Example:

{“birthday”:”1st April, 1985″,”phone”:”12135559999″}

The API response is the same JSON as for:

  • /web/<public_key>/customers/auth

 


API CALL – CUSTOMER UPDATE CC

 
 
URL = https://api.synthesisvr.com/ Method = POST
Resource = /web/<public_key>/customers/updateCC Accepted parameters:

Parameter Format Description
customer_token String The token obtained from an “auth” or “create” API call
json JSON
key-value pairs

The complete CC data. See below for field description.

Note: the key-value pairs may vary between the payment processors

JSON Response:

Name Type Description
status Integer 1 = Success ; 0 = Failure, use “msg” to lookup the error
msg String Text description of the error.

PayPal Here – JSON object:
 

Name Type Description
credit_card Integer 1 = Success ; 0 = Failure, use “msg” to lookup the error
security_digits String Text description of the error.
exp_date1 Integer CC expiration Month
exp_date2 Integer CC expiration Year
first_name String First Name
last_name String Last Name
cardholder_address String Address of the CC owner
cardholder_city String City
cardholder_country String Country
cardholder_state String State
cardholder_zip String ZIP code
cardholder_phone String Phone number

 


API CALL – CUSTOMER ASSIGN VOUCHER

URL = https://api.synthesisvr.com/ Method = POST
Resource = /web/<public_key>/customers/assignVoucher Accepted parameters:

Parameter Format Description
customer_token String The token obtained from an “auth” or “create” API call
code String The voucher / coupon code

JSON Response:

Name Type Description
status Integer 1 = Success ; 0 = Failure, use “msg” to lookup the error
msg String Text description of the error.


API CALL – RESERVATION BOOKING

URL = https://api.synthesisvr.com/ Method = POST
Resource = /web/<public_key>/book Accepted parameters:

Parameter Format Description
date String The reservation date. Format: YYYY-MM-DD
time String

The time of the reservation. Format HH:MM. Use the “value” parameter from Availability Object

people Integer Refers to the number of stations to be reserved. Use the “stations” parameter from the related Availability Object
experience Integer Use the same value that you passed to the availability API call
duration Integer Use one of the values for the “durations” parameter from the related Experience Type Object
customer_token String The token obtained from an “auth” or “create” API call
coupons Integer

Use an integer value from the “coupons” parameter that comes in response for the availability API call

comment Text Pass any string / text and it would appear as a customer comment on the reservation.
pcs String

(optional) Comma separated integer array with the SynthesisVR id’s of the involved VR Stations

externaluuid UUID String (optional) You can supply a session id coming from a third party system. The value can be used for retrieving the Synthesis session through the API

JSON Response:

Name Type Description
uuid String 1 = Success ; 0 = Failure, use “msg” to lookup the error
msg String Text description of the error.
additional_uuids String

In case your booking requires the creation of multiple reservations, the uuids of all reservations would be populated here

cost Float

The cost that is charged (if payment method is attached to the widget) or that would have to be charged on site

datetime String

A text representation of the start time of the reservation.

Example: 2017, November 30 – 10:00

experience String The title of the experience type
voucher_code String The voucher code that have been used (if any)

Sign Up For Your Trial