All URIs are relative to https://api.saasgrids.com/apis/crms/
Method | HTTP request | Description |
---|---|---|
createAppointment | POST /{userId}/appointments | Creates a new appointment |
deleteAppointmentsById | DELETE /{userId}/appointments/{appointmentId} | Delete appointments by Id |
getAllAppointments | GET /{userId}/appointments | Get all appointments |
getAppointmentById | GET /{userId}/appointments/{appointmentId} | Get appointment by Id |
updateAppointmentById | PUT /{userId}/appointments/{appointmentId} | Update appointment by Id |
createAppointment(userId, body)
Creates a new appointment
var crms = require('saasgrids');
var defaultClient = crms.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new crms.AppointmentsApi();
var userId = "userId_example"; // String | User instance id returned from saasgrids after authorization
var body = new crms.Appointment(); // Appointment | Appointments object that needs to be created
apiInstance.createAppointment(userId, body).then(function() {
console.log('API called successfully.');
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
userId | String | User instance id returned from saasgrids after authorization | |
body | Appointment | Appointments object that needs to be created |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
deleteAppointmentsById(userId)
Delete appointments by Id
var crms = require('saasgrids');
var defaultClient = crms.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new crms.AppointmentsApi();
var userId = "userId_example"; // String | User instance id returned from saasgrids after authorization
apiInstance.deleteAppointmentsById(userId).then(function() {
console.log('API called successfully.');
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
userId | String | User instance id returned from saasgrids after authorization |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
[Appointment] getAllAppointments(userId, email)
Get all appointments
var crms = require('saasgrids');
var defaultClient = crms.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new crms.AppointmentsApi();
var userId = "userId_example"; // String | User instance id returned from saasgrids after authorization
var email = "email_example"; // String | Email id related to appointment
apiInstance.getAllAppointments(userId, email).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
userId | String | User instance id returned from saasgrids after authorization | |
String | Email id related to appointment |
- Content-Type: application/json
- Accept: application/json
Appointment getAppointmentById(userId, appointmentId)
Get appointment by Id
var crms = require('saasgrids');
var defaultClient = crms.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new crms.AppointmentsApi();
var userId = "userId_example"; // String | User instance id returned from saasgrids after authorization
var appointmentId = "appointmentId_example"; // String | ObjectId of appointment
apiInstance.getAppointmentById(userId, appointmentId).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
userId | String | User instance id returned from saasgrids after authorization | |
appointmentId | String | ObjectId of appointment |
- Content-Type: application/json
- Accept: application/json
updateAppointmentById(userId, body)
Update appointment by Id
var crms = require('saasgrids');
var defaultClient = crms.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new crms.AppointmentsApi();
var userId = "userId_example"; // String | User instance id returned from saasgrids after authorization
var body = new crms.Appointment(); // Appointment | Appointment object that needs to be updated
apiInstance.updateAppointmentById(userId, body).then(function() {
console.log('API called successfully.');
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
userId | String | User instance id returned from saasgrids after authorization | |
body | Appointment | Appointment object that needs to be updated |
null (empty response body)
- Content-Type: application/json
- Accept: application/json