mirror of https://github.com/vernonkeenan/lib
113 lines
2.7 KiB
Markdown
113 lines
2.7 KiB
Markdown
# Board.LeadsApi
|
|
|
|
All URIs are relative to *http://board.vernonkeenan.com:8080/v1*
|
|
|
|
Method | HTTP request | Description
|
|
------------- | ------------- | -------------
|
|
[**postLeads**](LeadsApi.md#postLeads) | **POST** /leads | Add a new Lead record
|
|
[**putLeads**](LeadsApi.md#putLeads) | **PUT** /leads | Update Leads
|
|
|
|
|
|
|
|
## postLeads
|
|
|
|
> RuleExecution postLeads(leadRequest)
|
|
|
|
Add a new Lead record
|
|
|
|
Add a new full Lead Record
|
|
|
|
### Example
|
|
|
|
```javascript
|
|
import Board from 'board';
|
|
let defaultClient = Board.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 Board.LeadsApi();
|
|
let leadRequest = new Board.Lead(); // Lead | A new Lead record as a single JSON object
|
|
apiInstance.postLeads(leadRequest, (error, data, response) => {
|
|
if (error) {
|
|
console.error(error);
|
|
} else {
|
|
console.log('API called successfully. Returned data: ' + data);
|
|
}
|
|
});
|
|
```
|
|
|
|
### Parameters
|
|
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**leadRequest** | [**Lead**](Lead.md)| A new Lead record as a single JSON object |
|
|
|
|
### Return type
|
|
|
|
[**RuleExecution**](RuleExecution.md)
|
|
|
|
### Authorization
|
|
|
|
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json
|
|
- **Accept**: application/json
|
|
|
|
|
|
## putLeads
|
|
|
|
> RuleExecution putLeads(leadRequest)
|
|
|
|
Update Leads
|
|
|
|
Update Lead records
|
|
|
|
### Example
|
|
|
|
```javascript
|
|
import Board from 'board';
|
|
let defaultClient = Board.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 Board.LeadsApi();
|
|
let leadRequest = new Board.Lead(); // Lead | A new Lead record as a single JSON object
|
|
apiInstance.putLeads(leadRequest, (error, data, response) => {
|
|
if (error) {
|
|
console.error(error);
|
|
} else {
|
|
console.log('API called successfully. Returned data: ' + data);
|
|
}
|
|
});
|
|
```
|
|
|
|
### Parameters
|
|
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**leadRequest** | [**Lead**](Lead.md)| A new Lead record as a single JSON object |
|
|
|
|
### Return type
|
|
|
|
[**RuleExecution**](RuleExecution.md)
|
|
|
|
### Authorization
|
|
|
|
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: Not defined
|
|
- **Accept**: application/json
|
|
|