Find the release notes for version 1.2 here.
Find the release notes for version 1.1 here.
Introduction to CavVisit WEB API integration.
NOTE! If you want to integrate with CavVisit RESTFul API you will need the following (free of charge).
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.
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.
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.
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.
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.
Retrieves a visit.
Syntax
JSON example
$.ajax({
type: 'GET',
url: 'https://api.cavvisit.com/api/Visits/GetVisitById',
data: { customerKey: "123456789", customerId: "1", id:"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.
int id
The int representing the unique ID of the visit in the database.
Return value
Type: List<Visit>
A list of visits information.
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.
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.
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", Combined:"combined B"
});
$.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.
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", Combined:"combined B"
});
$.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.
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.
Creates a group visit.
Syntax
JSON example
var visitors = [{ VisitorName: "Person 1", VisitorCompany: "VCompany 1", MobilePhone: "000001", Email: "001@001.se", Field1: "field 1 p1", Field2: "field 2 p1" },
{ VisitorName: "Person 2", VisitorCompany: "VCompany 2", MobilePhone: "000002", Email: "002@002.se", Field1: "field 1 p2", Field2: "field 2 p2" },
{ VisitorName: "Person 3", VisitorCompany: "VCompany 3", MobilePhone: "000003", Email: "003@003.se", Field1: "field 1 p3", Field2: "field 2 p3" }
];
var GroupVisit = JSON.stringify({
Host: "1", Notes: "Group API Notes", Location: "Group location", GroupName: "Group name Hello",
Place: "Stockholm", Subject: "My subject test API", Organizer: "Organizer API",
DateVisit: "2023-05-25T05:15:00Z", DateValidTo: "2023-05-25 22:00", Visitors: visitors
});
$.ajax({
type: 'POST',
url: 'https://api.cavvisit.com/api/Visits/CreateGroupVisit',
data: {customerKey: "1234567891", customerId: "1", GroupVisit},
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.
GroupVisit GroupVisit
A GroupVisit object.
Return value
Type: string
The GroupId of the created group.
Updates a group visit.
Syntax
JSON example
var GroupVisitInfo = JSON.stringify({
GroupId:"1E4F3283-8309-4FD4-BG69-73448F8C5C4E"
Host: "1", Notes: "Group API Notes", Location: "Group location", GroupName: "Group name Hello",
Place: "Stockholm", Subject: "My subject test API", Organizer: "Organizer API",
DateVisit: "2023-05-25T05:15:00Z", DateValidTo: "2023-05-25 22:00"
});
$.ajax({
type: 'PUT',
url: 'https://api.cavvisit.com/api/Visits/UpdateGroupVisit',
data: {customerKey: "1234567891", customerId: "1", GroupVisitInfo},
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.
GroupVisitInfo GroupVisitInfo
A groupvisitinfo object.
Return value
Type: string
Deletes a group visit.
Syntax
JSON example
$.ajax({
type: 'DELETE',
url: 'https://api.cavvisit.com/api/Visits/DeleteGroupVisit',
data: {customerKey: "123456789", customerId: "1", groupId: "9E4F3383-8409-4FD4-BE69-73478F8C6C4A"},
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 groupId
The string representing the Group ID of the group visit in the database.
Adds a visit to a group visit.
Syntax
JSON example
var Visitor = JSON.stringify({
GroupId: "98B371AE-9EC1-4243-B6D5-358F658CFA29", VisitorName: "API person3", VisitorCompany: "API Company", MobilePhone: "070752566",
Email: "email@api.se", Field1: "API Field1", Field2: "API Field2",
Cfield1: "True" });
$.ajax({
type: 'POST',
url: 'https://api.cavvisit.com/api/Visits/AddVisitToGroup',
data: {customerKey: "123456789", customerId: "1", Visitor},
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.
Visitor Visitor
A visitor object.
Updates a visit in a group visit.
Syntax
JSON example
var Visitor = JSON.stringify({
GroupId: "98B371AE-9EC1-4243-B6D5-358F658CFA29", VisitorName: "API person3", VisitorCompany: "API Company", MobilePhone: "070752566",
Email: "email@api.se", Field1: "API Field1", Field2: "API Field2",
Cfield1: "True" });
$.ajax({
type: 'PUT',
url: 'https://api.cavvisit.com/api/Visits/UpdateVisitInGroup',
data: {customerKey: "123456789", customerId: "1", Visitor},
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.
Visitor Visitor
A visitor object.
Return value
Type: string
Deletes a visit from a group visit.
Syntax
JSON example
$.ajax({
type: 'DELETE',
url: 'https://api.cavvisit.com/api/Visits/DeleteVisitFromGroup',
data: {customerKey: "123456789", customerId: "1", id: "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.
int id
The int representing the unique ID of the visit in the database.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
A class representing the visit information.
Syntax
class Visit
{
int Id
string VisitorName (100 characters length)
string VisitorCompany (100 characters length)
string HostName
string Telephone (20 characters length)
string MobilePhone (20 characters length)
string Email (254 characters length)
string Notes
string Location (50 characters length)
string CarPlate (20 characters length)
string CardNumber (30 characters length)
string Pincode (10 characters length)
string GroupName (50 characters length)
string Place (100 characters length)
string Subject (100 characters length)
string Organizer (100 characters length)
string Field1 (50 characters length)
string Field2 (50 characters length)
string Field3 (50 characters length)
string Field4 (50 characters length)
string Field5 (50 characters length)
string Field6 (50 characters length)
string Field7 (50 characters length)
string Field8 (50 characters length)
string Field9 (50 characters length)
string Field10 (50 characters length)
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
string Combined (50 characters length) [New in v1.1]
}
A class representing the group visit information.
Syntax
class GroupVisit
{
string GroupId
int Host
string HostName (read only)
DateTime DateVisit
DateTime DateValidTo
string Notes
string Location (50 characters length)
string GroupName (50 characters length)
string Subject (100 characters length)
string Organizer (100 characters length)
List Visitors
}
A class representing the GroupVisitInfo information.
Syntax
class GroupVisitInfo
{
string GroupId
int Host
string HostName (read only)
DateTime DateVisit
DateTime DateValidTo
string Notes
string Location
string GroupName
string Place
string Subject
string Organizer
}
A class representing the visitor information.
Syntax
class Visitor
{
int Id
string GroupId
string VisitorName (100 characters length)
string VisitorCompany (100 characters length)
string MobilePhone (20 characters length)
string Email (254 characters length)
string Field1 (50 characters length)
string Field2 (50 characters length)
string Field3 (50 characters length)
string Field4 (50 characters length)
string Field5 (50 characters length)
string Field6 (50 characters length)
string Field7 (50 characters length)
string Field8 (50 characters length)
string Field9 (50 characters length)
string Field10 (50 characters length)
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 Cfield5
string QrCode
}
A class representing the company information.
Syntax
class Company
{
int Id
string Description (50 characters length)
string VatNumber (20 characters length)
DateTime RegistrationDate
string Address (50 characters length)
string City (50 characters length)
string PostCode (10 characters length)
string Country (2 characters length)
string Telephone (50 characters length)
string MobilePhone (50 characters length)
string Email (254 characters length)
string Notes
string RcoAccessGroup (40 characters length)
int DefaultCheckOutMinutes
}
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
}