Back to documentation

Release notes version1.4 version1.4

Commands


new SendPulseToOpenDoorWithAnswer    New in 1.4

Sends an open-door-pulse command and getting answer if door was opened or not.

Syntax
JSON example


$.ajax({
    type: 'POST',
    url: 'https://api.camptrac.com/api/Commands/SendPulseToOpenDoor',
    data: {customerKey: "123456789", customerId: "1", terminalId: "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 terminalId
The int representing the unique terminal-ID of the terminal in the database.

Return value

Type: List<Commands>
A list of commands information.



Accounts


new GetAllActiveAccounts    New in 1.4

Retrieves active accounts that exists in CampTrac.

Syntax
JSON example


$.ajax({
    type: 'GET',
    url: 'https://api.camptrac.com/api/Accounts/GetAllActiveAccounts',
    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<Accounts>
A list of accounts information.


 

new GetHostAccounts    New in 1.4

Retrieves host accounts that exists in CampTrac.

Syntax
JSON example


$.ajax({
    type: 'GET',
    url: 'https://api.camptrac.com/api/Accounts/GetHostAccounts',
    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<Accounts>
A list of accounts information.


 

new AddMoney    New in 1.4

Adds money to an account

Syntax
JSON example


    $.ajax({
    type: 'POST',
    url: 'https://api.camptrac.com/api/Accounts/AddMoney',
    data: {customerKey: "12346656789", customerId: 1, accountId: 12345, AddAmount: 125},
    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 accountId
The int representing the unique ID of the account in the database.

decimal AddAmount
The amount to be added to the account.


 

new RemoveMoney    New in 1.4

Removes money from an account

Syntax
JSON example


    $.ajax({
    type: 'POST',
    url: 'https://api.camptrac.com/api/Accounts/RemoveMoney',
    data: {customerKey: "12346656789", customerId: 1, accountId: 12345, RemoveAmount: 125},
    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 accountId
The int representing the unique ID of the account in the database.

decimal AddAmount
The amount to be removed from the account.




Commands

A class representing the commands information.

Syntax


class Commands
{
    int CommandId
    string Description
}