Reading Sessions & Goods Data Through API
1. Create a new API rule (similarly to https://lbvr.net/knowledge-base/reading-leaderboard-through-api/) or edit an existing one and assign the “customers” permission.
2. The customers data is available in both – JSON and XLSX formats.
HTTP GET Request:
The result is suitable for automation in third party tools and backends.
- http://api.lbvr.net/data/<ENDPOINT>/<API_KEY>/<TYPE>/<RANGE>/<SEARCH CRITERIA>
Example:
- http://api.lbvr.net/data/sessions/11111111-1111-1111-1111-111111111111/json/1 day/date=2019-07-12
ENDPOINT = sessions OR goods
TYPE = json OR xlsx
RANGE = indicates how many days should be returned after the main date (which can be set through the search criteria). The range value consist of an integer value (1) and a period string (hour ; day ; month ; year). Combinations are possible as well:
- 1 month 5 days
- 2 months 3 days
- 1 day 8 hours
SEARCH CRITERIA = a space separated string. Support the following options:
- date=[YYYY-MM-DD] — specifies the start date for the RANGE value (mandatory in the common case)
- date>[YYYY-MM-DD] — equal or great than the specified date
- date<[YYYY-MM-DD] — equal or less than the specified date
- today — considers the current date
- upcoming — any reservation that isn’t yet used
- skip_api — ignore all sessions created through the API (i.e. skip all sessions booked online)
- api_only — return only the online session
- customer:[ID] — obtain results for a specific customer account
- label:[ID] — obtain results based on a label(tag) ID
- uuid:[UUID] — lookup a specific session by its SynthesisVR Session ID
- externaluuid:[UUID] — lookup one or more sessions by an external UUID (supplied to Synthesis at creation time)
- [free text] — can be used to search based on customer name, email address, phone number and other specific information. It doesn’t require a prefix as with the options above.
- comments — extract the comments data (only for JSON exports)
Note: Anything described above as [something] have to be replaced with the actual value you are looking for.