All URIs are relative to https://api.pipedrive.com/v1
ProductResponse addProduct(opts)
Add a product
Adds a new product to the Products inventory. For more information on how to add a product, see <a href="https://pipedrive.readme.io/docs/adding-a-product\" target="_blank" rel="noopener noreferrer">this tutorial</a>.
import Pipedrive from 'pipedrive';
let defaultClient = Pipedrive.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.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 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.ProductsApi();
let opts = Pipedrive.AddProductRequestBody.constructFromObject({
// Properties that you want to update
});
apiInstance.addProduct(opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| addProductRequestBody | AddProductRequestBody | [optional] |
- Content-Type: application/json
- Accept: application/json
NewFollowerResponse addProductFollower(id, opts)
Add a follower to a product
Adds a follower to a product.
import Pipedrive from 'pipedrive';
let defaultClient = Pipedrive.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.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';
let apiInstance = new Pipedrive.ProductsApi();
let id = 56; // Number | ID of the product
let opts = Pipedrive.AddProductFollowerRequest.constructFromObject({
// Properties that you want to update
});
apiInstance.addProductFollower(id, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| id | Number | ID of the product | |
| addProductFollowerRequest | AddProductFollowerRequest | [optional] |
- Content-Type: application/json
- Accept: application/json
DeleteProductResponse deleteProduct(id)
Delete a product
Marks a product as deleted.
import Pipedrive from 'pipedrive';
let defaultClient = Pipedrive.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.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 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.ProductsApi();
let id = 56; // Number | ID of the product
apiInstance.deleteProduct(id).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| id | Number | ID of the product |
- Content-Type: Not defined
- Accept: application/json
DeleteProductFollowerResponse deleteProductFollower(id, followerId)
Delete a follower from a product
Deletes a follower from a product.
import Pipedrive from 'pipedrive';
let defaultClient = Pipedrive.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.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';
let apiInstance = new Pipedrive.ProductsApi();
let id = 56; // Number | ID of the product
let followerId = 56; // Number | ID of the follower
apiInstance.deleteProductFollower(id, followerId).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| id | Number | ID of the product | |
| followerId | Number | ID of the follower |
- Content-Type: Not defined
- Accept: application/json
ProductResponse getProduct(id)
Get one product
Returns data about a specific product.
import Pipedrive from 'pipedrive';
let defaultClient = Pipedrive.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.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 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.ProductsApi();
let id = 56; // Number | ID of the product
apiInstance.getProduct(id).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| id | Number | ID of the product |
- Content-Type: Not defined
- Accept: application/json
UpdateDealRequest getProductDeals(id, opts)
Get deals where a product is attached to
Returns data about deals that have a product attached to.
import Pipedrive from 'pipedrive';
let defaultClient = Pipedrive.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.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 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.ProductsApi();
let id = 56; // Number | ID of the product
let opts = {
'start': 0, // Number | Pagination start
'limit': 56, // Number | Items shown per page
'status': "'all_not_deleted'" // String | Only fetch deals with specific status. If omitted, all not deleted deals are fetched.
};
apiInstance.getProductDeals(id, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| id | Number | ID of the product | |
| start | Number | Pagination start | [optional] [default to 0] |
| limit | Number | Items shown per page | [optional] |
| status | String | Only fetch deals with specific status. If omitted, all not deleted deals are fetched. | [optional] [default to 'all_not_deleted'] |
- Content-Type: Not defined
- Accept: application/json
ListFilesResponse getProductFiles(id, opts)
List files attached to a product
Lists files associated with a product.
import Pipedrive from 'pipedrive';
let defaultClient = Pipedrive.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.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 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.ProductsApi();
let id = 56; // Number | ID of the product
let opts = {
'start': 0, // Number | Pagination start
'limit': 56, // Number | Items shown per page
'includeDeletedFiles': new Pipedrive.NumberBoolean(), // NumberBoolean | When enabled, the list of files will also include deleted files. Please note that trying to download these files will not work.
'sort': "sort_example" // String | Field names and sorting mode separated by a comma (`field_name_1 ASC`, `field_name_2 DESC`). Only first-level field keys are supported (no nested keys). Supported fields: id, user_id, deal_id, person_id, org_id, product_id, add_time, update_time, file_name, file_type, file_size, comment.
};
apiInstance.getProductFiles(id, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| id | Number | ID of the product | |
| start | Number | Pagination start | [optional] [default to 0] |
| limit | Number | Items shown per page | [optional] |
| includeDeletedFiles | NumberBoolean | When enabled, the list of files will also include deleted files. Please note that trying to download these files will not work. | [optional] |
| sort | String | Field names and sorting mode separated by a comma (`field_name_1 ASC`, `field_name_2 DESC`). Only first-level field keys are supported (no nested keys). Supported fields: id, user_id, deal_id, person_id, org_id, product_id, add_time, update_time, file_name, file_type, file_size, comment. | [optional] |
- Content-Type: Not defined
- Accept: application/json
ListProductFollowersResponse getProductFollowers(id, opts)
List followers of a product
Lists the followers of a Product
import Pipedrive from 'pipedrive';
let defaultClient = Pipedrive.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.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 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.ProductsApi();
let id = 56; // Number | ID of the product
let opts = {
'start': 0, // Number | Pagination start
'limit': 56 // Number | Items shown per page
};
apiInstance.getProductFollowers(id, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| id | Number | ID of the product | |
| start | Number | Pagination start | [optional] [default to 0] |
| limit | Number | Items shown per page | [optional] |
- Content-Type: Not defined
- Accept: application/json
UserIDs getProductUsers(id)
List permitted users
Lists users permitted to access a product.
import Pipedrive from 'pipedrive';
let defaultClient = Pipedrive.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.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';
let apiInstance = new Pipedrive.ProductsApi();
let id = 56; // Number | ID of the product
apiInstance.getProductUsers(id).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| id | Number | ID of the product |
- Content-Type: Not defined
- Accept: application/json
ProductsResponse getProducts(opts)
Get all products
Returns data about all Products
import Pipedrive from 'pipedrive';
let defaultClient = Pipedrive.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.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 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.ProductsApi();
let opts = {
'userId': 56, // Number | If supplied, only Products owned by the given user will be returned
'filterId': 56, // Number | ID of the filter to use
'ids': [null], // [Number] | An array of integers with the IDs of the Products that sould be returned in the response
'firstChar': "firstChar_example", // String | If supplied, only Products whose name starts with the specified letter will be returned (case insensitive)
'getSummary': true, // Boolean | If supplied, response will return the total numbers of Products in the `additional_data.summary.total_count` property
'start': 0, // Number | Pagination start
'limit': 56 // Number | Items shown per page
};
apiInstance.getProducts(opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| userId | Number | If supplied, only Products owned by the given user will be returned | [optional] |
| filterId | Number | ID of the filter to use | [optional] |
| ids | [Number] | An array of integers with the IDs of the Products that sould be returned in the response | [optional] |
| firstChar | String | If supplied, only Products whose name starts with the specified letter will be returned (case insensitive) | [optional] |
| getSummary | Boolean | If supplied, response will return the total numbers of Products in the `additional_data.summary.total_count` property | [optional] |
| start | Number | Pagination start | [optional] [default to 0] |
| limit | Number | Items shown per page | [optional] |
- Content-Type: Not defined
- Accept: application/json
ProductSearchResponse searchProducts(term, opts)
Search products
Searches all Products by name, code and/or custom fields. This endpoint is a wrapper of <a href="https://developers.pipedrive.com/docs/api/v1/ItemSearch#searchItem\">/v1/itemSearch</a> with a narrower OAuth scope.
import Pipedrive from 'pipedrive';
let defaultClient = Pipedrive.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.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 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.ProductsApi();
let term = "term_example"; // String | The search term to look for. Minimum 2 characters (or 1 if using `exact_match`).
let opts = {
'fields': "fields_example", // String | A comma-separated string array. The fields to perform the search from. Defaults to all of them.
'exactMatch': true, // Boolean | When enabled, only full exact matches against the given term are returned. It is <b>not</b> case sensitive.
'includeFields': "includeFields_example", // String | Supports including optional fields in the results which are not provided by default.
'start': 0, // Number | Pagination start. Note that the pagination is based on main results and does not include related items when using `search_for_related_items` parameter.
'limit': 56 // Number | Items shown per page
};
apiInstance.searchProducts(term, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| term | String | The search term to look for. Minimum 2 characters (or 1 if using `exact_match`). | |
| fields | String | A comma-separated string array. The fields to perform the search from. Defaults to all of them. | [optional] |
| exactMatch | Boolean | When enabled, only full exact matches against the given term are returned. It is <b>not</b> case sensitive. | [optional] |
| includeFields | String | Supports including optional fields in the results which are not provided by default. | [optional] |
| start | Number | Pagination start. Note that the pagination is based on main results and does not include related items when using `search_for_related_items` parameter. | [optional] [default to 0] |
| limit | Number | Items shown per page | [optional] |
- Content-Type: Not defined
- Accept: application/json
UpdateProductResponse updateProduct(id, opts)
Update a product
Updates product data.
import Pipedrive from 'pipedrive';
let defaultClient = Pipedrive.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.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 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new Pipedrive.ProductsApi();
let id = 56; // Number | ID of the product
let opts = Pipedrive.ProductRequest.constructFromObject({
// Properties that you want to update
});
apiInstance.updateProduct(id, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});- Content-Type: application/json
- Accept: application/json
