Skip to content

Retrieves deal history.

Method get.deals_history
API version
Description Retrieves deal history.

Available to: Agents and clients

Request parameters

Name Type Required Description
access_token string yes Access token used to authenticate the request.
user_id number no Unique ID of the client user on whose behalf the agent is making the request. Required for agents. To retrieve a list of client users, use "get.customer_users".
limit number no Maximum number of records to return. See the "Paging" section.
offset number no Number of records to skip before returning results. Default: 0. See the "Paging" section.
filter object no Filtering criteria. See the "Filters" section.
fields array no Fields to include in the response. See the "Viewing returned data" section.
sort array no Sorting criteria. See the "Data sorting" section.

Response parameters

Name Type Filtering Sorting Description
ext_id string yes yes External deal ID.
name string yes Deal name.
created_date_time iso8601 yes yes Date and time when the deal was created.
closed_date_time iso8601 yes yes Date and time when the deal was closed.
modified_stage_date_time iso8601 yes yes Date and time when the deal entered the current stage.
contact_ext_ids array yes External IDs of contacts associated with the deal.
tag_ext_ids array yes External tag IDs.
main_contact_ext_id string yes yes External ID of the deal's primary contact.
employee_ext_id string yes External ID of the deal owner.
revenue number yes yes Deal revenue.
sales_funnel_ext_id string yes yes External sales funnel ID.
stage_ext_id string yes yes External sales funnel stage ID.
comments string no Comment about the deal.
source string yes yes Deal source.
is_generated boolean yes Whether the stage entry was generated automatically because it was missing from the uploaded history.
communication_id number yes yes Communication ID.
communication_type string yes yes Communication type.

Example request

{
  "jsonrpc":"2.0",
  "id":"number",
  "method":"get.deals_history",
  "params":{
    "access_token":"string",
    "user_id":"number",
    "offset":"number",
    "limit":"number",
    "filter":{
    },
    "sort":[
      {
        "field":"string",
        "order":"string"
      }
    ],
    "fields":[
      "string"
    ]
  }
}

Example response

{
    "jsonrpc": "2.0",
    "id": "number",
    "result": {
        "data": [
          {
              "ext_id": "string",
              "name": "string",
              "created_date_time": "iso8601",
              "closed_date_time": "iso8601",
              "modified_stage_date_time": "iso8601",
              "contact_ext_ids": [
                  "string"
              ],
              "tag_ext_ids": [
                  "string"
              ],
              "employee_ext_id": "string",
              "revenue": "number",
              "sales_funnel_ext_id": "string",
              "stage_ext_id": "string",
              "comments": "string",
              "source": "string",
              "is_generated": "boolean",
              "communication_id": "number",
              "communication_type": "string"
          }
        ],
        "metadata": "object"
    }
}

Possible errors

See the "Errors for get methods" section.