Fintesk API - V2
Fintesk API v2 (2.0.27)
Download OpenAPI specification:Download
Activities are appointments/tasks/events on a calendar that can be associated with a deal, a lead, a person and an organization. Activities can be of different type (such as call, meeting, lunch or a custom type - see ActivityTypes object) and can be assigned to a particular user. Note that activities can also be created without a specific date/time.
Delete multiple activities in bulk
Marks multiple activities as deleted. After 30 days, the activities will be permanently deleted.
Authorizations:
query Parameters
ids required | string The comma-separated IDs that will be deleted |
Responses
Response samples
- 200
{- "success": true,
- "data": {
- "id": [
- 0
]
}
}
Get all activities assigned to a particular user
Returns all activities assigned to a particular user.
Authorizations:
query Parameters
user_id | integer The ID of the user whose activities will be fetched. If omitted, the user associated with the API token will be used. If 0, activities for all company users will be fetched based on the permission sets. |
filter_id | integer The ID of the filter to use (will narrow down results if used together with |
type | string The type of the activity, can be one type or multiple types separated by a comma. This is in correlation with the |
limit | integer <int32> >= 1 Default: 100 Example: limit=100 Limits the number of returned results. If not provided, 100 items will be returned. |
start | integer Default: 0 For pagination, the position that represents the first result for the page. |
start_date | string <date> Use the activity due date where you wish to begin fetching activities from. Insert due date in YYYY-MM-DD format. |
end_date | string <date> Use the activity due date where you wish to stop fetching activities from. Insert due date in YYYY-MM-DD format. |
done | number (doneNumberBoolean) Enum: 0 1 Whether the activity is done or not. 0 = Not done, 1 = Done. If omitted, returns both Done and Not done activities. |
Responses
Response samples
- 200
{- "success": true,
- "data": [
- {
- "person_id": 0,
- "deal_id": 0,
- "org_id": 0,
- "due_date": "2019-08-24",
- "due_time": "string",
- "duration": "string",
- "active_flag": true,
- "created_by_user_id": 0,
- "add_time": "2019-08-24T14:15:22Z",
- "update_time": "2019-08-24T14:15:22Z",
- "last_updated_by_user_id": 0,
- "org_name": "string",
- "person_name": "string",
- "owner_name": "string",
- "deal_name": "string",
- "company_id": 0,
- "id": 0,
- "done": 0,
- "subject": "string",
- "type": "string",
- "assigned_to_user_id": 0,
- "user_id": 0,
- "participants": [
- { }
], - "marked_as_done_time": "string"
}
], - "additional_data": {
- "pagination": {
- "start": 0,
- "limit": 0,
- "more_items_in_collection": true,
- "next_start": 0
}
}, - "related_objects": {
- "user": {
- "USER_ID": {
- "active_flag": true,
- "created_by_user_id": 0,
- "add_time": "2019-08-24T14:15:22Z",
- "update_time": "2019-08-24T14:15:22Z",
- "last_updated_by_user_id": 0,
- "email": "string",
- "id": "string",
- "name": "string"
}
}, - "person": {
- "PERSON_ID": {
- "id": 0,
- "name": "string",
- "email": [
- {
- "value": "string",
- "primary": true,
- "label": "string"
}
], - "phone": [
- {
- "value": "string",
- "primary": true,
- "label": "string"
}
], - "owner_id": 0
}
}, - "organization": {
- "ORGANIZATION_ID": {
- "id": 0,
- "address": "string",
- "name": "string",
- "people_count": 0,
- "owner_id": 0
}
}, - "deal": {
- "DEAL_ID": {
- "stage_id": 0,
- "pipeline_id": 0,
- "currency": "string",
- "value": 0,
- "id": 0,
- "name": "string",
- "status": "string"
}
}
}
}
Add an activity
Adds a new activity. Includes more_activities_scheduled_in_context
property in response's additional_data
which indicates whether there are more undone activities scheduled with the same deal, person or organization (depending on the supplied data). For more information, see the tutorial for adding an activity.
Authorizations:
Request Body schema: application/json
person_id | integer The ID of the person this Item is associated with |
deal_id | integer The ID of the deal this Item is associated with |
org_id | integer The ID of the organization this Item is associated with |
due_date | string <date> "The due date of the activity. Format: YYYY-MM-DD" |
due_time | string "The due time of the activity in UTC. Format: HH:MM" |
duration | string "The duration of the activity. Format: HH:MM" |
active_flag | boolean Whether the entity is active or not. false = Not activated, true = Activated |
created_by_user_id | integer The ID of the user who created the item. |
add_time | string <date-time> The creation time in UTC. Format: YYYY-MM-DD HH:MM:SS |
update_time | string <date-time> The last update time in UTC. Format: YYYY-MM-DD HH:MM:SS |
last_updated_by_user_id | integer The ID of the user who created or most recently updated the item. |
org_name | string The name of the organization associated with the entity |
person_name | string The name of the peson associated with the entity |
owner_name | string The name of the owner associated with the entity |
deal_name | string The name of the deal this entity is associated with |
company_id | integer The ID of the company |
id | integer The ID of the activity, generated when the activity was created |
done | number (doneNumberBoolean) Enum: 0 1 Whether the activity is done or not. 0 = Not done, 1 = Done |
subject | string The subject of the activity |
type | string The type of the activity. This is in correlation with the |
assigned_to_user_id | integer The ID of the user to whom the activity is assigned to. Equal to |
user_id | integer The ID of the user whom the activity is assigned to |
participants | Array of objects or null List of multiple persons (participants) this activity is associated with. It requires a structure as follows: |
marked_as_done_time | string The date and time this activity was marked as done. Format: YYYY-MM-DD HH:MM:SS. |
Responses
Request samples
- Payload
{- "person_id": 0,
- "deal_id": 0,
- "org_id": 0,
- "due_date": "2019-08-24",
- "due_time": "string",
- "duration": "string",
- "active_flag": true,
- "created_by_user_id": 0,
- "add_time": "2019-08-24T14:15:22Z",
- "update_time": "2019-08-24T14:15:22Z",
- "last_updated_by_user_id": 0,
- "org_name": "string",
- "person_name": "string",
- "owner_name": "string",
- "deal_name": "string",
- "company_id": 0,
- "id": 0,
- "done": 0,
- "subject": "string",
- "type": "string",
- "assigned_to_user_id": 0,
- "user_id": 0,
- "participants": [
- { }
], - "marked_as_done_time": "string"
}
Response samples
- 201
{- "success": true,
- "data": {
- "person_id": 0,
- "deal_id": 0,
- "org_id": 0,
- "due_date": "2019-08-24",
- "due_time": "string",
- "duration": "string",
- "active_flag": true,
- "created_by_user_id": 0,
- "add_time": "2019-08-24T14:15:22Z",
- "update_time": "2019-08-24T14:15:22Z",
- "last_updated_by_user_id": 0,
- "org_name": "string",
- "person_name": "string",
- "owner_name": "string",
- "deal_name": "string",
- "company_id": 0,
- "id": 0,
- "done": 0,
- "subject": "string",
- "type": "string",
- "assigned_to_user_id": 0,
- "user_id": 0,
- "participants": [
- { }
], - "marked_as_done_time": "string"
}, - "additional_data": {
- "pagination": {
- "start": 0,
- "limit": 0,
- "more_items_in_collection": true,
- "next_start": 0
}
}, - "related_objects": {
- "user": {
- "USER_ID": {
- "active_flag": true,
- "created_by_user_id": 0,
- "add_time": "2019-08-24T14:15:22Z",
- "update_time": "2019-08-24T14:15:22Z",
- "last_updated_by_user_id": 0,
- "email": "string",
- "id": "string",
- "name": "string"
}
}, - "person": {
- "PERSON_ID": {
- "id": 0,
- "name": "string",
- "email": [
- {
- "value": "string",
- "primary": true,
- "label": "string"
}
], - "phone": [
- {
- "value": "string",
- "primary": true,
- "label": "string"
}
], - "owner_id": 0
}
}, - "organization": {
- "ORGANIZATION_ID": {
- "id": 0,
- "address": "string",
- "name": "string",
- "people_count": 0,
- "owner_id": 0
}
}, - "deal": {
- "DEAL_ID": {
- "stage_id": 0,
- "pipeline_id": 0,
- "currency": "string",
- "value": 0,
- "id": 0,
- "name": "string",
- "status": "string"
}
}
}
}
Get details of an activity
Returns the details of a specific activity.
Authorizations:
path Parameters
id required | integer The ID of the Entity we want to retrieve. |
Responses
Response samples
- 200
{- "success": true,
- "data": {
- "person_id": 0,
- "deal_id": 0,
- "org_id": 0,
- "due_date": "2019-08-24",
- "due_time": "string",
- "duration": "string",
- "active_flag": true,
- "created_by_user_id": 0,
- "add_time": "2019-08-24T14:15:22Z",
- "update_time": "2019-08-24T14:15:22Z",
- "last_updated_by_user_id": 0,
- "org_name": "string",
- "person_name": "string",
- "owner_name": "string",
- "deal_name": "string",
- "company_id": 0,
- "id": 0,
- "done": 0,
- "subject": "string",
- "type": "string",
- "assigned_to_user_id": 0,
- "user_id": 0,
- "participants": [
- { }
], - "marked_as_done_time": "string"
}, - "related_objects": {
- "user": {
- "USER_ID": {
- "active_flag": true,
- "created_by_user_id": 0,
- "add_time": "2019-08-24T14:15:22Z",
- "update_time": "2019-08-24T14:15:22Z",
- "last_updated_by_user_id": 0,
- "email": "string",
- "id": "string",
- "name": "string"
}
}, - "person": {
- "PERSON_ID": {
- "id": 0,
- "name": "string",
- "email": [
- {
- "value": "string",
- "primary": true,
- "label": "string"
}
], - "phone": [
- {
- "value": "string",
- "primary": true,
- "label": "string"
}
], - "owner_id": 0
}
}, - "organization": {
- "ORGANIZATION_ID": {
- "id": 0,
- "address": "string",
- "name": "string",
- "people_count": 0,
- "owner_id": 0
}
}, - "deal": {
- "DEAL_ID": {
- "stage_id": 0,
- "pipeline_id": 0,
- "currency": "string",
- "value": 0,
- "id": 0,
- "name": "string",
- "status": "string"
}
}
}
}
Update an activity
Updates an activity. Includes more_activities_scheduled_in_context
property in response's additional_data
which indicates whether there are more undone activities scheduled with the same deal, person or organization (depending on the supplied data).
Authorizations:
path Parameters
id required | integer The ID of the Entity we want to retrieve. |
Request Body schema: application/json
person_id | integer The ID of the person this Item is associated with |
deal_id | integer The ID of the deal this Item is associated with |
org_id | integer The ID of the organization this Item is associated with |
due_date | string <date> "The due date of the activity. Format: YYYY-MM-DD" |
due_time | string "The due time of the activity in UTC. Format: HH:MM" |
duration | string "The duration of the activity. Format: HH:MM" |
active_flag | boolean Whether the entity is active or not. false = Not activated, true = Activated |
created_by_user_id | integer The ID of the user who created the item. |
add_time | string <date-time> The creation time in UTC. Format: YYYY-MM-DD HH:MM:SS |
update_time | string <date-time> The last update time in UTC. Format: YYYY-MM-DD HH:MM:SS |
last_updated_by_user_id | integer The ID of the user who created or most recently updated the item. |
org_name | string The name of the organization associated with the entity |
person_name | string The name of the peson associated with the entity |
owner_name | string The name of the owner associated with the entity |
deal_name | string The name of the deal this entity is associated with |
company_id | integer The ID of the company |
id | integer The ID of the activity, generated when the activity was created |
done | number (doneNumberBoolean) Enum: 0 1 Whether the activity is done or not. 0 = Not done, 1 = Done |
subject | string The subject of the activity |
type | string The type of the activity. This is in correlation with the |
assigned_to_user_id | integer The ID of the user to whom the activity is assigned to. Equal to |
user_id | integer The ID of the user whom the activity is assigned to |
participants | Array of objects or null List of multiple persons (participants) this activity is associated with. It requires a structure as follows: |
marked_as_done_time | string The date and time this activity was marked as done. Format: YYYY-MM-DD HH:MM:SS. |
Responses
Request samples
- Payload
{- "person_id": 0,
- "deal_id": 0,
- "org_id": 0,
- "due_date": "2019-08-24",
- "due_time": "string",
- "duration": "string",
- "active_flag": true,
- "created_by_user_id": 0,
- "add_time": "2019-08-24T14:15:22Z",
- "update_time": "2019-08-24T14:15:22Z",
- "last_updated_by_user_id": 0,
- "org_name": "string",
- "person_name": "string",
- "owner_name": "string",
- "deal_name": "string",
- "company_id": 0,
- "id": 0,
- "done": 0,
- "subject": "string",
- "type": "string",
- "assigned_to_user_id": 0,
- "user_id": 0,
- "participants": [
- { }
], - "marked_as_done_time": "string"
}
Response samples
- 200
{- "success": true,
- "data": {
- "person_id": 0,
- "deal_id": 0,
- "org_id": 0,
- "due_date": "2019-08-24",
- "due_time": "string",
- "duration": "string",
- "active_flag": true,
- "created_by_user_id": 0,
- "add_time": "2019-08-24T14:15:22Z",
- "update_time": "2019-08-24T14:15:22Z",
- "last_updated_by_user_id": 0,
- "org_name": "string",
- "person_name": "string",
- "owner_name": "string",
- "deal_name": "string",
- "company_id": 0,
- "id": 0,
- "done": 0,
- "subject": "string",
- "type": "string",
- "assigned_to_user_id": 0,
- "user_id": 0,
- "participants": [
- { }
], - "marked_as_done_time": "string"
}, - "related_objects": {
- "user": {
- "USER_ID": {
- "active_flag": true,
- "created_by_user_id": 0,
- "add_time": "2019-08-24T14:15:22Z",
- "update_time": "2019-08-24T14:15:22Z",
- "last_updated_by_user_id": 0,
- "email": "string",
- "id": "string",
- "name": "string"
}
}, - "person": {
- "PERSON_ID": {
- "id": 0,
- "name": "string",
- "email": [
- {
- "value": "string",
- "primary": true,
- "label": "string"
}
], - "phone": [
- {
- "value": "string",
- "primary": true,
- "label": "string"
}
], - "owner_id": 0
}
}, - "organization": {
- "ORGANIZATION_ID": {
- "id": 0,
- "address": "string",
- "name": "string",
- "people_count": 0,
- "owner_id": 0
}
}, - "deal": {
- "DEAL_ID": {
- "stage_id": 0,
- "pipeline_id": 0,
- "currency": "string",
- "value": 0,
- "id": 0,
- "name": "string",
- "status": "string"
}
}
}
}
Response samples
- 200
{- "success": true,
- "data": [
- {
- "options": [
- { }
], - "name": "string",
- "add_visible_flag": true,
- "field_type": "date",
- "active_flag": true,
- "created_by_user_id": 0,
- "add_time": "2019-08-24T14:15:22Z",
- "update_time": "2019-08-24T14:15:22Z",
- "last_updated_by_user_id": 0,
- "order_nbr": 0,
- "id": 0,
- "key": "string",
- "edit_flag": true,
- "index_visible_flag": true,
- "details_visible_flag": true,
- "important_flag": true,
- "bulk_edit_allowed": true,
- "searchable_flag": true,
- "filtering_allowed": true,
- "sortable_flag": true,
- "mandatory_flag": true,
- "is_subfield": true,
- "subfields": [
- { }
]
}
], - "additional_data": {
- "pagination": {
- "start": 0,
- "limit": 0,
- "more_items_in_collection": true,
- "next_start": 0
}
}
}
Activity types represent different kinds of activities that can be stored.
Each activity type is presented to the user with an icon and a name.
Additionally, a color can be defined (not implemented in the Fintesk app as of today).
Activity types are linked to activities via ActivityType.key_string = Activity.type
.
The key_string
will be generated by the API based on the given name of the activity type upon creation, and cannot be changed.
Activity types should be presented to the user in an ordered manner, using the ActivityType.order_nr
value.
Delete multiple activity types in bulk
Marks multiple activity types as deleted.
Authorizations:
query Parameters
ids required | string The comma-separated IDs that will be deleted |
Responses
Response samples
- 200
{- "success": true,
- "data": {
- "type": null,
- "title": null,
- "properties": null
}
}
Response samples
- 200
{- "success": true,
- "data": [
- {
- "active_flag": true,
- "created_by_user_id": 0,
- "add_time": "2019-08-24T14:15:22Z",
- "update_time": "2019-08-24T14:15:22Z",
- "last_updated_by_user_id": 0,
- "id": 0,
- "key_string": "string",
- "is_custom_flag": true,
- "order_nbr": 0,
- "name": "string",
- "icon_key": "task",
- "color": "string"
}
]
}
Add new activity type
Adds a new activity type.
Authorizations:
Request Body schema: application/json
order_nbr | integer The position (index) of the Item. First order ( |
name required | string The name of the activity type |
icon_key required | string Enum: "task" "email" "meeting" "deadline" "call" "lunch" "calendar" "downarrow" "document" "smartphone" "camera" "scissors" "cogs" "bubble" "uparrow" "checkbox" "signpost" "shuffle" "addressbook" "linegraph" "picture" "car" "world" "search" "clip" "sound" "brush" "key" "padlock" "pricetag" "suitcase" "finish" "plane" "loop" "wifi" "truck" "cart" "bulb" "bell" "presentation" Icon graphic to use for representing this activity type |
color | string A designated color for the activity type in 6-character HEX format (e.g. |
Responses
Request samples
- Payload
{- "order_nbr": 0,
- "name": "string",
- "icon_key": "task",
- "color": "string"
}
Response samples
- 200
{- "success": true,
- "data": {
- "active_flag": true,
- "created_by_user_id": 0,
- "add_time": "2019-08-24T14:15:22Z",
- "update_time": "2019-08-24T14:15:22Z",
- "last_updated_by_user_id": 0,
- "id": 0,
- "key_string": "string",
- "is_custom_flag": true,
- "order_nbr": 0,
- "name": "string",
- "icon_key": "task",
- "color": "string"
}
}
Delete an activity type
Marks an activity type as deleted.
Authorizations:
path Parameters
id required | integer The ID of the Entity we want to retrieve. |
Responses
Response samples
- 200
{- "success": true,
- "data": {
- "active_flag": true,
- "created_by_user_id": 0,
- "add_time": "2019-08-24T14:15:22Z",
- "update_time": "2019-08-24T14:15:22Z",
- "last_updated_by_user_id": 0,
- "id": 0,
- "key_string": "string",
- "is_custom_flag": true,
- "order_nbr": 0,
- "name": "string",
- "icon_key": "task",
- "color": "string"
}
}
Update an activity type
Updates an activity type.
Authorizations:
path Parameters
id required | integer The ID of the Entity we want to retrieve. |
Request Body schema: application/json
order_nbr | integer The position (index) of the Item. First order ( |
name | string The name of the activity type |
icon_key | string Enum: "task" "email" "meeting" "deadline" "call" "lunch" "calendar" "downarrow" "document" "smartphone" "camera" "scissors" "cogs" "bubble" "uparrow" "checkbox" "signpost" "shuffle" "addressbook" "linegraph" "picture" "car" "world" "search" "clip" "sound" "brush" "key" "padlock" "pricetag" "suitcase" "finish" "plane" "loop" "wifi" "truck" "cart" "bulb" "bell" "presentation" Icon graphic to use for representing this activity type |
color | string A designated color for the activity type in 6-character HEX format (e.g. |
Responses
Request samples
- Payload
{- "order_nbr": 0,
- "name": "string",
- "icon_key": "task",
- "color": "string"
}
Response samples
- 200
{- "success": true,
- "data": {
- "active_flag": true,
- "created_by_user_id": 0,
- "add_time": "2019-08-24T14:15:22Z",
- "update_time": "2019-08-24T14:15:22Z",
- "last_updated_by_user_id": 0,
- "id": 0,
- "key_string": "string",
- "is_custom_flag": true,
- "order_nbr": 0,
- "name": "string",
- "icon_key": "task",
- "color": "string"
}
}
Supported currencies which can be used to represent the monetary value of a deal, or a value of any monetary type custom field.
The Currency.code
field must be used to point to a currency.
Currency.code
is the ISO-4217 format currency code for non-custom currencies.
You can differentiate custom and non-custom currencies using the is_custom_flag
property.
Get all supported currencies
Returns all supported currencies in given account which should be used when saving monetary values with other objects. The code
parameter of the returning objects is the currency code according to ISO 4217 for all non-custom currencies.
Authorizations:
query Parameters
term | string Optional search term that is searched for from currency's name and/or code |
Responses
Response samples
- 200
{- "success": true,
- "data": [
- {
- "active_flag": true,
- "created_by_user_id": 0,
- "add_time": "2019-08-24T14:15:22Z",
- "update_time": "2019-08-24T14:15:22Z",
- "last_updated_by_user_id": 0,
- "id": 0,
- "code": "string",
- "name": "string",
- "decimal_points": 0,
- "symbol": "string",
- "is_custom_flag": true
}
]
}
Deal fields represent the near-complete schema for a deal in the context of the company of the authorized user.
Each company can have a different schema for their deals, with various custom fields.
In the context of using deal fields as a schema for defining the data fields of a deal, it must be kept in mind that some types of custom fields can have additional data fields which are not separate deal fields per se. Such is the case with monetary, daterange and timerange fields – each of these fields will have one additional data field in addition to the one presented in the context of deal fields.
For example, if there is a monetary field with the key ffk9s9
stored on the account, ffk9s9
would hold the numeric value of the field, and ffk9s9_currency
would hold the ISO currency code that goes along with the numeric value.
To find out which data fields are available, fetch one deal and list its keys.
Get all deal fields
Returns data about all deal fields.
Authorizations:
query Parameters
limit | integer <int32> >= 1 Default: 100 Example: limit=100 Limits the number of returned results. If not provided, 100 items will be returned. |
start | integer Default: 0 For pagination, the position that represents the first result for the page. |
Responses
Response samples
- 200
{- "success": true,
- "additional_data": {
- "pagination": {
- "start": 0,
- "limit": 0,
- "more_items_in_collection": true,
- "next_start": 0
}
}, - "data": {
- "options": [
- { }
], - "name": "string",
- "add_visible_flag": true,
- "field_type": "date",
- "active_flag": true,
- "created_by_user_id": 0,
- "add_time": "2019-08-24T14:15:22Z",
- "update_time": "2019-08-24T14:15:22Z",
- "last_updated_by_user_id": 0,
- "order_nbr": 0,
- "id": 0,
- "key": "string",
- "edit_flag": true,
- "index_visible_flag": true,
- "details_visible_flag": true,
- "important_flag": true,
- "bulk_edit_allowed": true,
- "searchable_flag": true,
- "filtering_allowed": true,
- "sortable_flag": true,
- "mandatory_flag": true,
- "is_subfield": true,
- "subfields": [
- { }
]
}
}
Add a new deal field
Adds a new deal field. For more information, see the tutorial for adding a new custom field.
Authorizations:
Request Body schema: application/json
options | Array of objects or null The options of the field. When there are no options, | ||||||||||||||||||||||||||||||
name required | string The name of the field | ||||||||||||||||||||||||||||||
add_visible_flag | boolean Default: true Whether the field is available in the 'add new' modal or not (in the web app) | ||||||||||||||||||||||||||||||
field_type required | string Enum: "date" "daterange" "double" "enum" "monetary" "org" "person" "phone" "set" "text" "time" "timerange" "user" "varchar" The type of the field
|
Responses
Request samples
- Payload
{- "options": [
- { }
], - "name": "string",
- "add_visible_flag": true,
- "field_type": "date"
}
Response samples
- 200
{- "success": true,
- "data": {
- "options": [
- { }
], - "name": "string",
- "add_visible_flag": true,
- "field_type": "date",
- "active_flag": true,
- "created_by_user_id": 0,
- "add_time": "2019-08-24T14:15:22Z",
- "update_time": "2019-08-24T14:15:22Z",
- "last_updated_by_user_id": 0,
- "order_nbr": 0,
- "id": 0,
- "key": "string",
- "edit_flag": true,
- "index_visible_flag": true,
- "details_visible_flag": true,
- "important_flag": true,
- "bulk_edit_allowed": true,
- "searchable_flag": true,
- "filtering_allowed": true,
- "sortable_flag": true,
- "mandatory_flag": true,
- "is_subfield": true,
- "subfields": [
- { }
]
}
}
Get one deal field
Returns data about a specific deal field.
Authorizations:
path Parameters
id required | integer The ID of the Entity Field we want to retrieve. |
Responses
Response samples
- 200
{- "success": true,
- "data": {
- "options": [
- { }
], - "name": "string",
- "add_visible_flag": true,
- "field_type": "date",
- "active_flag": true,
- "created_by_user_id": 0,
- "add_time": "2019-08-24T14:15:22Z",
- "update_time": "2019-08-24T14:15:22Z",
- "last_updated_by_user_id": 0,
- "order_nbr": 0,
- "id": 0,
- "key": "string",
- "edit_flag": true,
- "index_visible_flag": true,
- "details_visible_flag": true,
- "important_flag": true,
- "bulk_edit_allowed": true,
- "searchable_flag": true,
- "filtering_allowed": true,
- "sortable_flag": true,
- "mandatory_flag": true,
- "is_subfield": true,
- "subfields": [
- { }
]
}
}
Delete a deal field
Marks a field as deleted. For more information, see the tutorial for deleting a custom field.
Authorizations:
path Parameters
id required | integer The ID of the Entity Field we want to retrieve. |
Responses
Response samples
- 200
{- "success": true,
- "data": {
- "id": 0
}
}
Update a deal field
Updates a deal field. For more information, see the tutorial for updating custom fields' values.
Authorizations:
path Parameters
id required | integer The ID of the Entity Field we want to retrieve. |
Request Body schema: application/json
options | Array of objects or null The options of the field. When there are no options, |
name required | string The name of the field |
add_visible_flag | boolean Default: true Whether the field is available in the 'add new' modal or not (in the web app) |
Responses
Request samples
- Payload
{- "options": [
- { }
], - "name": "string",
- "add_visible_flag": true
}
Response samples
- 200
{- "success": true,
- "data": {
- "options": [
- { }
], - "name": "string",
- "add_visible_flag": true,
- "field_type": "date",
- "active_flag": true,
- "created_by_user_id": 0,
- "add_time": "2019-08-24T14:15:22Z",
- "update_time": "2019-08-24T14:15:22Z",
- "last_updated_by_user_id": 0,
- "order_nbr": 0,
- "id": 0,
- "key": "string",
- "edit_flag": true,
- "index_visible_flag": true,
- "details_visible_flag": true,
- "important_flag": true,
- "bulk_edit_allowed": true,
- "searchable_flag": true,
- "filtering_allowed": true,
- "sortable_flag": true,
- "mandatory_flag": true,
- "is_subfield": true,
- "subfields": [
- { }
]
}
}
Deals represent ongoing, lost or won sales to an organization or to a person.
Each deal has a monetary value and must be placed in a stage.
Deals can be owned by a user.
Each deal consists of standard data fields but can also contain a number of custom fields.
The custom fields can be recognized by long hashes as keys.
These hashes can be mapped against DealField.key
.
The corresponding label for each such custom field can be obtained from DealField.name
.
Get all deals
Returns all deals. For more information, see the tutorial for getting all deals.
Authorizations:
query Parameters
user_id | integer If supplied, only deals matching the given user will be returned. However, |
filter_id | integer The ID of the filter to use (will narrow down results if used together with |
stage_id | integer If supplied, only deals within the given stage will be returned |
status | string Default: "all_not_deleted" Enum: "open" "won" "lost" "deleted" "all_not_deleted" 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. The upper limit of found deals associated with the status is 2000. |
start | integer Default: 0 For pagination, the position that represents the first result for the page. |
limit | integer <int32> >= 1 Default: 100 Example: limit=100 Limits the number of returned results. If not provided, 100 items will be returned. |
sort | string The field names and sorting mode separated by a comma ( |
owned_by_you | number (ownedNumberBoolean) Enum: 0 1 When supplied, only deals owned by you are returned. However, |
Responses
Response samples
- 200
{- "success": true,
- "data": [
- {
- "id": "string",
- "creator_user_id": {
- "active_flag": true,
- "created_by_user_id": 0,
- "add_time": "2019-08-24T14:15:22Z",
- "update_time": "2019-08-24T14:15:22Z",
- "last_updated_by_user_id": 0,
- "email": "string",
- "id": "string",
- "name": "string",
- "value": 0
}, - "user_id": {
- "active_flag": true,
- "created_by_user_id": 0,
- "add_time": "2019-08-24T14:15:22Z",
- "update_time": "2019-08-24T14:15:22Z",
- "last_updated_by_user_id": 0,
- "email": "string",
- "id": "string",
- "name": "string",
- "value": 0
}, - "person_id": {
- "name": "string",
- "email": [
- {
- "value": "string",
- "primary": true,
- "label": "string"
}
], - "phone": [
- {
- "value": "string",
- "primary": true,
- "label": "string"
}
], - "owner_id": 0,
- "value": 0
}, - "org_id": {
- "address": "string",
- "name": "string",
- "people_count": 0,
- "owner_id": 0,
- "value": 0
}, - "next_activity_date": "string",
- "next_activity_time": "string",
- "next_activity_id": 0,
- "next_activity_subject": "string",
- "next_activity_type": "string",
- "next_activity_duration": "string",
- "next_activity_note": "string",
- "last_activity_id": 0,
- "last_activity_date": "string",
- "active_flag": true,
- "created_by_user_id": 0,
- "add_time": "2019-08-24T14:15:22Z",
- "update_time": "2019-08-24T14:15:22Z",
- "last_updated_by_user_id": 0,
- "name": "string",
- "last_incoming_mail_time": "string",
- "last_outgoing_mail_time": "string",
- "pipeline_id": 0,
- "stage_id": 0,
- "status": "string",
- "currency": "string",
- "value": 0,
- "stage_change_time": "string",
- "probability": 0,
- "lost_reason": "string",
- "close_time": "string",
- "won_time": "string",
- "first_won_time": "string",
- "lost_time": "string",
- "expected_close_date": "2019-08-24",
- "person_hidden": true,
- "org_name": "string",
- "owner_name": "string",
- "person_name": "string",
- "weighted_value_formatted": "string",
- "weighted_value": 0,
- "stage_order_nbr": 0,
- "value_formatted": "string",
- "weighted_value_currency": "string",
- "rotten_time": "string"
}
], - "additional_data": {
- "pagination": {
- "start": 0,
- "limit": 0,
- "more_items_in_collection": true,
- "next_start": 0
}
}, - "related_objects": {
- "user": {
- "USER_ID": {
- "active_flag": true,
- "created_by_user_id": 0,
- "add_time": "2019-08-24T14:15:22Z",
- "update_time": "2019-08-24T14:15:22Z",
- "last_updated_by_user_id": 0,
- "email": "string",
- "id": "string",
- "name": "string"
}
}, - "person": {
- "PERSON_ID": {
- "id": 0,
- "name": "string",
- "email": [
- {
- "value": "string",
- "primary": true,
- "label": "string"
}
], - "phone": [
- {
- "value": "string",
- "primary": true,
- "label": "string"
}
], - "owner_id": 0
}
}, - "organization": {
- "ORGANIZATION_ID": {
- "id": 0,
- "address": "string",
- "name": "string",
- "people_count": 0,
- "owner_id": 0
}
}, - "stage": {
- "active_flag": true,
- "created_by_user_id": 0,
- "add_time": "2019-08-24T14:15:22Z",
- "update_time": "2019-08-24T14:15:22Z",
- "last_updated_by_user_id": 0,
- "order_nbr": 0,
- "pipeline_id": 0,
- "name": "string",
- "id": 0
}, - "pipeline": {
- "order_nbr": 0,
- "active_flag": true,
- "created_by_user_id": 0,
- "add_time": "2019-08-24T14:15:22Z",
- "update_time": "2019-08-24T14:15:22Z",
- "last_updated_by_user_id": 0,
- "deal_probability": 0,
- "name": "string",
- "id": 0
}
}
}
Add a deal
Adds a new deal. All deals created through the Pipedrive API will have a origin
set to API
. Note that you can supply additional custom fields along with the request that are not described here. These custom fields are different for each Pipedrive account and can be recognized by long hashes as keys. To determine which custom fields exists, fetch the dealFields and look for key
values. For more information, see the tutorial for adding a deal.
Authorizations:
Request Body schema: application/json
name | string The name of the deal |
origin_id | string or null The optional ID to further distinguish the origin of the deal - e.g. Which API integration created this deal. If omitted, |
channel | integer or null The ID of Marketing channel this deal was created from. Provided value must be one of the channels configured for your company. You can fetch allowed values with GET /v1/dealFields If omitted, channel will be set to null. |
channel_id | string or null The optional ID to further distinguish the Marketing channel. If omitted, |
add_time | string The optional creation date & time of the Item in UTC. Can be set in the past or in the future. Requires admin user API token. Format: YYYY-MM-DD HH:MM:SS |
value | string The value of the deal. If omitted, value will be set to 0. |
currency | string The currency of the deal. Accepts a 3-character currency code. Adding a new Deal: if omitted, currency will be set to the default currency of the authorized user. |
user_id | integer The ID of the user which will be the owner of the created deal. Adding a new Deal: If not provided, the user making the request will be used. |
person_id | integer The ID of a person which this deal will be linked to. If the person does not exist yet, it needs to be created first. Adding a new Deal: This property is required unless |
org_id | integer The ID of an organization which this deal will be linked to. If the organization does not exist yet, it needs to be created first. Adding a new Deal: This property is required unless |
pipeline_id | integer The ID of the pipeline this deal will be added to. By default, the deal will be added to the first stage of the specified pipeline. Please note that |
stage_id | integer The ID of the stage this deal will be added to. Please note that a pipeline will be assigned automatically based on the |
status | string Enum: "open" "won" "lost" "deleted" open = Open, won = Won, lost = Lost, deleted = Deleted. Adding a new Deal: If omitted, status will be set to open. |
won_time | string The optional date and time of changing the deal status as won in UTC. Format: YYYY-MM-DD HH:MM:SS. Can be set only when deal |
lost_time | string The optional date and time of changing the deal status as lost in UTC. Format: YYYY-MM-DD HH:MM:SS. Can be set only when deal |
close_time | string or null The optional date and time of closing the deal in UTC. Format: YYYY-MM-DD HH:MM:SS. |
expected_close_date | string <date> The expected close date of the deal. In ISO 8601 format: YYYY-MM-DD. |
probability | number The success probability percentage of the deal. Used/shown only when |
lost_reason | string The optional message about why the deal was lost (to be used when status = lost) |
Responses
Request samples
- Payload
{- "name": "string",
- "origin_id": "string",
- "channel": 0,
- "channel_id": "string",
- "add_time": "string",
- "value": "string",
- "currency": "string",
- "user_id": 0,
- "person_id": 0,
- "org_id": 0,
- "pipeline_id": 0,
- "stage_id": 0,
- "status": "open",
- "won_time": "string",
- "lost_time": "string",
- "close_time": "string",
- "expected_close_date": "2019-08-24",
- "probability": 0,
- "lost_reason": "string"
}
Response samples
- 201
{- "success": true,
- "data": {
- "id": "string",
- "creator_user_id": {
- "active_flag": true,
- "created_by_user_id": 0,
- "add_time": "2019-08-24T14:15:22Z",
- "update_time": "2019-08-24T14:15:22Z",
- "last_updated_by_user_id": 0,
- "email": "string",
- "id": "string",
- "name": "string",
- "value": 0
}, - "user_id": {
- "active_flag": true,
- "created_by_user_id": 0,
- "add_time": "2019-08-24T14:15:22Z",
- "update_time": "2019-08-24T14:15:22Z",
- "last_updated_by_user_id": 0,
- "email": "string",
- "id": "string",
- "name": "string",
- "value": 0
}, - "person_id": {
- "name": "string",
- "email": [
- {
- "value": "string",
- "primary": true,
- "label": "string"
}
], - "phone": [
- {
- "value": "string",
- "primary": true,
- "label": "string"
}
], - "owner_id": 0,
- "value": 0
}, - "org_id": {
- "address": "string",
- "name": "string",
- "people_count": 0,
- "owner_id": 0,
- "value": 0
}, - "next_activity_date": "string",
- "next_activity_time": "string",
- "next_activity_id": 0,
- "next_activity_subject": "string",
- "next_activity_type": "string",
- "next_activity_duration": "string",
- "next_activity_note": "string",
- "last_activity_id": 0,
- "last_activity_date": "string",
- "active_flag": true,
- "created_by_user_id": 0,
- "add_time": "2019-08-24T14:15:22Z",
- "update_time": "2019-08-24T14:15:22Z",
- "last_updated_by_user_id": 0,
- "name": "string",
- "last_incoming_mail_time": "string",
- "last_outgoing_mail_time": "string",
- "pipeline_id": 0,
- "stage_id": 0,
- "status": "string",
- "currency": "string",
- "value": 0,
- "stage_change_time": "string",
- "probability": 0,
- "lost_reason": "string",
- "close_time": "string",
- "won_time": "string",
- "first_won_time": "string",
- "lost_time": "string",
- "expected_close_date": "2019-08-24",
- "person_hidden": true,
- "org_name": "string",
- "owner_name": "string",
- "person_name": "string",
- "weighted_value_formatted": "string",
- "weighted_value": 0,
- "stage_order_nbr": 0,
- "value_formatted": "string",
- "weighted_value_currency": "string",
- "rotten_time": "string"
}, - "related_objects": {
- "user": {
- "USER_ID": {
- "active_flag": true,
- "created_by_user_id": 0,
- "add_time": "2019-08-24T14:15:22Z",
- "update_time": "2019-08-24T14:15:22Z",
- "last_updated_by_user_id": 0,
- "email": "string",
- "id": "string",
- "name": "string"
}
}, - "person": {
- "PERSON_ID": {
- "id": 0,
- "name": "string",
- "email": [
- {
- "value": "string",
- "primary": true,
- "label": "string"
}
], - "phone": [
- {
- "value": "string",
- "primary": true,
- "label": "string"
}
], - "owner_id": 0
}
}, - "organization": {
- "ORGANIZATION_ID": {
- "id": 0,
- "address": "string",
- "name": "string",
- "people_count": 0,
- "owner_id": 0
}
}, - "stage": {
- "active_flag": true,
- "created_by_user_id": 0,
- "add_time": "2019-08-24T14:15:22Z",
- "update_time": "2019-08-24T14:15:22Z",
- "last_updated_by_user_id": 0,
- "order_nbr": 0,
- "pipeline_id": 0,
- "name": "string",
- "id": 0
}, - "pipeline": {
- "order_nbr": 0,
- "active_flag": true,
- "created_by_user_id": 0,
- "add_time": "2019-08-24T14:15:22Z",
- "update_time": "2019-08-24T14:15:22Z",
- "last_updated_by_user_id": 0,
- "deal_probability": 0,
- "name": "string",
- "id": 0
}
}
}
Delete multiple deals in bulk
Marks multiple deals as deleted. After 30 days, the deals will be permanently deleted.
Authorizations:
query Parameters
ids required | string The comma-separated IDs that will be deleted |
Responses
Response samples
- 200
{- "success": true,
- "data": {
- "id": [
- 0
]
}
}
Search deals
Searches all deals by title, notes and/or custom fields. This endpoint is a wrapper of /v1/itemSearch with a narrower OAuth scope. Found deals can be filtered by the person ID and the organization ID.
Authorizations:
query Parameters
term required | string The search term to look for. Minimum 2 characters (or 1 if using |
fields | string Enum: "custom_fields" "notes" "title" 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: |
exact_match | boolean When enabled, only full exact matches against the given term are returned. It is not case sensitive. |
person_id | integer Will filter deals by the provided person ID. The upper limit of found deals associated with the person is 2000. |
organization_id | integer Will filter items by the provided organization ID. The upper limit of found items associated with the organization is 2000. |
status | string Default: "all_not_deleted" Enum: "open" "won" "lost" "deleted" "all_not_deleted" 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. The upper limit of found deals associated with the status is 2000. |
start | integer Default: 0 For pagination, the position that represents the first result for the page. Note that the pagination is based on main results and does not include related items when using |
limit | integer <int32> >= 1 Default: 100 Example: limit=100 Limits the number of returned results. If not provided, 100 items will be returned. |
Responses
Response samples
- 200
{- "success": true,
- "data": {
- "items": [
- {
- "result_score": 0,
- "item": {
- "id": 0,
- "type": "string",
- "name": "string",
- "owner": {
- "id": "string"
}, - "custom_fields": [
- "string"
], - "notes": [
- "string"
], - "organization": {
- "id": 0,
- "name": "string"
}, - "person": {
- "id": 0,
- "name": "string"
}, - "status": "string",
- "currency": "string",
- "value": 0,
- "stage": {
- "id": 0,
- "name": "string"
}
}
}
]
}, - "additional_data": {
- "pagination": {
- "start": 0,
- "limit": 0,
- "more_items_in_collection": true,
- "next_start": 0
}
}
}
Get deals summary
Returns a summary of all the deals.
Authorizations:
query Parameters
filter_id | integer
|
user_id | integer If supplied, only deals matching the given user will be returned. However, |
stage_id | integer If supplied, only deals within the given stage will be returned |
Responses
Response samples
- 200
{- "success": true,
- "data": {
- "total_count": 0,
- "values_total": {
- "value": 0,
- "count": 0,
- "value_converted": 0,
- "value_formatted": "string",
- "value_converted_formatted": "string"
}, - "weighted_values_total": {
- "value": 0,
- "count": 0,
- "value_formatted": "string"
}, - "total_currency_converted_value": 0,
- "total_weighted_currency_converted_value": 0,
- "total_currency_converted_value_formatted": "string",
- "total_weighted_currency_converted_value_formatted": "string"
}
}
Get deals timeline Deprecated
Returns open and won deals, grouped by a defined interval of time set in a date-type dealField (field_key
) - e.g. when month is the chosen interval, and 3 months are asked starting from January 1st, 2023, deals are returned grouped into 3 groups - January, February and March - based on the value of the given field_key
.
Authorizations:
query Parameters
start_date required | string <date> The date when the first interval starts. Format: YYYY-MM-DD. | ||||||||||
interval required | string Enum: "day" "week" "month" "quarter" The type of the interval
| ||||||||||
amount required | integer The number of given intervals, starting from | ||||||||||
field_key required | string The date field key which deals will be retrieved from | ||||||||||
user_id | integer If supplied, only deals matching the given user will be returned. However, | ||||||||||
pipeline_id | integer If supplied, only deals matching the given pipeline will be returned | ||||||||||
filter_id | integer The ID of the filter to use (will narrow down results if used together with | ||||||||||
exclude_deals | number (excludeNumberBoolean) Enum: 0 1 Whether to exclude deals list (1) or not (0). Note that when deals are excluded, the timeline summary (counts and values) is still returned. | ||||||||||
totals_convert_currency | string The 3-letter currency code of any of the supported currencies. When supplied, |
Responses
Response samples
- 200
{- "success": true,
- "data": {
- "period_start": "string",
- "period_end": "string",
- "deals": [
- {
- "created_by_user_id": 0,
- "id": "string",
- "user_id": "string",
- "org_id": 0,
- "person_id": 0,
- "next_activity_date": "string",
- "next_activity_time": "string",
- "next_activity_id": 0,
- "next_activity_subject": "string",
- "next_activity_type": "string",
- "next_activity_duration": "string",
- "next_activity_note": "string",
- "last_activity_id": 0,
- "last_activity_date": "string",
- "active_flag": true,
- "add_time": "2019-08-24T14:15:22Z",
- "update_time": "2019-08-24T14:15:22Z",
- "last_updated_by_user_id": 0,
- "name": "string",
- "last_incoming_mail_time": "string",
- "last_outgoing_mail_time": "string",
- "pipeline_id": 0,
- "stage_id": 0,
- "status": "string",
- "currency": "string",
- "value": 0,
- "stage_change_time": "string",
- "probability": 0,
- "lost_reason": "string",
- "close_time": "string",
- "won_time": "string",
- "first_won_time": "string",
- "lost_time": "string",
- "expected_close_date": "2019-08-24",
- "person_hidden": true,
- "org_name": "string",
- "owner_name": "string",
- "person_name": "string",
- "weighted_value_formatted": "string",
- "weighted_value": 0,
- "stage_order_nbr": 0,
- "value_formatted": "string",
- "weighted_value_currency": "string",
- "rotten_time": "string"
}
], - "totals": {
- "count": 0,
- "values": { },
- "weighted_values": { },
- "open_count": 0,
- "open_values": { },
- "weighted_open_values": { },
- "won_count": 0,
- "won_values": { }
}
}
}
Get details of a deal
Returns the details of a specific deal. Note that this also returns some additional fields which are not present when asking for all deals – such as deal age and stay in pipeline stages. Also note that custom fields appear as long hashes in the resulting data. These hashes can be mapped against the key
value of dealFields. For more information, see the tutorial for getting details of a deal.
Authorizations:
path Parameters
id required | integer The ID of the Entity we want to retrieve. |
Responses
Response samples
- 200
{- "success": true,
- "data": {
- "id": "string",
- "creator_user_id": {
- "active_flag": true,
- "created_by_user_id": 0,
- "add_time": "2019-08-24T14:15:22Z",
- "update_time": "2019-08-24T14:15:22Z",
- "last_updated_by_user_id": 0,
- "email": "string",
- "id": "string",
- "name": "string",
- "value": 0
}, - "user_id": {
- "active_flag": true,
- "created_by_user_id": 0,
- "add_time": "2019-08-24T14:15:22Z",
- "update_time": "2019-08-24T14:15:22Z",
- "last_updated_by_user_id": 0,
- "email": "string",
- "id": "string",
- "name": "string",
- "value": 0
}, - "person_id": {
- "name": "string",
- "email": [
- {
- "value": "string",
- "primary": true,
- "label": "string"
}
], - "phone": [
- {
- "value": "string",
- "primary": true,
- "label": "string"
}
], - "owner_id": 0,
- "value": 0
}, - "org_id": {
- "address": "string",
- "name": "string",
- "people_count": 0,
- "owner_id": 0,
- "value": 0
}, - "next_activity_date": "string",
- "next_activity_time": "string",
- "next_activity_id": 0,
- "next_activity_subject": "string",
- "next_activity_type": "string",
- "next_activity_duration": "string",
- "next_activity_note": "string",
- "last_activity_id": 0,
- "last_activity_date": "string",
- "active_flag": true,
- "created_by_user_id": 0,
- "add_time": "2019-08-24T14:15:22Z",
- "update_time": "2019-08-24T14:15:22Z",
- "last_updated_by_user_id": 0,
- "name": "string",
- "last_incoming_mail_time": "string",
- "last_outgoing_mail_time": "string",
- "pipeline_id": 0,
- "stage_id": 0,
- "status": "string",
- "currency": "string",
- "value": 0,
- "stage_change_time": "string",
- "probability": 0,
- "lost_reason": "string",
- "close_time": "string",
- "won_time": "string",
- "first_won_time": "string",
- "lost_time": "string",
- "expected_close_date": "2019-08-24",
- "person_hidden": true,
- "org_name": "string",
- "owner_name": "string",
- "person_name": "string",
- "weighted_value_formatted": "string",
- "weighted_value": 0,
- "stage_order_nbr": 0,
- "value_formatted": "string",
- "weighted_value_currency": "string",
- "rotten_time": "string",
- "average_time_to_won": {
- "y": 0,
- "m": 0,
- "d": 0,
- "h": 0,
- "i": 20,
- "s": 48,
- "total_seconds": 1249
}, - "average_stage_progress": 0,
- "age": {
- "y": 0,
- "m": 0,
- "d": 0,
- "h": 0,
- "i": 0,
- "s": 0,
- "total_seconds": 0
}, - "stay_in_pipeline_stages": {
- "times_in_stages": { },
- "order_of_stages": [
- 0
]
}, - "last_activity": { },
- "next_activity": { }
}, - "additional_data": { },
- "related_objects": {
- "user": {
- "USER_ID": {
- "active_flag": true,
- "created_by_user_id": 0,
- "add_time": "2019-08-24T14:15:22Z",
- "update_time": "2019-08-24T14:15:22Z",
- "last_updated_by_user_id": 0,
- "email": "string",
- "id": "string",
- "name": "string"
}
}, - "person": {
- "PERSON_ID": {
- "id": 0,
- "name": "string",
- "email": [
- {
- "value": "string",
- "primary": true,
- "label": "string"
}
], - "phone": [
- {
- "value": "string",
- "primary": true,
- "label": "string"
}
], - "owner_id": 0
}
}, - "organization": {
- "ORGANIZATION_ID": {
- "id": 0,
- "address": "string",
- "name": "string",
- "people_count": 0,
- "owner_id": 0
}
}, - "stage": {
- "active_flag": true,
- "created_by_user_id": 0,
- "add_time": "2019-08-24T14:15:22Z",
- "update_time": "2019-08-24T14:15:22Z",
- "last_updated_by_user_id": 0,
- "order_nbr": 0,
- "pipeline_id": 0,
- "name": "string",
- "id": 0
}, - "pipeline": {
- "order_nbr": 0,
- "active_flag": true,
- "created_by_user_id": 0,
- "add_time": "2019-08-24T14:15:22Z",
- "update_time": "2019-08-24T14:15:22Z",
- "last_updated_by_user_id": 0,
- "deal_probability": 0,
- "name": "string",
- "id": 0
}
}
}
Update a deal
Updates the properties of a deal. For more information, see the tutorial for updating a deal.
Authorizations:
path Parameters
id required | integer The ID of the Entity we want to retrieve. |
Request Body schema: application/json
name | string The name of the deal |
origin_id | string or null The optional ID to further distinguish the origin of the deal - e.g. Which API integration created this deal. If omitted, |
channel | integer or null The ID of Marketing channel this deal was created from. Provided value must be one of the channels configured for your company. You can fetch allowed values with GET /v1/dealFields If omitted, channel will be set to null. |
channel_id | string or null The optional ID to further distinguish the Marketing channel. If omitted, |
add_time | string The optional creation date & time of the Item in UTC. Can be set in the past or in the future. Requires admin user API token. Format: YYYY-MM-DD HH:MM:SS |
value | string The value of the deal. If omitted, value will be set to 0. |
currency | string The currency of the deal. Accepts a 3-character currency code. Adding a new Deal: if omitted, currency will be set to the default currency of the authorized user. |
user_id | integer The ID of the user which will be the owner of the created deal. Adding a new Deal: If not provided, the user making the request will be used. |
person_id | integer The ID of a person which this deal will be linked to. If the person does not exist yet, it needs to be created first. Adding a new Deal: This property is required unless |
org_id | integer The ID of an organization which this deal will be linked to. If the organization does not exist yet, it needs to be created first. Adding a new Deal: This property is required unless |
pipeline_id | integer The ID of the pipeline this deal will be added to. By default, the deal will be added to the first stage of the specified pipeline. Please note that |
stage_id | integer The ID of the stage this deal will be added to. Please note that a pipeline will be assigned automatically based on the |
status | string Enum: "open" "won" "lost" "deleted" open = Open, won = Won, lost = Lost, deleted = Deleted. Adding a new Deal: If omitted, status will be set to open. |
won_time | string The optional date and time of changing the deal status as won in UTC. Format: YYYY-MM-DD HH:MM:SS. Can be set only when deal |
lost_time | string The optional date and time of changing the deal status as lost in UTC. Format: YYYY-MM-DD HH:MM:SS. Can be set only when deal |
close_time | string or null The optional date and time of closing the deal in UTC. Format: YYYY-MM-DD HH:MM:SS. |
expected_close_date | string <date> The expected close date of the deal. In ISO 8601 format: YYYY-MM-DD. |
probability | number The success probability percentage of the deal. Used/shown only when |
lost_reason | string The optional message about why the deal was lost (to be used when status = lost) |
Responses
Request samples
- Payload
{- "name": "string",
- "origin_id": "string",
- "channel": 0,
- "channel_id": "string",
- "add_time": "string",
- "value": "string",
- "currency": "string",
- "user_id": 0,
- "person_id": 0,
- "org_id": 0,
- "pipeline_id": 0,
- "stage_id": 0,
- "status": "open",
- "won_time": "string",
- "lost_time": "string",
- "close_time": "string",
- "expected_close_date": "2019-08-24",
- "probability": 0,
- "lost_reason": "string"
}
Response samples
- 200
{- "success": true,
- "data": {
- "id": "string",
- "creator_user_id": {
- "active_flag": true,
- "created_by_user_id": 0,
- "add_time": "2019-08-24T14:15:22Z",
- "update_time": "2019-08-24T14:15:22Z",
- "last_updated_by_user_id": 0,
- "email": "string",
- "id": "string",
- "name": "string",
- "value": 0
}, - "user_id": {
- "active_flag": true,
- "created_by_user_id": 0,
- "add_time": "2019-08-24T14:15:22Z",
- "update_time": "2019-08-24T14:15:22Z",
- "last_updated_by_user_id": 0,
- "email": "string",
- "id": "string",
- "name": "string",
- "value": 0
}, - "person_id": {
- "name": "string",
- "email": [
- {
- "value": "string",
- "primary": true,
- "label": "string"
}
], - "phone": [
- {
- "value": "string",
- "primary": true,
- "label": "string"
}
], - "owner_id": 0,
- "value": 0
}, - "org_id": {
- "address": "string",
- "name": "string",
- "people_count": 0,
- "owner_id": 0,
- "value": 0
}, - "next_activity_date": "string",
- "next_activity_time": "string",
- "next_activity_id": 0,
- "next_activity_subject": "string",
- "next_activity_type": "string",
- "next_activity_duration": "string",
- "next_activity_note": "string",
- "last_activity_id": 0,
- "last_activity_date": "string",
- "active_flag": true,
- "created_by_user_id": 0,
- "add_time": "2019-08-24T14:15:22Z",
- "update_time": "2019-08-24T14:15:22Z",
- "last_updated_by_user_id": 0,
- "name": "string",
- "last_incoming_mail_time": "string",
- "last_outgoing_mail_time": "string",
- "pipeline_id": 0,
- "stage_id": 0,
- "status": "string",
- "currency": "string",
- "value": 0,
- "stage_change_time": "string",
- "probability": 0,
- "lost_reason": "string",
- "close_time": "string",
- "won_time": "string",
- "first_won_time": "string",
- "lost_time": "string",
- "expected_close_date": "2019-08-24",
- "person_hidden": true,
- "org_name": "string",
- "owner_name": "string",
- "person_name": "string",
- "weighted_value_formatted": "string",
- "weighted_value": 0,
- "stage_order_nbr": 0,
- "value_formatted": "string",
- "weighted_value_currency": "string",
- "rotten_time": "string"
}, - "related_objects": {
- "user": {
- "USER_ID": {
- "active_flag": true,
- "created_by_user_id": 0,
- "add_time": "2019-08-24T14:15:22Z",
- "update_time": "2019-08-24T14:15:22Z",
- "last_updated_by_user_id": 0,
- "email": "string",
- "id": "string",
- "name": "string"
}
}, - "person": {
- "PERSON_ID": {
- "id": 0,
- "name": "string",
- "email": [
- {
- "value": "string",
- "primary": true,
- "label": "string"
}
], - "phone": [
- {
- "value": "string",
- "primary": true,
- "label": "string"
}
], - "owner_id": 0
}
}, - "organization": {
- "ORGANIZATION_ID": {
- "id": 0,
- "address": "string",
- "name": "string",
- "people_count": 0,
- "owner_id": 0
}
}, - "stage": {
- "active_flag": true,
- "created_by_user_id": 0,
- "add_time": "2019-08-24T14:15:22Z",
- "update_time": "2019-08-24T14:15:22Z",
- "last_updated_by_user_id": 0,
- "order_nbr": 0,
- "pipeline_id": 0,
- "name": "string",
- "id": 0
}, - "pipeline": {
- "order_nbr": 0,
- "active_flag": true,
- "created_by_user_id": 0,
- "add_time": "2019-08-24T14:15:22Z",
- "update_time": "2019-08-24T14:15:22Z",
- "last_updated_by_user_id": 0,
- "deal_probability": 0,
- "name": "string",
- "id": 0
}
}
}
List activities associated with a deal
Lists activities associated with a deal.
Authorizations:
path Parameters
id required | integer The ID of the Entity we want to retrieve. |
query Parameters
start | integer Default: 0 For pagination, the position that represents the first result for the page. |
limit | integer <int32> >= 1 Default: 100 Example: limit=100 Limits the number of returned results. If not provided, 100 items will be returned. |
done | number (doneNumberBoolean) Enum: 0 1 Whether the activity is done or not. 0 = Not done, 1 = Done. If omitted, returns both Done and Not done activities. |
exclude | string A comma-separated string of activity IDs to exclude from result |
Responses
Response samples
- 200
{- "success": true,
- "data": [
- {
- "person_id": 0,
- "deal_id": 0,
- "org_id": 0,
- "due_date": "2019-08-24",
- "due_time": "string",
- "duration": "string",
- "active_flag": true,
- "created_by_user_id": 0,
- "add_time": "2019-08-24T14:15:22Z",
- "update_time": "2019-08-24T14:15:22Z",
- "last_updated_by_user_id": 0,
- "org_name": "string",
- "person_name": "string",
- "owner_name": "string",
- "deal_name": "string",
- "company_id": 0,
- "id": 0,
- "done": 0,
- "subject": "string",
- "type": "string",
- "assigned_to_user_id": 0,
- "user_id": 0,
- "participants": [
- { }
], - "marked_as_done_time": "string"
}
], - "additional_data": {
- "pagination": {
- "start": 0,
- "limit": 0,
- "more_items_in_collection": true,
- "next_start": 0
}
}, - "related_objects": {
- "user": {
- "USER_ID": {
- "active_flag": true,
- "created_by_user_id": 0,
- "add_time": "2019-08-24T14:15:22Z",
- "update_time": "2019-08-24T14:15:22Z",
- "last_updated_by_user_id": 0,
- "email": "string",
- "id": "string",
- "name": "string"
}
}, - "person": {
- "PERSON_ID": {
- "id": 0,
- "name": "string",
- "email": [
- {
- "value": "string",
- "primary": true,
- "label": "string"
}
], - "phone": [
- {
- "value": "string",
- "primary": true,
- "label": "string"
}
], - "owner_id": 0
}
}, - "organization": {
- "ORGANIZATION_ID": {
- "id": 0,
- "address": "string",
- "name": "string",
- "people_count": 0,
- "owner_id": 0
}
}, - "deal": {
- "DEAL_ID": {
- "stage_id": 0,
- "pipeline_id": 0,
- "currency": "string",
- "value": 0,
- "id": 0,
- "name": "string",
- "status": "string"
}
}
}
}
List updates about a deal
Lists updates about a deal.
Authorizations:
path Parameters
id required | integer The ID of the Entity we want to retrieve. |
query Parameters
start | integer Default: 0 For pagination, the position that represents the first result for the page. |
limit | integer <int32> >= 1 Default: 100 Example: limit=100 Limits the number of returned results. If not provided, 100 items will be returned. |
all_changes | string Whether to show custom field updates or not. 1 = Include custom field changes. If omitted, returns changes without custom field updates. |
items | string A comma-separated string for filtering out item specific updates. (Possible values - activity, note, deal, dealChange, personChange, organizationChange). |
Responses
Response samples
- 200
{- "success": true,
- "data": [
- {
- "object": "string",
- "timestamp": "string",
- "data": { }
}
], - "additional_data": {
- "pagination": {
- "start": 0,
- "limit": 0,
- "more_items_in_collection": true,
- "next_start": 0
}
}, - "related_objects": {
- "user": {
- "USER_ID": {
- "active_flag": true,
- "created_by_user_id": 0,
- "add_time": "2019-08-24T14:15:22Z",
- "update_time": "2019-08-24T14:15:22Z",
- "last_updated_by_user_id": 0,
- "email": "string",
- "id": "string",
- "name": "string"
}
}, - "person": {
- "PERSON_ID": {
- "id": 0,
- "name": "string",
- "email": [
- {
- "value": "string",
- "primary": true,
- "label": "string"
}
], - "phone": [
- {
- "value": "string",
- "primary": true,
- "label": "string"
}
], - "owner_id": 0
}
}, - "organization": {
- "ORGANIZATION_ID": {
- "id": 0,
- "address": "string",
- "name": "string",
- "people_count": 0,
- "owner_id": 0
}
}, - "deal": {
- "DEAL_ID": {
- "stage_id": 0,
- "pipeline_id": 0,
- "currency": "string",
- "value": 0,
- "id": 0,
- "name": "string",
- "status": "string"
}
}
}
}
List all persons associated with a deal
Lists all persons associated with a deal, regardless of whether the person is the primary contact of the deal, or added as a participant.
Authorizations:
path Parameters
id required | integer The ID of the Entity we want to retrieve. |
query Parameters
start | integer Default: 0 For pagination, the position that represents the first result for the page. |
limit | integer <int32> >= 1 Default: 100 Example: limit=100 Limits the number of returned results. If not provided, 100 items will be returned. |
Responses
Response samples
- 200
{- "success": true,
- "data": [
- {
- "phone": [
- {
- "value": "string",
- "primary": true,
- "label": "string"
}
], - "email": [
- {
- "value": "string",
- "primary": true,
- "label": "string"
}
], - "company_id": 0,
- "active_flag": true,
- "created_by_user_id": 0,
- "add_time": "2019-08-24T14:15:22Z",
- "update_time": "2019-08-24T14:15:22Z",
- "last_updated_by_user_id": 0,
- "org_name": "string",
- "person_name": "string",
- "owner_name": "string",
- "first_char": "string",
- "id": 0,
- "label": "string",
- "name": "string",
- "first_name": "string",
- "last_name": "string",
- "owner_id": {
- "active_flag": true,
- "created_by_user_id": 0,
- "add_time": "2019-08-24T14:15:22Z",
- "update_time": "2019-08-24T14:15:22Z",
- "last_updated_by_user_id": 0,
- "email": "string",
- "id": "string",
- "name": "string",
- "value": 0
}, - "org_id": {
- "address": "string",
- "name": "string",
- "people_count": 0,
- "owner_id": 0,
- "value": 0,
- "active_flag": true
}
}
], - "additional_data": {
- "pagination": {
- "start": 0,
- "limit": 0,
- "more_items_in_collection": true,
- "next_start": 0
}
}, - "related_objects": {
- "user": {
- "USER_ID": {
- "active_flag": true,
- "created_by_user_id": 0,
- "add_time": "2019-08-24T14:15:22Z",
- "update_time": "2019-08-24T14:15:22Z",
- "last_updated_by_user_id": 0,
- "email": "string",
- "id": "string",
- "name": "string"
}
}, - "person": {
- "PERSON_ID": {
- "id": 0,
- "name": "string",
- "email": [
- {
- "value": "string",
- "primary": true,
- "label": "string"
}
], - "phone": [
- {
- "value": "string",
- "primary": true,
- "label": "string"
}
], - "owner_id": 0
}
}
}
}
List products attached to a deal
Lists products attached to a deal.
Authorizations:
path Parameters
id required | integer The ID of the Entity we want to retrieve. |
query Parameters
start | integer Default: 0 For pagination, the position that represents the first result for the page. |
limit | integer <int32> >= 1 Default: 100 Example: limit=100 Limits the number of returned results. If not provided, 100 items will be returned. |
include_product_data | number (queryNumberBoolean) Enum: 0 1 Whether to fetch product data along with each attached product (1) or not (0, default) |
Responses
Response samples
- 200
{- "success": true,
- "data": [
- {
- "company_id": 0,
- "product_id": 0,
- "duration_unit": "hourly",
- "tax": 0,
- "active_flag": true,
- "created_by_user_id": 0,
- "add_time": "2019-08-24T14:15:22Z",
- "update_time": "2019-08-24T14:15:22Z",
- "last_updated_by_user_id": 0,
- "id": 0,
- "name": "string",
- "deal_id": 0,
- "sum": 0,
- "currency": "string",
- "last_edit": "string",
- "discount": 0,
- "discount_type": "percentage",
- "product_variation_id": 0,
- "duration": 1,
- "quantity": 0,
- "item_price": 0,
- "comments": "string",
- "tax_method": "exclusive",
- "enabled_flag": true,
- "order_nbr": 0,
- "sum_formatted": "string",
- "quantity_formatted": "string",
- "product": {
- "name": "string",
- "active_flag": true,
- "code": "string",
- "prices": [
- { }
], - "unit": "string",
- "tax": 0,
- "selectable": true,
- "id": 0,
- "owner_id": {
- "active_flag": true,
- "created_by_user_id": 0,
- "add_time": "2019-08-24T14:15:22Z",
- "update_time": "2019-08-24T14:15:22Z",
- "last_updated_by_user_id": 0,
- "email": "string",
- "id": "string",
- "name": "string",
- "value": 0
}
}
}
], - "additional_data": {
- "products_quantity_total": 0,
- "products_sum_total": 0,
- "products_quantity_total_formatted": "string",
- "products_sum_total_formatted": "string",
- "pagination": {
- "start": 0,
- "limit": 0,
- "more_items_in_collection": true,
- "next_start": 0
}
}, - "related_objects": {
- "user": {
- "USER_ID": {
- "active_flag": true,
- "created_by_user_id": 0,
- "add_time": "2019-08-24T14:15:22Z",
- "update_time": "2019-08-24T14:15:22Z",
- "last_updated_by_user_id": 0,
- "email": "string",
- "id": "string",
- "name": "string"
}
}
}
}
Add a product to a deal
Adds a product to a deal, creating a new item called a deal-product.
Authorizations:
path Parameters
id required | integer The ID of the Entity we want to retrieve. |
Request Body schema: application/json
product_id required | integer The ID of the product |
duration_unit | string (dealProductUnitDuration) Enum: "hourly" "daily" "weekly" "monthly" "yearly" The unit duration of the product |
tax | number Default: 0 The tax percentage |
duration | integer Default: 1 The duration of the product |
discount | number Default: 0 The value of the discount. The |
discount_type | string Default: "percentage" Enum: "percentage" "amount" The type of the discount's value |
product_variation_id | integer or null The ID of the product variation. When omitted, no variation will be used |
tax_method | string Enum: "exclusive" "inclusive" "none" The tax option to be applied to the products.
When using |
enabled_flag | boolean Default: true Whether the product is enabled or not. This makes it possible to add products to a deal with a specific price and discount criteria, but keep them disabled, which refrains them from being included in the deal value calculation. When omitted, the product will be marked as enabled by default |
item_price required | number The price at which this product will be added to the deal |
quantity required | integer How many items of this product will be added to the deal |
comments | string A textual comment associated with this product-deal attachment |
Responses
Request samples
- Payload
{- "product_id": 0,
- "duration_unit": "hourly",
- "tax": 0,
- "duration": 1,
- "discount": 0,
- "discount_type": "percentage",
- "product_variation_id": 0,
- "tax_method": "exclusive",
- "enabled_flag": true,
- "item_price": 0,
- "quantity": 0,
- "comments": "string"
}
Response samples
- 200
{- "success": true,
- "data": {
- "product_id": 0,
- "duration_unit": "hourly",
- "tax": 0,
- "discount": 0,
- "discount_type": "percentage",
- "product_variation_id": 0,
- "duration": 1,
- "quantity": 0,
- "item_price": 0,
- "comments": "string",
- "tax_method": "exclusive",
- "enabled_flag": true,
- "company_id": 0,
- "active_flag": true,
- "created_by_user_id": 0,
- "add_time": "2019-08-24T14:15:22Z",
- "update_time": "2019-08-24T14:15:22Z",
- "last_updated_by_user_id": 0,
- "id": 0,
- "name": "string",
- "deal_id": 0,
- "sum": 0,
- "currency": "string",
- "last_edit": "string",
- "product_attachment_id": 0
}
}
Update the product attached to a deal
Updates the details of the product that has been attached to a deal.
Authorizations:
path Parameters
id required | integer The ID of the Entity we want to retrieve. |
product_attachment_id required | integer The ID of the deal-product (the ID of the product attached to the deal) |
Request Body schema: application/json
product_id | integer The ID of the product |
duration_unit | string (dealProductUnitDuration) Enum: "hourly" "daily" "weekly" "monthly" "yearly" The unit duration of the product |
tax | number Default: 0 The tax percentage |
duration | integer Default: 1 The duration of the product |
discount | number Default: 0 The value of the discount. The |
discount_type | string Default: "percentage" Enum: "percentage" "amount" The type of the discount's value |
product_variation_id | integer or null The ID of the product variation. When omitted, no variation will be used |
tax_method | string Enum: "exclusive" "inclusive" "none" The tax option to be applied to the products.
When using |
enabled_flag | boolean Default: true Whether the product is enabled or not. This makes it possible to add products to a deal with a specific price and discount criteria, but keep them disabled, which refrains them from being included in the deal value calculation. When omitted, the product will be marked as enabled by default |
item_price | number The price at which this product will be added to the deal |
quantity | integer How many items of this product will be added to the deal |
comments | string A textual comment associated with this product-deal attachment |
Responses
Request samples
- Payload
{- "product_id": 0,
- "duration_unit": "hourly",
- "tax": 0,
- "duration": 1,
- "discount": 0,
- "discount_type": "percentage",
- "product_variation_id": 0,
- "tax_method": "exclusive",
- "enabled_flag": true,
- "item_price": 0,
- "quantity": 0,
- "comments": "string"
}
Response samples
- 200
{- "success": true,
- "data": {
- "product_id": 0,
- "duration_unit": "hourly",
- "tax": 0,
- "discount": 0,
- "discount_type": "percentage",
- "product_variation_id": 0,
- "duration": 1,
- "quantity": 0,
- "item_price": 0,
- "comments": "string",
- "tax_method": "exclusive",
- "enabled_flag": true,
- "company_id": 0,
- "active_flag": true,
- "created_by_user_id": 0,
- "add_time": "2019-08-24T14:15:22Z",
- "update_time": "2019-08-24T14:15:22Z",
- "last_updated_by_user_id": 0,
- "id": 0,
- "name": "string",
- "deal_id": 0,
- "sum": 0,
- "currency": "string",
- "last_edit": "string"
}
}
Delete an attached product from a deal
Deletes a product attachment from a deal, using the product_attachment_id
.
Authorizations:
path Parameters
id required | integer The ID of the Entity we want to retrieve. |
product_attachment_id required | integer The ID of the deal-product (the ID of the product attached to the deal) |
Responses
Response samples
- 200
{- "success": true,
- "data": {
- "id": 0
}
}
Each filter is essentially a set of data validation conditions. A filter of the same kind can be applied when fetching a list of deals, persons, organizations or products in the context of a pipeline. Filters are limited to a maximum of 16 conditions. When applied, only items matching the conditions of the filter are returned. Detailed definitions of filter conditions and additional functionality is not yet available.
Get all filters
Returns data about all filters.
Authorizations:
query Parameters
type | string Enum: "deals" "org" "persons" "products" "activity" The types of filters to fetch |
Responses
Response samples
- 200
{- "success": true,
- "data": [
- {
- "active_flag": true,
- "created_by_user_id": 0,
- "add_time": "2019-08-24T14:15:22Z",
- "update_time": "2019-08-24T14:15:22Z",
- "last_updated_by_user_id": 0,
- "name": "string",
- "id": 0,
- "user_id": "string",
- "type": "deals"
}
]
}
Add a new filter
Adds a new filter, returns the ID upon success. Note that in the conditions JSON object only one first-level condition group is supported, and it must be glued with 'AND', and only two second level condition groups are supported of which one must be glued with 'AND' and the second with 'OR'. Other combinations do not work (yet) but the syntax supports introducing them in future. For more information, see the tutorial for adding a filter.
Authorizations:
Request Body schema: application/json
name required | string The name of the filter |
conditions required | object The conditions of the filter as a JSON object.
Please note that a maximum of 16 conditions is allowed per filter and |
type required | string Enum: "deals" "org" "persons" "products" "activity" The type of filter to create |
Responses
Request samples
- Payload
{- "name": "string",
- "conditions": { },
- "type": "deals"
}
Response samples
- 200
{- "success": true,
- "data": {
- "active_flag": true,
- "created_by_user_id": 0,
- "add_time": "2019-08-24T14:15:22Z",
- "update_time": "2019-08-24T14:15:22Z",
- "last_updated_by_user_id": 0,
- "name": "string",
- "id": 0,
- "user_id": "string",
- "type": "deals",
- "temporary_flag": true,
- "conditions": { }
}
}
Get all filter helpers
Returns all supported filter helpers. It helps to know what conditions and helpers are available when you want to add or update filters. For more information, see the tutorial for adding a filter.
Authorizations:
Responses
Response samples
- 200
{- "success": true,
- "data": { }
}
Get one filter
Returns data about a specific filter. Note that this also returns the condition lines of the filter.
Authorizations:
path Parameters
id required | integer The ID of the Entity we want to retrieve. |
Responses
Response samples
- 200
{- "success": true,
- "data": {
- "active_flag": true,
- "created_by_user_id": 0,
- "add_time": "2019-08-24T14:15:22Z",
- "update_time": "2019-08-24T14:15:22Z",
- "last_updated_by_user_id": 0,
- "name": "string",
- "id": 0,
- "user_id": "string",
- "type": "deals"
}
}
Update a filter
Updates an existing filter.
Authorizations:
path Parameters
id required | integer The ID of the Entity we want to retrieve. |
Request Body schema: application/json
name | string The name of the filter |
conditions required | object The conditions of the filter as a JSON object.
Please note that a maximum of 16 conditions is allowed per filter and |
Responses
Request samples
- Payload
{- "name": "string",
- "conditions": { }
}
Response samples
- 200
{- "success": true,
- "data": {
- "active_flag": true,
- "created_by_user_id": 0,
- "add_time": "2019-08-24T14:15:22Z",
- "update_time": "2019-08-24T14:15:22Z",
- "last_updated_by_user_id": 0,
- "name": "string",
- "id": 0,
- "user_id": "string",
- "type": "deals",
- "temporary_flag": true,
- "conditions": { }
}
}
Perform a search from multiple item types
Performs a search from your choice of item types and fields.
Authorizations:
query Parameters
item_types | string Enum: "deal" "person" "organization" "product" "lead" "file" "mail_attachment" "project" A comma-separated string array. The type of items to perform the search from. Defaults to all. | ||||||||||
fields | string Enum: "address" "code" "custom_fields" "email" "name" "notes" "organization_name" "person_name" "phone" "title" "description" A comma-separated string array. The fields to perform the search from. Defaults to all. Relevant for each item type are:
|
Only the following custom field types are searchable: `address`, `varchar`, `text`, and `phone`. Read more about searching by custom fields [here](../../kb/getting-started/search-finding-what-you-need#searching-by-custom-fields).
When enabled, the response will include up to 100 newest related leads and 100 newest related deals for each found person and organization and up to 100 newest related persons for each found organization
A comma-separated string array. Supports including optional fields in the results which are not provided by default.
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.
When enabled, only full exact matches against the given term are returned. It is not case sensitive.
For pagination, the position that represents the first result for the page. Note that the pagination is based on main results and does not include related items when using search_for_related_items
parameter.
Limits the number of returned results. If not provided, 100 items will be returned.
Responses
Response samples
- 200
{- "success": true,
- "data": {
- "items": [
- {
- "result_score": 0,
- "item": { }
}
], - "related_items": [
- {
- "result_score": 0,
- "item": { }
}
]
}, - "additional_data": {
- "pagination": {
- "start": 0,
- "limit": 0,
- "more_items_in_collection": true,
- "next_start": 0
}
}
}