mirror of https://github.com/vernonkeenan/lib
291 lines
7.7 KiB
Markdown
291 lines
7.7 KiB
Markdown
# Crm.ContactsApi
|
|
|
|
All URIs are relative to *http://crm.vernonkeenan.com:8080/v1*
|
|
|
|
Method | HTTP request | Description
|
|
------------- | ------------- | -------------
|
|
[**deleteContact**](ContactsApi.md#deleteContact) | **DELETE** /contacts | Delete a Contact
|
|
[**getContacts**](ContactsApi.md#getContacts) | **GET** /contacts | Get a list of contacts
|
|
[**getContactsObservable**](ContactsApi.md#getContactsObservable) | **GET** /contacts/observable | Get Taxnexus Contacts in an observable array
|
|
[**postContacts**](ContactsApi.md#postContacts) | **POST** /contacts | Add new contacts
|
|
[**putContacts**](ContactsApi.md#putContacts) | **PUT** /contacts | Update Contact
|
|
|
|
|
|
|
|
## deleteContact
|
|
|
|
> DeleteResponse deleteContact(opts)
|
|
|
|
Delete a Contact
|
|
|
|
Delete Taxnexus Contact record
|
|
|
|
### Example
|
|
|
|
```javascript
|
|
import Crm from 'crm';
|
|
let defaultClient = Crm.ApiClient.instance;
|
|
// Configure API key authorization: ApiKeyAuth
|
|
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
|
|
ApiKeyAuth.apiKey = 'YOUR API KEY';
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//ApiKeyAuth.apiKeyPrefix = 'Token';
|
|
|
|
let apiInstance = new Crm.ContactsApi();
|
|
let opts = {
|
|
'contactId': "contactId_example" // String | Taxnexus Contact record ID
|
|
};
|
|
apiInstance.deleteContact(opts, (error, data, response) => {
|
|
if (error) {
|
|
console.error(error);
|
|
} else {
|
|
console.log('API called successfully. Returned data: ' + data);
|
|
}
|
|
});
|
|
```
|
|
|
|
### Parameters
|
|
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**contactId** | **String**| Taxnexus Contact record ID | [optional]
|
|
|
|
### Return type
|
|
|
|
[**DeleteResponse**](DeleteResponse.md)
|
|
|
|
### Authorization
|
|
|
|
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: Not defined
|
|
- **Accept**: application/json
|
|
|
|
|
|
## getContacts
|
|
|
|
> ContactResponse getContacts(opts)
|
|
|
|
Get a list of contacts
|
|
|
|
Return a list of all available Contacts
|
|
|
|
### Example
|
|
|
|
```javascript
|
|
import Crm from 'crm';
|
|
let defaultClient = Crm.ApiClient.instance;
|
|
// Configure API key authorization: ApiKeyAuth
|
|
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
|
|
ApiKeyAuth.apiKey = 'YOUR API KEY';
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//ApiKeyAuth.apiKeyPrefix = 'Token';
|
|
|
|
let apiInstance = new Crm.ContactsApi();
|
|
let opts = {
|
|
'limit': 789, // Number | How many objects to return at one time
|
|
'offset': 789, // Number | How many objects to skip?
|
|
'contactId': "contactId_example", // String | Taxnexus Contact record ID
|
|
'active': true, // Boolean | Only retrieve active records?
|
|
'email': "email_example", // String | Email address used for identity lookup
|
|
'name': "name_example" // String | The Name of this Object
|
|
};
|
|
apiInstance.getContacts(opts, (error, data, response) => {
|
|
if (error) {
|
|
console.error(error);
|
|
} else {
|
|
console.log('API called successfully. Returned data: ' + data);
|
|
}
|
|
});
|
|
```
|
|
|
|
### Parameters
|
|
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**limit** | **Number**| How many objects to return at one time | [optional]
|
|
**offset** | **Number**| How many objects to skip? | [optional]
|
|
**contactId** | **String**| Taxnexus Contact record ID | [optional]
|
|
**active** | **Boolean**| Only retrieve active records? | [optional]
|
|
**email** | **String**| Email address used for identity lookup | [optional]
|
|
**name** | **String**| The Name of this Object | [optional]
|
|
|
|
### Return type
|
|
|
|
[**ContactResponse**](ContactResponse.md)
|
|
|
|
### Authorization
|
|
|
|
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: Not defined
|
|
- **Accept**: application/json
|
|
|
|
|
|
## getContactsObservable
|
|
|
|
> [Contact] getContactsObservable(opts)
|
|
|
|
Get Taxnexus Contacts in an observable array
|
|
|
|
A list of contacts in a simple JSON array
|
|
|
|
### Example
|
|
|
|
```javascript
|
|
import Crm from 'crm';
|
|
let defaultClient = Crm.ApiClient.instance;
|
|
// Configure API key authorization: ApiKeyAuth
|
|
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
|
|
ApiKeyAuth.apiKey = 'YOUR API KEY';
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//ApiKeyAuth.apiKeyPrefix = 'Token';
|
|
|
|
let apiInstance = new Crm.ContactsApi();
|
|
let opts = {
|
|
'contactId': "contactId_example", // String | Taxnexus Contact record ID
|
|
'active': true, // Boolean | Only retrieve active records?
|
|
'email': "email_example", // String | Email address used for identity lookup
|
|
'name': "name_example" // String | The Name of this Object
|
|
};
|
|
apiInstance.getContactsObservable(opts, (error, data, response) => {
|
|
if (error) {
|
|
console.error(error);
|
|
} else {
|
|
console.log('API called successfully. Returned data: ' + data);
|
|
}
|
|
});
|
|
```
|
|
|
|
### Parameters
|
|
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**contactId** | **String**| Taxnexus Contact record ID | [optional]
|
|
**active** | **Boolean**| Only retrieve active records? | [optional]
|
|
**email** | **String**| Email address used for identity lookup | [optional]
|
|
**name** | **String**| The Name of this Object | [optional]
|
|
|
|
### Return type
|
|
|
|
[**[Contact]**](Contact.md)
|
|
|
|
### Authorization
|
|
|
|
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: Not defined
|
|
- **Accept**: application/json
|
|
|
|
|
|
## postContacts
|
|
|
|
> ContactResponse postContacts(contactsRequest)
|
|
|
|
Add new contacts
|
|
|
|
Contact record to be added
|
|
|
|
### Example
|
|
|
|
```javascript
|
|
import Crm from 'crm';
|
|
let defaultClient = Crm.ApiClient.instance;
|
|
// Configure API key authorization: ApiKeyAuth
|
|
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
|
|
ApiKeyAuth.apiKey = 'YOUR API KEY';
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//ApiKeyAuth.apiKeyPrefix = 'Token';
|
|
|
|
let apiInstance = new Crm.ContactsApi();
|
|
let contactsRequest = new Crm.ContactRequest(); // ContactRequest | An array of new Contact records
|
|
apiInstance.postContacts(contactsRequest, (error, data, response) => {
|
|
if (error) {
|
|
console.error(error);
|
|
} else {
|
|
console.log('API called successfully. Returned data: ' + data);
|
|
}
|
|
});
|
|
```
|
|
|
|
### Parameters
|
|
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**contactsRequest** | [**ContactRequest**](ContactRequest.md)| An array of new Contact records |
|
|
|
|
### Return type
|
|
|
|
[**ContactResponse**](ContactResponse.md)
|
|
|
|
### Authorization
|
|
|
|
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json
|
|
- **Accept**: application/json
|
|
|
|
|
|
## putContacts
|
|
|
|
> ContactResponse putContacts(contactsRequest)
|
|
|
|
Update Contact
|
|
|
|
Update Contact records
|
|
|
|
### Example
|
|
|
|
```javascript
|
|
import Crm from 'crm';
|
|
let defaultClient = Crm.ApiClient.instance;
|
|
// Configure API key authorization: ApiKeyAuth
|
|
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
|
|
ApiKeyAuth.apiKey = 'YOUR API KEY';
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//ApiKeyAuth.apiKeyPrefix = 'Token';
|
|
|
|
let apiInstance = new Crm.ContactsApi();
|
|
let contactsRequest = new Crm.ContactRequest(); // ContactRequest | An array of new Contact records
|
|
apiInstance.putContacts(contactsRequest, (error, data, response) => {
|
|
if (error) {
|
|
console.error(error);
|
|
} else {
|
|
console.log('API called successfully. Returned data: ' + data);
|
|
}
|
|
});
|
|
```
|
|
|
|
### Parameters
|
|
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**contactsRequest** | [**ContactRequest**](ContactRequest.md)| An array of new Contact records |
|
|
|
|
### Return type
|
|
|
|
[**ContactResponse**](ContactResponse.md)
|
|
|
|
### Authorization
|
|
|
|
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json
|
|
- **Accept**: application/json
|
|
|