infusionsoft-nodejs
Version:
A NodeJS SDK automatically generated from Infusionsoft API Swagger definitions.
402 lines (270 loc) • 11 kB
Markdown
All URIs are relative to *https://api.infusionsoft.com/crm/rest/v1*
Method | HTTP request | Description
------------- | ------------- | -------------
[**appointmentsUsingGET**](AppointmentApi.md
[**createAppointmentUsingPOST**](AppointmentApi.md
[**loadAppointmentUsingGET**](AppointmentApi.md
[**removeAppointmentUsingDELETE**](AppointmentApi.md
[**replaceAppointmentUsingPUT**](AppointmentApi.md
[**searchUsingGET**](AppointmentApi.md
[**syncUsingGET**](AppointmentApi.md
[**updateAppointmentUsingPATCH**](AppointmentApi.md
<a name="appointmentsUsingGET"></a>
> AppointmentList appointmentsUsingGET(opts)
List Appointments
Retrieves all appointments for the authenticated user
### Example
```javascript
import InfusionsoftRestApi from 'infusionsoft_rest_api';
let apiInstance = new InfusionsoftRestApi.AppointmentApi();
let opts = {
'since': "since_example", // String | Date to start searching from ex. `2017-01-01T22:17:59.039Z`
'until': "until_example", // String | Date to search to ex. `2017-01-01T22:17:59.039Z`
'limit': 56, // Number | Sets a total of items to return
'offset': 56 // Number | Sets a beginning range of items to return
};
apiInstance.appointmentsUsingGET(opts, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
```
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**since** | **String**| Date to start searching from ex. &
**until** | **String**| Date to search to ex. &
**limit** | **Number**| Sets a total of items to return | [optional]
**offset** | **Number**| Sets a beginning range of items to return | [optional]
[**AppointmentList**](AppointmentList.md)
No authorization required
- **Content-Type**: application/json
- **Accept**: application/json
<a name="createAppointmentUsingPOST"></a>
> Appointment createAppointmentUsingPOST(appointment)
Create an Appointment
Creates a new appointment as the authenticated user
### Example
```javascript
import InfusionsoftRestApi from 'infusionsoft_rest_api';
let apiInstance = new InfusionsoftRestApi.AppointmentApi();
let appointment = new InfusionsoftRestApi.Appointment(); // Appointment | appointment
apiInstance.createAppointmentUsingPOST(appointment, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
```
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**appointment** | [**Appointment**](Appointment.md)| appointment |
[**Appointment**](Appointment.md)
No authorization required
- **Content-Type**: application/json
- **Accept**: application/json
<a name="loadAppointmentUsingGET"></a>
> Appointment loadAppointmentUsingGET(appointmentId)
Retrieve an Appointment
Retrieves a specific appointment belonging to the authenticated user
### Example
```javascript
import InfusionsoftRestApi from 'infusionsoft_rest_api';
let apiInstance = new InfusionsoftRestApi.AppointmentApi();
let appointmentId = "appointmentId_example"; // String | appointmentId
apiInstance.loadAppointmentUsingGET(appointmentId, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
```
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**appointmentId** | **String**| appointmentId |
[**Appointment**](Appointment.md)
No authorization required
- **Content-Type**: application/json
- **Accept**: application/json
<a name="removeAppointmentUsingDELETE"></a>
> removeAppointmentUsingDELETE(appointmentId)
Delete an Appointment
Deletes the specified appointment
```javascript
import InfusionsoftRestApi from 'infusionsoft_rest_api';
let apiInstance = new InfusionsoftRestApi.AppointmentApi();
let appointmentId = "appointmentId_example"; // String | appointmentId
apiInstance.removeAppointmentUsingDELETE(appointmentId, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
});
```
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**appointmentId** | **String**| appointmentId |
null (empty response body)
No authorization required
- **Content-Type**: application/json
- **Accept**: application/json
<a name="replaceAppointmentUsingPUT"></a>
> Appointment replaceAppointmentUsingPUT(appointmentId, appointment)
Replace an Appointment
Replaces all values of a given appointment
### Example
```javascript
import InfusionsoftRestApi from 'infusionsoft_rest_api';
let apiInstance = new InfusionsoftRestApi.AppointmentApi();
let appointmentId = "appointmentId_example"; // String | appointmentId
let appointment = new InfusionsoftRestApi.Appointment(); // Appointment | appointment
apiInstance.replaceAppointmentUsingPUT(appointmentId, appointment, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
```
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**appointmentId** | **String**| appointmentId |
**appointment** | [**Appointment**](Appointment.md)| appointment |
[**Appointment**](Appointment.md)
No authorization required
- **Content-Type**: application/json
- **Accept**: application/json
<a name="searchUsingGET"></a>
> AppointmentList searchUsingGET(opts)
Search Appointments
Retrieves all appointments belonging to the authenticated user for the specified date range
### Example
```javascript
import InfusionsoftRestApi from 'infusionsoft_rest_api';
let apiInstance = new InfusionsoftRestApi.AppointmentApi();
let opts = {
'since': "since_example", // String | Date to start searching from ex. `2017-01-01T22:17:59.039Z`
'until': "until_example", // String | Date to search to ex. `2017-01-01T22:17:59.039Z`
'limit': 56, // Number | Sets a total of items to return
'offset': 56 // Number | Sets a beginning range of items to return
};
apiInstance.searchUsingGET(opts, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
```
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**since** | **String**| Date to start searching from ex. &
**until** | **String**| Date to search to ex. &
**limit** | **Number**| Sets a total of items to return | [optional]
**offset** | **Number**| Sets a beginning range of items to return | [optional]
[**AppointmentList**](AppointmentList.md)
No authorization required
- **Content-Type**: application/json
- **Accept**: application/json
<a name="syncUsingGET"></a>
> AppointmentStatusList syncUsingGET(opts)
Retrieve Synced Appointments
The Sync endpoint returns a set of appointments that have been updated or created since the last result set was retrieved, minus any appointments that have been deleted
### Example
```javascript
import InfusionsoftRestApi from 'infusionsoft_rest_api';
let apiInstance = new InfusionsoftRestApi.AppointmentApi();
let opts = {
'syncToken': "syncToken_example", // String | sync_token
'limit': 56, // Number | Sets a total of items to return
'offset': 56 // Number | Sets a beginning range of items to return
};
apiInstance.syncUsingGET(opts, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
```
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**syncToken** | **String**| sync_token | [optional]
**limit** | **Number**| Sets a total of items to return | [optional]
**offset** | **Number**| Sets a beginning range of items to return | [optional]
[**AppointmentStatusList**](AppointmentStatusList.md)
No authorization required
- **Content-Type**: application/json
- **Accept**: application/json
<a name="updateAppointmentUsingPATCH"></a>
> Appointment updateAppointmentUsingPATCH(appointmentId, appointment)
Update an Appointment
Updates the provided values of a given appointment
### Example
```javascript
import InfusionsoftRestApi from 'infusionsoft_rest_api';
let apiInstance = new InfusionsoftRestApi.AppointmentApi();
let appointmentId = "appointmentId_example"; // String | appointmentId
let appointment = new InfusionsoftRestApi.Appointment(); // Appointment | appointment
apiInstance.updateAppointmentUsingPATCH(appointmentId, appointment, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
```
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**appointmentId** | **String**| appointmentId |
**appointment** | [**Appointment**](Appointment.md)| appointment |
[**Appointment**](Appointment.md)
No authorization required
- **Content-Type**: application/json
- **Accept**: application/json