All URIs are relative to https://api.pipedrive.com/v1
Method | HTTP request | Description |
---|---|---|
addRecurringSubscription | POST /subscriptions/recurring | Add a recurring subscription |
addSubscriptionInstallment | POST /subscriptions/installment | Add an installment subscription |
cancelRecurringSubscription | PUT /subscriptions/recurring/{id}/cancel | Cancel a recurring subscription |
deleteSubscription | DELETE /subscriptions/{id} | Delete a subscription |
findSubscriptionByDeal | GET /subscriptions/find/{dealId} | Find subscription by deal |
getSubscription | GET /subscriptions/{id} | Get details of a subscription |
getSubscriptionPayments | GET /subscriptions/{id}/payments | Get all payments of a subscription |
updateRecurringSubscription | PUT /subscriptions/recurring/{id} | Update a recurring subscription |
updateSubscriptionInstallment | PUT /subscriptions/installment/{id} | Update an installment subscription |
SubscriptionsIdResponse addRecurringSubscription(opts)
Add a recurring subscription
Adds a new recurring subscription.
import Pipedrive from 'pipedrive';
let apiClient = new Pipedrive.ApiClient();
// Configure API key authorization: api_key
let api_key = apiClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = apiClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.SubscriptionsApi(apiClient);
let opts = Pipedrive.SubscriptionRecurringCreateRequest.constructFromObject({
// Properties that you want to update
});
apiInstance.addRecurringSubscription(opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
SubscriptionRecurringCreateRequest | SubscriptionRecurringCreateRequest | [optional] |
- Content-Type: application/json
- Accept: application/json
SubscriptionsIdResponse addSubscriptionInstallment(opts)
Add an installment subscription
Adds a new installment subscription.
import Pipedrive from 'pipedrive';
let apiClient = new Pipedrive.ApiClient();
// Configure API key authorization: api_key
let api_key = apiClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = apiClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.SubscriptionsApi(apiClient);
let opts = Pipedrive.SubscriptionInstallmentCreateRequest.constructFromObject({
// Properties that you want to update
});
apiInstance.addSubscriptionInstallment(opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
SubscriptionInstallmentCreateRequest | SubscriptionInstallmentCreateRequest | [optional] |
- Content-Type: application/json
- Accept: application/json
SubscriptionsIdResponse cancelRecurringSubscription(id, opts)
Cancel a recurring subscription
Cancels a recurring subscription.
import Pipedrive from 'pipedrive';
let apiClient = new Pipedrive.ApiClient();
// Configure API key authorization: api_key
let api_key = apiClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = apiClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.SubscriptionsApi(apiClient);
let id = 56; // Number | The ID of the subscription
let opts = Pipedrive.SubscriptionRecurringCancelRequest.constructFromObject({
// Properties that you want to update
});
apiInstance.cancelRecurringSubscription(id, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
id | Number | The ID of the subscription | |
SubscriptionRecurringCancelRequest | SubscriptionRecurringCancelRequest | [optional] |
- Content-Type: application/json
- Accept: application/json
SubscriptionsIdResponse deleteSubscription(id)
Delete a subscription
Marks an installment or a recurring subscription as deleted.
import Pipedrive from 'pipedrive';
let apiClient = new Pipedrive.ApiClient();
// Configure API key authorization: api_key
let api_key = apiClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = apiClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.SubscriptionsApi(apiClient);
let id = 56; // Number | The ID of the subscription
apiInstance.deleteSubscription(id).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
id | Number | The ID of the subscription |
- Content-Type: Not defined
- Accept: application/json
SubscriptionsIdResponse findSubscriptionByDeal(dealId)
Find subscription by deal
Returns details of an installment or a recurring subscription by the deal ID.
import Pipedrive from 'pipedrive';
let apiClient = new Pipedrive.ApiClient();
// Configure API key authorization: api_key
let api_key = apiClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = apiClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.SubscriptionsApi(apiClient);
let dealId = 56; // Number | The ID of the deal
apiInstance.findSubscriptionByDeal(dealId).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
dealId | Number | The ID of the deal |
- Content-Type: Not defined
- Accept: application/json
SubscriptionsIdResponse getSubscription(id)
Get details of a subscription
Returns details of an installment or a recurring subscription.
import Pipedrive from 'pipedrive';
let apiClient = new Pipedrive.ApiClient();
// Configure API key authorization: api_key
let api_key = apiClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = apiClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.SubscriptionsApi(apiClient);
let id = 56; // Number | The ID of the subscription
apiInstance.getSubscription(id).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
id | Number | The ID of the subscription |
- Content-Type: Not defined
- Accept: application/json
PaymentsResponse getSubscriptionPayments(id)
Get all payments of a subscription
Returns all payments of an installment or recurring subscription.
import Pipedrive from 'pipedrive';
let apiClient = new Pipedrive.ApiClient();
// Configure API key authorization: api_key
let api_key = apiClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = apiClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.SubscriptionsApi(apiClient);
let id = 56; // Number | The ID of the subscription
apiInstance.getSubscriptionPayments(id).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
id | Number | The ID of the subscription |
- Content-Type: Not defined
- Accept: application/json
SubscriptionsIdResponse updateRecurringSubscription(id, opts)
Update a recurring subscription
Updates a recurring subscription.
import Pipedrive from 'pipedrive';
let apiClient = new Pipedrive.ApiClient();
// Configure API key authorization: api_key
let api_key = apiClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = apiClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.SubscriptionsApi(apiClient);
let id = 56; // Number | The ID of the subscription
let opts = Pipedrive.SubscriptionRecurringUpdateRequest.constructFromObject({
// Properties that you want to update
});
apiInstance.updateRecurringSubscription(id, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
id | Number | The ID of the subscription | |
SubscriptionRecurringUpdateRequest | SubscriptionRecurringUpdateRequest | [optional] |
- Content-Type: application/json
- Accept: application/json
SubscriptionsIdResponse updateSubscriptionInstallment(id, opts)
Update an installment subscription
Updates an installment subscription.
import Pipedrive from 'pipedrive';
let apiClient = new Pipedrive.ApiClient();
// Configure API key authorization: api_key
let api_key = apiClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = apiClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.SubscriptionsApi(apiClient);
let id = 56; // Number | The ID of the subscription
let opts = Pipedrive.SubscriptionInstallmentUpdateRequest.constructFromObject({
// Properties that you want to update
});
apiInstance.updateSubscriptionInstallment(id, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
id | Number | The ID of the subscription | |
SubscriptionInstallmentUpdateRequest | SubscriptionInstallmentUpdateRequest | [optional] |
- Content-Type: application/json
- Accept: application/json