Back to documentation

Release notes version 1.1 version1.1

Visits


new parameter CreateVisit    New in 1.1

Creates a new visit.

Syntax
JSON example

Note: New parameter [Combined] added.


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.


 


Visits


new parameter UpdateVisit    New in 1.1

Updates an existing visit.

Syntax
JSON example

Note: New parameter [Combined] added.


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.