All URIs are relative to https://api.pipedrive.com/v1
Method | HTTP request | Description |
---|---|---|
addProduct | POST /products | Add a product |
addProductFollower | POST /products/{id}/followers | Add a follower to a product |
deleteProduct | DELETE /products/{id} | Delete a product |
deleteProductFollower | DELETE /products/{id}/followers/{follower_id} | Delete a follower from a product |
getProduct | GET /products/{id} | Get one product |
getProductDeals | GET /products/{id}/deals | Get deals where a product is attached to |
getProductFiles | GET /products/{id}/files | List files attached to a product |
getProductFollowers | GET /products/{id}/followers | List followers of a product |
getProductUsers | GET /products/{id}/permittedUsers | List permitted users |
getProducts | GET /products | Get all products |
searchProducts | GET /products/search | Search products |
updateProduct | PUT /products/{id} | Update a product |
ProductResponse addProduct(opts)
Add a product
Adds a new product to the Products inventory. For more information, see the tutorial for <a href="https://pipedrive.readme.io/docs/adding-a-product\" target="_blank" rel="noopener noreferrer">adding a product</a>.
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.ProductsApi(apiClient);
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 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.ProductsApi(apiClient);
let id = 56; // Number | The 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 | The 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. After 30 days, the product will be permanently 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.ProductsApi(apiClient);
let id = 56; // Number | The 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 | The 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 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.ProductsApi(apiClient);
let id = 56; // Number | The ID of the product
let followerId = 56; // Number | The ID of the relationship between the follower and the product
apiInstance.deleteProductFollower(id, followerId).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
id | Number | The ID of the product | |
follower_id | Number | The ID of the relationship between the follower and the product |
- Content-Type: Not defined
- Accept: application/json
ProductResponse getProduct(id)
Get one product
Returns data about a specific product.
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.ProductsApi(apiClient);
let id = 56; // Number | The 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 | The ID of the product |
- Content-Type: Not defined
- Accept: application/json
ListDealsResponse getProductDeals(id, opts)
Get deals where a product is attached to
Returns data about deals that have a product attached to it.
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.ProductsApi(apiClient);
let id = 56; // Number | The ID of the product
// snake_case as well as camelCase is supported for naming opts properties
let opts = {
'start': 0, // Number | Pagination start
'limit': 56, // Number | Items shown per page
'status': "'all_not_deleted'" // String | Only fetch deals with a specific status. If omitted, all not deleted deals are returned. If set to deleted, deals that have been deleted up to 30 days ago will be included.
};
apiInstance.getProductDeals(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 product | |
start | Number | Pagination start | [optional] [default to 0] |
limit | Number | Items shown per page | [optional] |
status | String | Only fetch deals with a specific status. If omitted, all not deleted deals are returned. If set to deleted, deals that have been deleted up to 30 days ago will be included. | [optional] [default to 'all_not_deleted'] |
- Content-Type: Not defined
- Accept: application/json
ListProductFilesResponse getProductFiles(id, opts)
List files attached to a product
Lists files associated with a product.
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.ProductsApi(apiClient);
let id = 56; // Number | The ID of the product
// snake_case as well as camelCase is supported for naming opts properties
let opts = {
'start': 0, // Number | Pagination start
'limit': 56, // Number | Items shown per page
'sort': "sort_example" // String | The field name and sorting mode (`field_name_1 ASC` or `field_name_1 DESC`). Supported fields: `update_time`, `id`.
};
apiInstance.getProductFiles(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 product | |
start | Number | Pagination start | [optional] [default to 0] |
limit | Number | Items shown per page | [optional] |
sort | String | The field name and sorting mode (`field_name_1 ASC` or `field_name_1 DESC`). Supported fields: `update_time`, `id`. | [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 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.ProductsApi(apiClient);
let id = 56; // Number | The ID of the product
// snake_case as well as camelCase is supported for naming opts properties
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 | The 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 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.ProductsApi(apiClient);
let id = 56; // Number | The 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 | The 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 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.ProductsApi(apiClient);
// snake_case as well as camelCase is supported for naming opts properties
let opts = {
'userId': 56, // Number | If supplied, only products owned by the given user will be returned
'filterId': 56, // Number | The ID of the filter to use
'ids': [null], // [Number] | An array of integers with the IDs of the products that should 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, the 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 |
---|---|---|---|
user_id | Number | If supplied, only products owned by the given user will be returned | [optional] |
filter_id | Number | The ID of the filter to use | [optional] |
ids | [Number] | An array of integers with the IDs of the products that should be returned in the response | [optional] |
first_char | String | If supplied, only products whose name starts with the specified letter will be returned (case-insensitive) | [optional] |
get_summary | Boolean | If supplied, the 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 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.ProductsApi(apiClient);
let term = "term_example"; // String | The search term to look for. Minimum 2 characters (or 1 if using `exact_match`). Please note that the search term has to be URL encoded.
// snake_case as well as camelCase is supported for naming opts properties
let opts = {
'fields': "fields_example", // String | A comma-separated string array. The fields to perform the search from. Defaults to all of them. Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href=\"https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>.
'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`). Please note that the search term has to be URL encoded. | |
fields | String | A comma-separated string array. The fields to perform the search from. Defaults to all of them. Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href="https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target="_blank" rel="noopener noreferrer">here</a>. | [optional] |
exact_match | Boolean | When enabled, only full exact matches against the given term are returned. It is <b>not</b> case sensitive. | [optional] |
include_fields | 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 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.ProductsApi(apiClient);
let id = 56; // Number | The ID of the product
let opts = Pipedrive.UpdateProductRequestBody.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);
});
Name | Type | Description | Notes |
---|---|---|---|
id | Number | The ID of the product | |
UpdateProductRequestBody | UpdateProductRequestBody | [optional] |
- Content-Type: application/json
- Accept: application/json