List Activities (Search)¶
POST https://api.copper.com/developer_api/v1/activities/search
The /search endpoint provides the ability to list records and sort the results by certain parameters. When multiple criteria are provided, records meeting ALL criteria will be returned (the filtering criteria have an 'AND' relationship).
Field | Type | Details | Default |
---|---|---|---|
parent | object | An object describing the resource to which activities must belong (footnote 1). | |
activity_types | activity_type[] | The activity types to filter results on (footnote 1). | none |
page_number | number | The page number (starting with 1) that you would like to view. | 1 |
page_size | number | The number of entries included in a page of results | 20 |
minimum_activity_date | number | The Unix timestamp of the earliest activity date. | none |
maximum_activity_date | number | The Unix timestamp of the latest activity date. | none |
full_result | boolean | (Optional) If set to true, search performance improves but duplicate activity logs may be returned (footnote 3). | false |
Footnotes:
parent
is specified by:{"id": parent_id, "type": parent_type}
. "parent_type" can be "lead", "person", "company", "opportunity", "project", "task".activity_types
is specified by:{"id": activity_type_id, "category": category }
. "activity_type_id" and "category" can be retrieved fromList Activity Types
.- If the List Activities Search endpoint is timing out, a flag
full_result=true
can be added.- The API key must belong to an administrator. Otherwise, the
full_result
flag will be ignored. - One can expect to see multiple entries returned for the same activity if an email was sent to multiple users.
- The API key must belong to an administrator. Otherwise, the
Example Requests¶
Search Activities¶
curl --location --request POST "https://api.copper.com/developer_api/v1/activities/search" \
--header "X-PW-AccessToken: YOUR_TOKEN_HERE" \
--header "X-PW-Application: developer_api" \
--header "X-PW-UserEmail: YOUR_EMAIL_HERE" \
--header "Content-Type: application/json" \
--data "{
\"page_size\": 25
}"
[
{
"id": 3064242278,
"parent": {
"id": 27140359,
"type": "person"
},
"type": {
"id": 0,
"category": "user"
},
"user_id": 137658,
"details": "This is the description of this note",
"activity_date": 1496772355,
"old_value": null,
"new_value": null,
"date_created": 1496772355,
"date_modified": 1496772355
},
{
"id": 3061844454,
"parent": {
"id": 9607580,
"type": "company"
},
"type": {
"id": 190711,
"category": "user"
},
"user_id": 137658,
"details": "This is an update",
"activity_date": 1496710783,
"old_value": null,
"new_value": null,
"date_created": 1496710787,
"date_modified": 1496710783
},
{
"id": 3061588719,
"parent": {
"id": 27140442,
"type": "person"
},
"type": {
"id": 190711,
"category": "user"
},
"user_id": 137658,
"details": "Demo call",
"activity_date": 1496703593,
"old_value": null,
"new_value": null,
"date_created": 1496703597,
"date_modified": 1496703593
},
{
"id": 3061845284,
"parent": {
"id": 9607580,
"type": "company"
},
"type": {
"id": 190712,
"category": "user"
},
"user_id": 137658,
"details": "Sales discussioin",
"activity_date": 1496327400,
"old_value": null,
"new_value": null,
"date_created": 1496710806,
"date_modified": 1496327400
},
{
"id": 2826555341,
"parent": {
"id": 8894157,
"type": "lead"
},
"type": {
"id": 1,
"category": "system"
},
"user_id": 137658,
"details": null,
"activity_date": 1489019921,
"old_value": null,
"new_value": null,
"date_created": 1489019921,
"date_modified": 1489019921
},
{
"id": 2826550854,
"parent": {
"id": 8894157,
"type": "lead"
},
"type": {
"id": 1,
"category": "system"
},
"user_id": 137658,
"details": null,
"activity_date": 1489019860,
"old_value": null,
"new_value": null,
"date_created": 1489019860,
"date_modified": 1489019860
},
{
"id": 2826550639,
"parent": {
"id": 8894157,
"type": "lead"
},
"type": {
"id": 1,
"category": "system"
},
"user_id": 137658,
"details": null,
"activity_date": 1489019856,
"old_value": null,
"new_value": null,
"date_created": 1489019856,
"date_modified": 1489019856
},
{
"id": 2693189358,
"parent": {
"id": 23136297,
"type": "person"
},
"type": {
"id": 194674,
"category": "user"
},
"user_id": 137658,
"details": "Talked with assistant, will be back tomorrow",
"activity_date": 1484706603,
"old_value": null,
"new_value": null,
"date_created": 1484706614,
"date_modified": 1484706603
},
{
"id": 2693184664,
"parent": {
"id": 23136297,
"type": "person"
},
"type": {
"id": 190711,
"category": "user"
},
"user_id": 137658,
"details": "Discussed the new product feature",
"activity_date": 1484706298,
"old_value": null,
"new_value": null,
"date_created": 1484706292,
"date_modified": 1484706292
},
{
"id": 2677929084,
"parent": {
"id": 23136298,
"type": "person"
},
"type": {
"id": 190711,
"category": "user"
},
"user_id": 137658,
"details": "Had some suggestions for feature improvements",
"activity_date": 1484096559,
"old_value": null,
"new_value": null,
"date_created": 1484096557,
"date_modified": 1484096557
}
]
Search Activities by Date¶
curl --location --request POST "https://api.copper.com/developer_api/v1/activities/search" \
--header "X-PW-AccessToken: YOUR_TOKEN_HERE" \
--header "X-PW-Application: developer_api" \
--header "X-PW-UserEmail: YOUR_EMAIL_HERE" \
--header "Content-Type: application/json" \
--data "{
\"page_size\": 25,
\"minimum_activity_date\": 1516302000,
\"maximum_activity_date\": 1516304220
}"
[
{
"id": 203,
"parent": {
"id": 4,
"type": "person"
},
"type": {
"id": 1,
"category": "system"
},
"user_id": 2,
"details": null,
"activity_date": 1516302332,
"old_value": null,
"new_value": null,
"date_created": 1516302332,
"date_modified": 1516302332
}
]
Search Activities With the full_result Parameter¶
curl --location --request POST "https://api.copper.com/developer_api/v1/activities/search" \
--header "X-PW-AccessToken: YOUR_TOKEN_HERE" \
--header "X-PW-Application: developer_api" \
--header "X-PW-UserEmail: YOUR_EMAIL_HERE" \
--header "Content-Type: application/json" \
--data "{
\"full_result\": true,
\"page_size\": 200,
\"page_number\": 10
}"
[
{
"id": 2001,
"parent": {
"id": 4,
"type": "person"
},
"type": {
"id": 1,
"category": "system"
},
"user_id": 2,
"details": null,
"activity_date": 1516302332,
"old_value": null,
"new_value": null,
"date_created": 1516302332,
"date_modified": 1516302332
}
]