CavVisit | API Documentation Current version 1.0

Introduction to CavVisit WEB API integration.

NOTE! If you want to integrate with CavVisit RESTFul API you will need the following (free of charge).

  1. Signed NDA with PartnerSec.
  2. An online introduction of CavVisit.
  3. 3. API keys and login to the main CavVisit service.

Send an email to sales@partnersec.com and you will contacted by our API team that will supply you with all the information you need.


Description

CavVisit is a cloud-based Automatic Visitor Management system that is a part of the cloud-based PartnerSec APV platform - Access control, Payment system, Visitor Management.

CavVisit is the fully automated Visitor Management system that will guide visitors in your facilities and make sure the hosts are notified up on their arrival. You can design the visitors experience and let the system give them the world’s best first impression.


System info

Owner = Commercial Real Estate company, Enterprise, Small & Medium business that requires visitor management.

Facility = A Facility is a way to give unique settings such as system behavior, integrations, email, text message etc to a local office, tenant in a multi floor building etc. If there are 10 tenants in a multi floor building they will each get their own Facility. If there are one HQ and 3 local offices, there will be 4 Facilities.

Host = Is a person or resource that can receive visitors.

Visitor = A person, vehicle or resource visiting a host.


One Facility – One Integration

Each Facility has its unique integration keys (Customer ID and WEB API Key). This means that if you are going to create integrations to several Facilities you need to remember that you will have to send commands to 4 different Facilities. Example;

Facility 1 = Head quarters
API user info = Customer ID=1 and WEB API key=1234

Facility 2 = Local office West Coast
API user info = Customer ID=2 and WEB API key=12345

Facility 3 = Local office East Coast
API user info = Customer ID=3 and WEB API key=123456

Facility 4 = Local office South Coast
API user info = Customer ID=4 and WEB API key=1234567

For further questions, contact PartnerSec on sales@partnersec.com.


Visits


GetVisits

Retrieves visits that exists in CavVisit.

Syntax
JSON example


$.ajax({
    type: 'GET',
    url: 'https://api.cavvisit.com/api/Visits/GetVisits',
    data: { customerKey: "123456789", customerId: "1" },
    dataType: 'json',
    success: function (data) {},
    error: function (request, message, error) {}
});


Parameters

string customerKey
The string representing the unique web key of the customer in the database.

int customerId
The int representing the unique ID of the customer in the database.

Return value

Type: List<Visit>
A list of visits information.


 

GetVisitsByHost

Retrieves visits that exists in CavVisit and belongs to host.

Syntax
JSON example


$.ajax({
    type: 'GET',
    url: 'https://api.cavvisit.com/api/Visits/GetVisitsByHost',
    data: { customerKey: "123456789", customerId: "1", hostId: "18545" },
    dataType: 'json',
    success: function (data) {},
    error: function (request, message, error) {}
});


Parameters

string customerKey
The string representing the unique web key of the customer in the database.

int customerId
The int representing the unique ID of the customer in the database.

int hostId
The int representing the unique ID of the host in the database.

Return value

Type: List<Visit>
A list of visits information.


 

GetVisitsByDate

Retrieves visits that exists in CavVisit during the date period.

Syntax
JSON example


$.ajax({
    type: 'GET',
    url: 'https://api.cavvisit.com/api/Visits/GetVisitsByDate',
    data: { customerKey: "123456789", customerId: "1", dateFrom: "2020-03-20 05:15", dateTo: "2021-03-20 05:15" },
    dataType: 'json',
    success: function (data) {},
    error: function (request, message, error) {}
});


Parameters

string customerKey
The string representing the unique web key of the customer in the database.

int customerId
The int representing the unique ID of the customer in the database.

string dateFrom
The string representing the from date.

string dateTo
The string representing the to date.

Return value

Type: List<Visit>
A list of visits information.


 

CreateVisit

Creates a new visit.

Syntax
JSON example

    
var Visit = JSON.stringify({
    VisitorName: "Chris Park", VisitorCompany: "CavVisit SA", Telephone: "0046889977", MobilePhone: "040888877", Email: "chris.park@cavvisit-sa.com", Host: "1505",
    Notes: "Created by API", CarPlate: "NMM 565", GroupName: "SV GROUP", Place: "Office", Subject: "API visit", Organizer: "Chris Park", Field1: "f1", 
    DateVisit: "2020-03-20 05:15", DateValidTo: "2021-11-29 10:00"
});

$.ajax({
    type: 'POST',
    url: 'https://api.cavvisit.com/api/Visits/CreateVisit',
    data: {customerKey: "1234567891", customerId: "1", Visit},
    dataType: 'json',
    success: function (data) {},
    error: function (data) {}
});


Parameters

string customerKey
The string representing the unique web key of the customer in the database.

int customerId
The int representing the unique ID of the customer in the database.

Visit Visit
A visit object.

Return value

Type: List<Visit>
A list containing one visit.


 

UpdateVisit

Updates an existing visit.

Syntax
JSON example


var Visit = JSON.stringify({
    Id: "100734", VisitorName: "Chris Park", VisitorCompany: "PARTNERSEC", Telephone: "08889789", MobilePhone: "040888877", Email: "Chris@api.com", Host: "1505",
    Notes: "Updated by API", CarPlate: "NMM 565", GroupName: "SV GROUP", Place: "Office", Subject: "API visit", Organizer: "Chris", Field1: "f1",
    DateVisit: "2020-03-20 05:15", DateValidTo: "2021-11-29 10:00"
});

$.ajax({
    type: 'PUT',
    url: 'https://api.cavvisit.com/api/Visits/UpdateVisit',
    data: {customerKey: "123456789", customerId: "1", Visit},
    dataType: 'json',
    success: function (data) {},
    error: function (data) {}
});


Parameters

string customerKey
The string representing the unique web key of the customer in the database.

int customerId
The int representing the unique ID of the customer in the database.

Visit Visit
A visit object.

Return value

Type: List<Visit>
A list containing one visit.


DeleteVisit

Deletes a visit.

Syntax
JSON example


$.ajax({
    type: 'DELETE',
    url: 'https://api.cavvisit.com/api/Visits/DeleteVisit',
    data: {customerKey: "123456789", customerId: "1", Id: "112561"},
    dataType: 'json',
    success: function (data) {},
    error: function (request, message, error) {}
});

string customerKey
The string representing the unique web key of the customer in the database.

int customerId
The int representing the unique ID of the customer in the database.

int id
The int representing the unique ID of the visit in the database.





Companies


GetCompanies

Retrieves companies that exists in CavVisit.

Syntax
JSON example


$.ajax({
    type: 'GET',
    url: 'https://api.cavvisit.com/api/Companies/GetCompanies',
    data: {customerKey: "123456789", customerId: "1"},
    dataType: 'json',
    success: function (data) {},
    error: function (data) {}
});


Parameters

string customerKey
The string representing the unique web key of the customer in the database.

int customerId
The int representing the unique ID of the customer in the database.

Return value

Type: List<Company>
A list of companies information.


CreateCompany

Creates a company.

Syntax
JSON example


var Company = JSON.stringify({ 
    Description: "Web Api Company", Address: "Regeringsgatan 22", City: "Stockholm", PostCode: "17 32", Country: "SE", DefaultCheckOutMinutes: "30", 
    Email: "api@api-company.se", Telephone: "0046888971", MobilePhone: "0046702525", VatNumber: "SE0704588", Notes: "Created by API", RcoAccessGroup: "RCO Grupp 1" 
});

$.ajax({
    type: 'POST',
    url: 'https://api.cavvisit.com/api/Companies/CreateCompany',
    data: {customerKey: "123456789", customerId: "1", Company},
    dataType: 'json',
    success: function (data) {},
    error: function (data) {}
});


Parameters

string customerKey
The string representing the unique web key of the customer in the database.

int customerId
The int representing the unique ID of the customer in the database.

Company Company
A company object.

Return value

Type: List<Company>
A list containing one company.


UpdateCompany

Updates an existing company's information.

Syntax
JSON example


var Company = JSON.stringify({
    Id: "222", Description: "Company name", Address: "Regeringsgatan 23", City: "Stockholm", PostCode: "12732", Country: "SE", DefaultCheckOutMinutes: "32",
    Email: "info@api-cavvisit.com", Telephone: "08565656", MobilePhone: "070525252", VatNumber: "027329841", Notes: "Updated by API", RcoAccessGroup: "RCO Grupp 1" 
});

$.ajax({
    type: 'PUT',
    url: 'https://api.cavvisit.com/api/Companies/UpdateCompany',
    data: {customerKey: "123456789", customerId: "1", Company},
    dataType: 'json',
    success: function (data) {},
    error: function (data) {}
});


Parameters

string customerKey
The string representing the unique web key of the customer in the database.

int customerId
The int representing the unique ID of the customer in the database.

Company Company
A company object.

Return value

Type: List<Company>
A list containing one company.


DeleteCompany

Deletes a company.

Syntax
JSON example


$.ajax({
    type: 'DELETE',
    url: 'https://api.cavvisit.com/api/Companies/DeleteCompany',
    data: {customerKey: "123456789", customerId: "1", id: "21"},
    dataType: 'json',
    success: function (data) {},
    error: function (request, message, error) {}
});


Parameters

string customerKey
The string representing the unique web key of the customer in the database.

int customerId
The int representing the unique ID of the customer in the database.

int Id
The int representing the unique ID of the company in the database.




Hosts


GetHost

Retrieves a host.

Syntax
JSON example


$.ajax({
    type: 'GET',
    url: 'https://api.cavvisit.com/api/Hosts/GetHost',
    data: {customerKey: "123456789", customerId: "1", hostId: "12345"},
    dataType: 'json',
    success: function (data) {},
    error: function (data) {}
});


Parameters

string customerKey
The string representing the unique web key of the customer in the database.

int customerId
The int representing the unique ID of the customer in the database.

int hostId
The int representing the unique ID of the host in the database.

Return value

Type: List<Host>
A list containing one host.


GetHostByGuid

Retrieves a host.

Syntax
JSON example


$.ajax({
    type: 'GET',
    url: 'https://api.cavvisit.com/api/Hosts/GetHostByGuid',
    data: {customerKey: "123456789", customerId: "1", hostGuid: "12345"},
    dataType: 'json',
    success: function (data) {},
    error: function (data) {}
});


Parameters

string customerKey
The string representing the unique web key of the customer in the database.

int customerId
The int representing the unique ID of the customer in the database.

string hostGuid
The string representing the guid of the host in the database.

Return value

Type: List<Host>
A list containing one host.


GetHosts

Retrieves hosts that belongs to a company in CavVisit.

Syntax
JSON example


$.ajax({
    type: 'GET',
    url: 'https://api.cavvisit.com/api/Hosts/GetHosts',
    data: {customerKey: "123456789", customerId: "1", company: "220"},
    dataType: 'json',
    success: function (data) {},
    error: function (data) {}
});


Parameters

string customerKey
The string representing the unique web key of the customer in the database.

int customerId
The int representing the unique ID of the customer in the database.

int company
The int representing the unique ID of the company in the database.

Return value

Type: List<Host>
A list of hosts information.


CreateHost

Creates a host.

Syntax
JSON example


var Host = JSON.stringify({
    Active: "true", Name: "Chris", Surname: "Park", Personnumber: "860601", Address: "Regeringsgatan 34", PostCode: "12732",
    City: "Stockholm", Country: "SE", Email: "info@chris-park.gr", Phone: "2651026262", Mobile: "6948686565", Additional_Emails: "chris@park.se,chris-park@cavvisit-sa.com",
    Department: "IT Stockholm", CardNumber: "112256985", WebEnabled: "true", WebUsername: "chrispark", WebPassword: "peace-out123", CampTracAccount: "1256666", CompanyId: "222"
});

$.ajax({
    type: 'POST',
    url: 'https://api.cavvisit.com/api/Hosts/CreateHost',
    data: {customerKey: "123456789", customerId: "1", Host},
    dataType: 'json',
    success: function (data) {},
    error: function (data) {}
});


Parameters

string customerKey
The string representing the unique web key of the customer in the database.

int customerId
The int representing the unique ID of the customer in the database.

Host Host
A host object.

Return value

Type: List<Host>
A list containing one host.


UpdateHost

Updates an existing host's information.

Syntax
JSON example


var Host = JSON.stringify({Id: "1521",
    Active: "true", Name: "Chris", Surname: "Park", Personnumber: "850525", Address: "Regeringsgatan 20", PostCode: "127 33", City: "Stockholm", 
    Country: "SE", Email: "info@chris-park.gr", Phone: "0046855225511", Mobile: "00467025252516", Additional_Emails: "chris@park-api.se,christ-park2@parkapi.se",
    Department: "IT Stockholm", CardNumber: "112256985", WebEnabled: "true", WebUsername: "chrispark@parkapi.com", WebPassword: "peaceout123", CampTracAccount: "1256666", CompanyId: "222"
});

$.ajax({
    type: 'PUT',
    url: 'https://api.cavvisit.com/api/Hosts/UpdateHost',
    data: {customerKey: "123456789", customerId: "1", Host},
    dataType: 'json',
    success: function (data) {},
    error: function (data) {}
});


Parameters

string customerKey
The string representing the unique web key of the customer in the database.

int customerId
The int representing the unique ID of the customer in the database.

Host Host
A host object.

Return value

Type: List<Host>
A list containing one host.


DeleteHost

Deletes a host.

Syntax
JSON example


$.ajax({
    type: 'DELETE',
    url: 'https://api.cavvisit.com/api/Hosts/DeleteHost',
    data: {customerKey: "123456789", customerId: "1", hostId: "21"},
    dataType: 'json',
    success: function (data) {},
    error: function (request, message, error) {}
});


Parameters

string customerKey
The string representing the unique web key of the customer in the database.

int customerId
The int representing the unique ID of the customer in the database.

int Id
The int representing the unique ID of the host in the database.


ActivateHost

Activates an existing host.

Syntax
JSON example


$.ajax({
    type: 'PUT',
    url: 'https://api.cavvisit.com/api/Hosts/ActivateHost',
    data: {customerKey: "123456789", customerId: "1", hostId: "123"},
    dataType: 'json',
    success: function (data) {},
    error: function (data) {}
});


Parameters

string customerKey
The string representing the unique web key of the customer in the database.

int customerId
The int representing the unique ID of the customer in the database.

int hostId
The int representing the unique ID of the host in the database.


DeactivateHost

Deactivates an existing host.

Syntax
JSON example


$.ajax({
    type: 'PUT',
    url: 'https://api.cavvisit.com/api/Hosts/DeactivateHost',
    data: {customerKey: "123456789", customerId: "1", hostId: "123"},
    dataType: 'json',
    success: function (data) {},
    error: function (data) {}
});


Parameters

string customerKey
The string representing the unique web key of the customer in the database.

int customerId
The int representing the unique ID of the customer in the database.

int hostId
The int representing the unique ID of the host in the database.






Visit

A class representing the visit information.

Syntax


class Visit
{
      int Id  
      string VisitorName  
      string VisitorCompany  
      string HostName  
      string Telephone  
      string MobilePhone  
      string Email  
      string Notes  
      string Location  
      string CarPlate  
      string CardNumber  
      string Pincode  
      string GroupName  
      string Place  
      string Subject  
      string Organizer  
      string Field1  
      string Field2  
      string Field3  
      string Field4  
      string Field5  
      string Field6  
      string Field7  
      string Field8  
      string Field9  
      string Field10  
      bool Cfield1  
      bool Cfield2  
      bool Cfield3  
      bool Cfield4  
      bool Cfield5  
      bool Cfield6  
      bool Cfield7  
      bool Cfield8  
      bool Cfield9  
      bool Cfield10  
      bool Cfield11  
      bool Cfield12  
      bool Cfield13  
      bool Cfield14  
      bool Cfield15  
      int Host  
      DateTime DateVisit  
      DateTime DateValidTo  
      DateTime DateCheckedIn  
      DateTime DateCheckedOut  
      int Status  
      int CampTracId  
      string QrCode  
}


Company

A class representing the company information.

Syntax


class Company
{
    int Id  
    string Description  
    string VatNumber  
    DateTime RegistrationDate  
    string Address  
    string City  
    string PostCode  
    string Country  
    string Telephone  
    string MobilePhone  
    string Email  
    string Notes  
    string RcoAccessGroup  
    int DefaultCheckOutMinutes  
}


Host

A class representing the host information.

Syntax


class Host
{
    int Id
    bool Active
    string Name
    string Surname
    string Personnumber
    string Address
    string PostCode
    string City
    string Country
    string Phone
    string Mobile
    string Email
    string Additional_Emails
    string Department
    string CardNumber
    bool WebEnabled
    string WebUsername
    string WebPassword
    int CampTracAccount
    int CompanyId
    string EmployeeNo
    string EmployeeGuid
}