menu
USER
Authenticate User

Authenticate your developer account by including your secret VSETA Application Access Key ID in API requests. Your API Access Key ID may carry many privileges, so be sure to keep it secure! Use your unique Access Key ID to obtain  apiToken for each request. All API requests must be made over HTTPS. API requests without authentication will fail.

URLAJAX ENDPOINT

https://ai.vseta.com/auth/

ParametersAJAX DATA JSON

                            //Use Your Developer Account
                            var userName = "your_dev_account@domain.com";
                            var userCertificate = "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX";

                            //Application API Account Key - Do Not Share your ID.
                            var accessKeyId = "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX";

                            
                            var sessionToken = JSON.stringify([
                            {"name":"username","value":userName},
                            {"name":"usercertificate","value":userCertificate},
                            {"name":"accessKeyId","value":accessKeyId}
                            ]);
                            
ReturnsJSON DATA OBJECT

                               [{
                               SessionToken: "0x00"
                               }]
                            
Tip: SessionToken is passed to other applicable APIs Sample Code

                             //***** VSETA API ACCESS *****
        
                            //Use Your Developer Account
                            var userName = "your_dev_account@domain.com";
                            var userCertificate = "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX";

                            //Application API Account Key - Do Not Share your ID.
                            var accessKeyId = "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX";

                            //Add accessKeyId to User Login for Authentication
                            var sessionToken = JSON.stringify([{"name":"username","value":userName},{"name":"usercertificate","value":userCertificate},{"name":"accessKeyId","value":accessKeyId}]);

                            //************************************

                            $.ajax({
                                type: "POST",
                                dataType: "json",
                                contentType : "application/json",
                                url: "https://ai.vseta.com/auth/",
                                data: sessionToken, 
                                success: function(data){

                                    //Modify the SessionToken parameters according to VSETA API Documentation
                                     var apiToken = JSON.stringify([{sessionToken:data[0].SessionToken},{propertyid:propertyId},{accessKeyId:accessKeyId}])

                                    //Call various VSETA APIs using apiToken, which includes valid SessionToken
                                      $.ajax({
                                        type: "POST",
                                        dataType: "json",
                                        contentType : "application/json",
                                        url: "https://ai.vseta.com/endpoint_url/",
                                        data: apiToken,
                                        success: function(data){
                                            //URL: Modify URL according to VSETA API Documentation to access various subscribed Restful APIs.
                                            //success: Success Returns JSON Array Object if accessKeyId is valid for the called Restful API resource.
                                        },
                                        failure: function(errMsg) {
                                            console.log("ERROR: "+ errMsg);
                                        }
                                    });
                                },
                                failure: function(errMsg) {
                                    console.log("ERROR: "+ errMsg);
                                }
                            });
                            
Retrieve User Profile

This API returns User Profile information for a user with UserName and Certificate.

URLAJAX ENDPOINT

https://ai.vseta.com/getUserProfile/

ParametersAJAX DATA JSON

                            //Application API Account Key - Do Not Share your ID.
                            var accessKeyId = "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX";
                            
                            var sessionToken = JSON.stringify([{"sessionToken":"Auth_SessionToken"},
                                               {"accessKeyId":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX"}]);
                            
ReturnsJSON DATA OBJECT

                               {
                                Email: "your_dev_account@domain.com",
                                EmailHourlyReport: "0",
                                FirstName: "User_First_Name",
                                LastName: "User_Last_Name",
                                Id: "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX",
                                NotifyEndTime: "18:00:00",
                                NotifyStartTime: "07:00:00",
                                PhoneNumber: "+14160000000"
                                homePageURL: "vseta.html"
                                languageCode: "en"
                                logo_light: "data:image/png;base64,image"
                                }
                            
List Property Subscriptions (Building)

Get a list of User Subscribed Properties.

URLAJAX ENDPOINT

https://ai.vseta.com/getUserPropertySubscriptions/

ParametersAJAX DATA JSON

                             //Application API Account Key - Do Not Share your ID.
                            var accessKeyId = "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX";
                            
                            var sessionToken = JSON.stringify([{"sessionToken":"Auth_SessionToken"},
                                               {"accessKeyId":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX"}]);
                            
Returns

                            [{
                            PublicPropertyId: "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX",
                            Title: "Property XYZ",
                            Description: "East Tower", 
                            Name: "A"
                            Address: "4800 - 1 King St. W"
                            City: "Toronto"
                            Country: "Canada"
                            NotifyTagEvent: "true"
                            OrgId: "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX"
                            PostalCode: "M5H 1A1"
                            PublicPropertyId: "CXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX"
                            Region: "Ontario"
                            addUsers: "false"
                            deleteUsers: "false"
                            emailNotifications: "false"
                            homepage: "https://www.vseta.com"
                            isActive: "true"
                            modifyNetwork: "true"
                            modifyServiceSLA: "true"
                            notifyEndTime: "23:59:00"
                            notifyStartTime: "00:09:00"
                            sendLogin: "true"
                            updateUsers: "true"
                            viewInvoice: "false"
                            viewNetwork: "true"
                            viewServiceSLA: "true"
                            viewUsers: "true"
                            }]
                            
List Organization Subscriptions

Get a list of User Subscribed Organizations.

URLAJAX ENDPOINT

https://ai.vseta.com/getOrgSubscriptions/

ParametersAJAX DATA JSON

                            //Application API Account Key - Do Not Share your ID.
                            var accessKeyId = "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX";
                            
                            var sessionToken = JSON.stringify([{"sessionToken":"Auth_SessionToken"},
                                               {"accessKeyId":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX"}]);
                            
Returns

                            [{
                            Title: "Organization XYZ", 
                            Desc: "Organization Description", 
                            Unit: "4800"
                            City: "Toronto"
                            OrgId: "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX"
                            PostalCode: "M5H 1A1"
                            State: "Ontario"
                            Street: "1 King St. W"
                            }]
                            
List User Event Subscriptions

Get a list of User Subscribed Events.

URLAJAX ENDPOINT

https://ai.vseta.com/getUserEventSubscriptions/

ParametersAJAX DATA JSON

                            [
                            {"sessionToken":"0x00"},
                            {"accessKeyId":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX"},
                            {"selectedUserId":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX"},
                            {"selectedOrgId":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX"}
                            ]
                            
Returns

                            [{
                            EventTypeID: "0", 
                            EventStatusID: "11"
                            EventStatusName: "Scheduled"
                            EventTypeID: "0"
                            EventTypeName: "Cleaning"
                            isActive: "true"
                            }]
                            
List User Location Subscriptions

Get a list of User Subscribed Events.

URLAJAX ENDPOINT

https://ai.vseta.com/getSubscribedLocationsOccupancy/

ParametersAJAX DATA JSON

                            [
                            {"sessionToken":"0x00"},
                            {"publicPropertyId":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX"}
                            ]
                            
Returns

                            [{
                            Notify: "0", 
                            TrafficAlert: "35", 
                            Property: "1 King St W.", 
                            Building: "20"
                            FloorNumber: "9"
                            LocationAlias: "4th Female North"
                            LocationInfo: "Toilet Paper Dispenser"
                            LocationLabel: "P60_4thFemaleNorth_6"
                            Notify: "0"
                            }]
                            
List Users

Get a list of Users subscribed to Organization.

URLAJAX ENDPOINT

https://ai.vseta.com/getUsers/

ParametersAJAX DATA JSON

                            [
                            {"sessionToken":"0x00"},
                            {"orgId":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX"},
                            {"accessKeyId":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX"}
                            ]
                            
Returns

                            [{{
                            Email: "your_dev_account@domain.com", 
                            First Name: "Dev", 
                            Last Name: "User",
                            Add Users: "false"
                            Delete Users: "false"
                            Email Alerts: "false"
                            First Name: "Bennie"
                            Last Activity: "2018-03-20 06:32:00"
                            Modify Network: "false"
                            Modify Service SLA: "false"
                            Notify End Time: "18:00:00"
                            Notify Start Time: "07:00:00"
                            Send Login: ""
                            Settings: ""
                            UserId: "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX"
                            View Invoices: "false"
                            View Network: "true"
                            View Send Login: "false"
                            View Service SLA: "false"
                            View Users: "false"
                            }]
                            
EVENTS
List User Event Subscriptions

Get a list of User Subscribed Events.

URLAJAX ENDPOINT

https://ai.vseta.com/getUserEventSubscriptions/

ParametersAJAX DATA JSON
 
                            [
                            {"sessionToken":"0x00"},
                            {"accessKeyId":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX"},
                            {"selectedUserId":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX"},
                            {"selectedOrgId":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX"}
                            ]
                            
Returns

                            [{
                            EventTypeID: "0", 
                            EventStatusID: "11", 
                            EventTypeName: "Cleaning"
                            EventStatusName: "Scheduled"
                            isActive: "false"
                            }]
                            
List Latest Events

Get a list of Latest User Subscribed Events.

URLAJAX ENDPOINT

https://ai.vseta.com/getLatestVSETAEvents/

ParametersAJAX DATA JSON
 
                            //Application API Account Key - Do Not Share your ID.
                            var accessKeyId = "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX";
                            
                            var sessionToken = JSON.stringify([{"sessionToken":"Auth_SessionToken"},
                                               {"accessKeyId":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX"}]);
                            
Returns

                            [{
                            Email: "your_dev_account@domain.com", 
                            EventSource: "Entry 4", 
                            EventStartsDate: "Tue Oct 19-2021",
                            Ago: "3wk ago"
                            Email: "your_dev_account@domain.com"
                            EventEnds: "11:07 AM"
                            EventEndsDate: "Tue Oct 19-2021"
                            EventLocation: "Floor 1"
                            EventStarts: "11:00 AM"
                            EventStatusColor: "#5856D6"
                            EventStatusId: "21"
                            EventStatusName: "Missed (Not Serviced)"
                            EventTitle: "Cleaning"
                            EventTypeName: "Cleaning"
                            PropertyName: "Property-Name"
                            }]
                            
List Event Source

Get a list of VSETA Event Sources such as Zones.

URLAJAX ENDPOINT

https://ai.vseta.com/getVSETAEventSource/

ParametersAJAX DATA JSON
 
                            [
                            {"sessionToken":"0x00"},
                            {"propertyid":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX"},
                            {"accessKeyId":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX"},
                            {"startDate":"2021-10-10"},
                            {"endDate":"2021-10-10"},
                            {"eventType":0},
                            {"eventStatus":""}
                            ]
                            
Returns

                            [{
                            ZoneTitle: "A1538",
                            LocationGroupId: "AXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX",
                            CleanFeedbackQR: "https://www.vseta.com/"
                            ZoneId: "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX"
                            ZoneTitle: "A1538"
                            }]
                            
List Events

Get a list of VSETA Event for Zones.

URLAJAX ENDPOINT

https://ai.vseta.com/getVSETAEvents/

ParametersAJAX DATA JSON
 
                            [{
                            "sessionToken":"0x00"},
                            {"propertyid":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX"},
                            {"accessKeyId":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX"},
                            {"startDate":"2021-11-10"},
                            {"endDate":"2021-11-10"},
                            {"eventType":0},
                            {"eventStatus":""
                            }]
                            
Returns

                            [{
                            ZoneTitle: "Bay Area Ladies Washroom", 
                            LocationGroupId: "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX",
                            EventBgColour: ""
                            EventId: "2634130"
                            EventPublicId: "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX"
                            EventStatusCustomClass: "Z3_sked-tape__event__Not_serviced"
                            EventStatusId: "19"
                            EventStatusName: "Serviced Out-of-Schedule"
                            EventTitle: "Cleaning"
                            EventTypeId: "0"
                            EventTypeName: "Cleaning"
                            RowId: "1"
                            ScheduleEnd: "Wed Nov 10 2021 15:50:00 GMT+0000 (Coordinated Universal Time)"
                            ScheduleStart: "Wed Nov 10 2021 15:00:00 GMT+0000 (Coordinated Universal Time)"
                            eventColor: "#5856D6"
                            eventStyle: "line"
                            recurrenceRule: ""
                            }]
                            
List Event Timeline

Get a list of VSETA Event Timeline such as Service Detections.

URLAJAX ENDPOINT

https://ai.vseta.com/getServiceTimeline/

ParametersAJAX DATA JSON
 
                            [
                            {"sessionToken":"0x00"},
                            {"propertyid":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX"},
                            {"accessKeyId":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX"},
                            {"startDate":"2021-11-11"},
                            {"endDate":"2021-11-11"},
                            {"reportType":0},
                            {"locationType":""}
                            ]
                            
Returns

                            [{
                            ZoneTitle: "Zone Name", 
                            LocationGroupId: "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX",
                            EventBgColour: "#0066FF"
                            EventPublicId: "3515053"
                            EventTitle: "Service"
                            ServiceEnded: "2021-11-11 06:54:00"
                            ServiceStarted: "2021-11-11 06:53:30"
                            TagId: "XYZ - Tag 1"
                            customClass: "sked-tape__event__actual_service"
                            }]
                            
List Event Triggers

Get a list of VSETA Event Triggers.

URLAJAX ENDPOINT

https://ai.vseta.com/getVSETAEventTRG/

ParametersAJAX DATA JSON
 
                            [
                            {"sessionToken":"0x00"},
                            {"publicPropertyId":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX"},
                            {"accessKeyId":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX"},
                            {"VSETAEventTRGJSON":{"Metadata":[{}]}}
                            ]
                            
Returns

                            [{
                            Title: "5th North Male", 
                            CompleteOnEnd: "false", 
                            EventAssigneeSourceDesc: "SensorLocation"
                            EventDurationMin: "60"
                            EventEndTime: "Thu Jan 01 1970 18:00:00 GMT+0000 (Coordinated Universal Time)"
                            EventEndTimeFormatted: "18:00:00"
                            EventStartTime: "Thu Jan 01 1970 00:01:00 GMT+0000 (Coordinated Universal Time)"
                            EventStartTimeFormatted: "00:01:00"
                            EventTRGSubscriptionId: "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX"
                            EventTypeDesc: "Clean Bathroom Schedule"
                            EventTypeId: "0"
                            EventTypeName: "Cleaning"
                            EventTypeUnit: "Traffic Count"
                            PostEventMin: "15"
                            PreEventMin: "-15"
                            PublicVSETAEventTRGId: "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX"
                            TargetLevel: "35"
                            Title: "5th North Male"
                            TriggerDisabled: "false"
                            isActive: "false"
                            }]
                            
HEATMAP
List Property HeatMap

Get the property heatmap.

URLAJAX ENDPOINT

https://ai.vseta.com/getLocationHeatMap/

ParametersAJAX DATA JSON

                            [
                            {"sessionToken":"0x00"},
                            {"propertyid":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX"},
                            {"accessKeyId":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX"},
                            {"targetDate":"2021-11-10"},
                            {"locationType":"'0'"},
                            {"heatMapValStyle":"0"},
                            {"predictive":0}
                            ]
                            
Returns

                            [{
                            "col":"0",
                            "row":"0",
                            "val":"0",
                            "serviced":"0",
                            "LocationLabel":"A4055",
                            "LocationAlias":"A4051",
                            "LocationType":"1",
                            "FloorNumber":"4",
                            "NotifyCount":"25",
                            "ServiceProviderId":"",
                            "OccupancyServiceRatio":"0",
                            "OccupancyBeforeService":"0",
                            "DateStamp":"Wed Nov 10 2021 00:00:00 GMT+0000 (Coordinated Universal Time)",
                            "TagBatt":"0",
                            "LocationBatt":"0",
                            "LocationNodeBatt":"0",
                            "PredictedService":"",
                            "HTStatus":"0",
                            "PeriodServiced":"0"
                            }]
                            
NETWORK
List Network Devices

Get the Network Devices of an Organization.

URLAJAX ENDPOINT

https://ai.vseta.com/getLocationHeatMap/

ParametersAJAX DATA JSON

                            [
                            {"sessionToken":"0x00"},
                            {"propertyid":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX"},
                            {"accessKeyId":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX"},
                            {"deviceTypeId":"15"}
                            ]
                            
Returns

                            [{
                            FirstName: "Tag 1", 
                            LastName: "Routine XYZ", 
                            Email: "tag1.BSCXYZ@vseta.com", 
                            keyTagName: "ROUTINE XYZ",
                            Activity: ""
                            Battery: ""
                            CleanerTag: "true"
                            DeviceType: "NodeTag"
                            DeviceTypeId: "15"
                            EntranceDetection: "false"
                            FamilyBathroom: "true"
                            KeyTag Label: "ROUTINE XYZ"
                            Last Check-in: "2021-04-05 10:09"
                            Last Payload (Min Ago): "316052"
                            Location: "A"
                            LocationId: "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX"
                            MaleBathroom: "true"
                            OrgId: "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX"
                            Power: ""
                            Product: "NodeTag"
                            Serial: "00-00-SERIAL"
                            Settings: ""
                            Site: "Organization_Name"
                            UserId: "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX"
                            WomenBathroom: "true"
                            isActive: "true"
                            }]
                            
Account
List Invoices

Get a List of Invoices.

URLAJAX ENDPOINT

https://ai.vseta.com/getInvoices/

ParametersAJAX DATA JSON

                            [
                            {"sessionToken":"0x00"},
                            {"accessKeyId":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX"}
                            ]
                            
Returns

                            [{
                            Property Title: "Property XYZ", 
                            Amount Due + Tax: "$330.00",
                            Currency: "CAD",
                            Distribution: "",
                            Distribution Rate (%): "0",
                            Email: "Send",
                            First Name: "User_First_Name",
                            Last Name: "User_Last_Name",
                            Invoice: "",
                            Invoice Address: "1234-101 Street",
                            Invoice City: "Ontario",
                            Invoice Country: "Canada",
                            Invoice State/Prov: "ON",
                            Inovoice Postal Code: "M5H 1A1",
                            Invoice Date: "2021-10-01",
                            Invoice Email: "UserABC.BSCXYZ@vseta.com",
                            Invoice Number: "XXXXXX-XXXXXX-XXXXXX",
                            Status: "Pending",
                            Subscription ID: "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX"
                            }]
                            
Tip:This API only returns data for Users with Invoice Permission.