infusionsoft-nodejs
Version:
A NodeJS SDK automatically generated from Infusionsoft API Swagger definitions.
296 lines (201 loc) • 8.3 kB
Markdown
All URIs are relative to *https://api.infusionsoft.com/crm/rest/v1*
Method | HTTP request | Description
------------- | ------------- | -------------
[**createOpportunityUsingPOST**](OpportunityApi.md
[**getOpportunityUsingGET**](OpportunityApi.md
[**getStagePipelineUsingGET**](OpportunityApi.md
[**listOpportunitiesUsingGET**](OpportunityApi.md
[**replaceOpportunityUsingPUT**](OpportunityApi.md
[**updateOpportunityUsingPATCH**](OpportunityApi.md
<a name="createOpportunityUsingPOST"></a>
> Opportunity createOpportunityUsingPOST(opts)
Create an Opportunity
Creates a new opportunity as the authenticated user. NB: Opportunity must contain values for `opportunity_title&
```javascript
import InfusionsoftRestApi from 'infusionsoft_rest_api';
let apiInstance = new InfusionsoftRestApi.OpportunityApi();
let opts = {
'opportunity': new InfusionsoftRestApi.Opportunity() // Opportunity | opportunity
};
apiInstance.createOpportunityUsingPOST(opts, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
```
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**opportunity** | [**Opportunity**](Opportunity.md)| opportunity | [optional]
[**Opportunity**](Opportunity.md)
No authorization required
- **Content-Type**: application/json
- **Accept**: application/json
<a name="getOpportunityUsingGET"></a>
> Opportunity getOpportunityUsingGET(opportunityId)
Retrieve an Opportunity
Retrives a single opportunity
### Example
```javascript
import InfusionsoftRestApi from 'infusionsoft_rest_api';
let apiInstance = new InfusionsoftRestApi.OpportunityApi();
let opportunityId = 789; // Number | opportunityId
apiInstance.getOpportunityUsingGET(opportunityId, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
```
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**opportunityId** | **Number**| opportunityId |
[**Opportunity**](Opportunity.md)
No authorization required
- **Content-Type**: application/json
- **Accept**: application/json
<a name="getStagePipelineUsingGET"></a>
> [SalesPipeline] getStagePipelineUsingGET()
List Opportunity Stage Pipeline
Retrieves a list of all opportunity stages with pipeline details
```javascript
import InfusionsoftRestApi from 'infusionsoft_rest_api';
let apiInstance = new InfusionsoftRestApi.OpportunityApi();
apiInstance.getStagePipelineUsingGET((error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
```
This endpoint does not need any parameter.
[**[SalesPipeline]**](SalesPipeline.md)
No authorization required
- **Content-Type**: application/json
- **Accept**: application/json
<a name="listOpportunitiesUsingGET"></a>
> OpportunityList listOpportunitiesUsingGET(opts)
List Opportunities
Retrieves a list of all opportunities
### Example
```javascript
import InfusionsoftRestApi from 'infusionsoft_rest_api';
let apiInstance = new InfusionsoftRestApi.OpportunityApi();
let opts = {
'limit': 56, // Number | Sets a total of items to return
'offset': 56, // Number | Sets a beginning range of items to return
'userId': 789, // Number | Returns opportunities for the provided user id
'stageId': 789, // Number | Returns opportunities for the provided stage id
'searchTerm': "searchTerm_example", // String | Returns opportunities that match any of the contact's `given_name`, `family_name`, `company_name`, and `email_addresses` (searches `EMAIL1` only) fields as well as `opportunity_title`
'order': "order_example" // String | Attribute to order items by
};
apiInstance.listOpportunitiesUsingGET(opts, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
```
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**limit** | **Number**| Sets a total of items to return | [optional]
**offset** | **Number**| Sets a beginning range of items to return | [optional]
**userId** | **Number**| Returns opportunities for the provided user id | [optional]
**stageId** | **Number**| Returns opportunities for the provided stage id | [optional]
**searchTerm** | **String**| Returns opportunities that match any of the contact&
**order** | **String**| Attribute to order items by | [optional]
[**OpportunityList**](OpportunityList.md)
No authorization required
- **Content-Type**: application/json
- **Accept**: application/json
<a name="replaceOpportunityUsingPUT"></a>
> Opportunity replaceOpportunityUsingPUT(opts)
Replace an Opportunity
Replaces all values of a given opportunity
### Example
```javascript
import InfusionsoftRestApi from 'infusionsoft_rest_api';
let apiInstance = new InfusionsoftRestApi.OpportunityApi();
let opts = {
'opportunity': new InfusionsoftRestApi.Opportunity() // Opportunity | opportunity
};
apiInstance.replaceOpportunityUsingPUT(opts, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
```
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**opportunity** | [**Opportunity**](Opportunity.md)| opportunity | [optional]
[**Opportunity**](Opportunity.md)
No authorization required
- **Content-Type**: application/json
- **Accept**: application/json
<a name="updateOpportunityUsingPATCH"></a>
> Opportunity updateOpportunityUsingPATCH(opportunityId, opts)
Update an Opportunity
Updates an opportunity with only the values provided in the request.
### Example
```javascript
import InfusionsoftRestApi from 'infusionsoft_rest_api';
let apiInstance = new InfusionsoftRestApi.OpportunityApi();
let opportunityId = 789; // Number | opportunityId
let opts = {
'opportunity': new InfusionsoftRestApi.Opportunity() // Opportunity | opportunity
};
apiInstance.updateOpportunityUsingPATCH(opportunityId, opts, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
```
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**opportunityId** | **Number**| opportunityId |
**opportunity** | [**Opportunity**](Opportunity.md)| opportunity | [optional]
[**Opportunity**](Opportunity.md)
No authorization required
- **Content-Type**: application/json
- **Accept**: application/json