mirror of https://github.com/vernonkeenan/lib
127 lines
3.6 KiB
Markdown
127 lines
3.6 KiB
Markdown
# SfGate.ContactsApi
|
|
|
|
All URIs are relative to *http://sf-gate.vernonkeenan.com:8080/v1*
|
|
|
|
Method | HTTP request | Description
|
|
------------- | ------------- | -------------
|
|
[**getContacts**](ContactsApi.md#getContacts) | **GET** /contacts | Get a Contact record
|
|
[**postContacts**](ContactsApi.md#postContacts) | **POST** /contacts | Add a new Contacts to Taxnexus
|
|
|
|
|
|
|
|
## getContacts
|
|
|
|
> ContactResponse getContacts(opts)
|
|
|
|
Get a Contact record
|
|
|
|
Retrieve Contact records from the datastore
|
|
|
|
### Example
|
|
|
|
```javascript
|
|
import SfGate from 'sf_gate';
|
|
let defaultClient = SfGate.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 SfGate.ContactsApi();
|
|
let opts = {
|
|
'contactId': "contactId_example", // String | Taxnexus Record Id of a Contact
|
|
'limit': 789, // Number | How many objects to return at one time
|
|
'name': "name_example", // String | The Name of this Object
|
|
'offset': 789, // Number | How many objects to skip?
|
|
'active': true, // Boolean | Only retrieve active records?
|
|
'accountId': "accountId_example", // String | Taxnexus Record Id of an Account
|
|
'email': "email_example" // String | Email address used for identity lookup
|
|
};
|
|
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
|
|
------------- | ------------- | ------------- | -------------
|
|
**contactId** | **String**| Taxnexus Record Id of a Contact | [optional]
|
|
**limit** | **Number**| How many objects to return at one time | [optional]
|
|
**name** | **String**| The Name of this Object | [optional]
|
|
**offset** | **Number**| How many objects to skip? | [optional]
|
|
**active** | **Boolean**| Only retrieve active records? | [optional]
|
|
**accountId** | **String**| Taxnexus Record Id of an Account | [optional]
|
|
**email** | **String**| Email address used for identity lookup | [optional]
|
|
|
|
### Return type
|
|
|
|
[**ContactResponse**](ContactResponse.md)
|
|
|
|
### Authorization
|
|
|
|
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: Not defined
|
|
- **Accept**: application/json
|
|
|
|
|
|
## postContacts
|
|
|
|
> ContactResponse postContacts(contactRequest)
|
|
|
|
Add a new Contacts to Taxnexus
|
|
|
|
Contacts record to be added
|
|
|
|
### Example
|
|
|
|
```javascript
|
|
import SfGate from 'sf_gate';
|
|
let defaultClient = SfGate.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 SfGate.ContactsApi();
|
|
let contactRequest = new SfGate.ContactRequest(); // ContactRequest | An array of new Contact records
|
|
apiInstance.postContacts(contactRequest, (error, data, response) => {
|
|
if (error) {
|
|
console.error(error);
|
|
} else {
|
|
console.log('API called successfully. Returned data: ' + data);
|
|
}
|
|
});
|
|
```
|
|
|
|
### Parameters
|
|
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**contactRequest** | [**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
|
|
|