Back to documentation

Release notes version1.4.2 version1.4.2

Accounts


new CreateSmsKey    New in 1.4.2

Creates an SMS key.

Syntax
JSON example

  
var smsDetails =
{
    AccountId: "3899512",
    AccessRights: "225,234",
    ValidFrom: "2021/07/11",
    ValidTo: "2021/09/25",
    TimeFrom: "14:50",
    TimeTo: "14:50",
    Mobile_Phone: "+23466565634344"
};

var smsdetails = JSON.stringify(smsDetails);

$.ajax({
    type: 'POST',
    url: 'https://api.camptrac.com/api/Accounts/CreateSmsKey',
    data: {customerKey: "12346656789", customerId: 1, SmsDetails: smsdetails},
    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.

SmsDetails SmsDetails
An SmsDetails object.

Return value

Type: Object<SmsKey>
An object of SmsKey information.


 

new CreateQRKey    New in 1.4.2

Creates an QR key.

Syntax
JSON example


var qrDetails =
{
    AccountId: "2919271",
    Name: "QrKey_NM",
    Surname: "QrKey_SNM",
    AccessRights: "295",
    ValidFrom: "2021/06/11",
    ValidTo: "2021/06/29",
    TimeFrom: "14:50",
    TimeTo: "14:50",
    Mobile_Phone: "+46712345678",
    Email: "test@test.com"
};

var qrdetails = JSON.stringify(qrDetails);

$.ajax({
    type: 'POST',
    url: 'https://api.camptrac.com/api/Accounts/CreateQrKey',
    data: {customerKey: "12346656789", customerId: 1, QrDetails: qrdetails},
    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.

QrDetails QrDetails
An QrDetails object.

Return value

Type: Object<QRKey>
An object of QRKey information.


 

new CreatePincode    New in 1.4.2

Creates a CreatePincode.

Syntax
JSON example


var pincodeDetails =
{
    AccountId: "38995",
    AccessRights: "225,234",
    ValidFrom: "2021/03/11",
    ValidTo: "2021/06/29",
    TimeFrom: "14:50",
    TimeTo: "14:50",
    Pincode: "7246"
 };

var pincodedetails = JSON.stringify(pincodeDetails);

$.ajax({
    type: 'POST',
    url: 'https://api.camptrac.com/api/Accounts/CreatePincode',
    data: {customerKey: "12346656789", customerId: 1, PincodeDetails: pincodedetails},
    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.

PincodeDetails PincodeDetails
A PincodeDetails object.

Return value

Type: Object<CreatedPincode>
An object of CreatedPincode information.

SmsDetails

A class representing the SmsDetails information.

Syntax


class SmsDetails
{
    string AccountId
    string AccessRights (Access right id comma separated)
    string ValidFrom (Desire valid from date, should not lower than account valid from date)
    string ValidTo (Desire valid to date, should not greater than account valid to date)
    string TimeFrom (Desire valid to time, should not greater than account valid to time)
    string TimeTo
    string Mobile_Phone (Mobile number to send the created key)
}

QrDetails

A class representing the QrDetails information.

Syntax


class QrDetails
{
    string AccountId
    string Name (Optional, should use the account name if its null or empty)
    string Surname (Optional, should use the account surname if its null or empty)
    string AccessRights (Access right id comma separated)
    string ValidFrom (Desire valid from date, should not lower than booking valid from date)
    string ValidTo (Desire valid to date, should not greater than booking valid to date)
    string TimeFrom (Desire valid from time, should not greater than account valid to time)
    string TimeTo (Desire valid to time, should not greater than account valid to time)
    string Mobile_Phone (Mobile number to send the created key)
    string Email (Email to send the created key)
}

PincodeDetails

A class representing the PincodeDetails information.

Syntax


class PincodeDetails
{
    string AccountId
    string AccessRights (Access right id comma separated)
    string ValidFrom (Desire valid from date, should not lower than booking valid from date)
    string ValidTo (Desire valid to date, should not greater than booking valid to date)
    string TimeFrom (Desire valid from time, should not greater than account valid to time)
    string TimeTo (Desire valid to time, should not greater than account valid to time)
    string Pincode (Optional)	(Desire 4 digit pincode, no input meaning generate unique pincode)
    string Email (Email to send the created key)
}

SmsKey

A class representing the SmsKey information.

Syntax


class SmsKey
{
    string SmsKeyUrl
    bool CreationResult
}

QRKey

A class representing the QRKey information.

Syntax


class QRKey
{
    string QRKeyUrl
    bool CreationResult
}

CreatedPincode

A class representing the CreatedPincode information.

Syntax


class CreatedPincode
{
    bool CreationResult
    string Pincode
    string Message
    string AccountId
}