Querying for activities

Activities cannot exist on their own. They must be attached to a parent object. In ClaimCenter, activities can be attached only to claims (directly or indirectly).

You can use the following endpoints to GET activities.

Endpoint Returns
/common/v1/activities All activities
/common/v1/activities/{activityId} The activity with the given ID
/claim/v1/claims/{claimId}/activities

All activities associated with the given claim

This is a "potentially large" endpoint. Cloud API returns an error if you attempt to sort on this endpoint and the sort cannot be accomplished efficiently. For more information, see Potentially large endpoints.

Note that the endpoints to retrieve activities exist in different APIs. To get all activities for a claim, you use an endpoint in the Claim API. But to get information about all activities (regardless of parent), or to get information about a specific activity, you use endpoints in the Common API.

For example, the following query retrieves the IDs and subjects of all activities for account demo_sample:1. This endpoint is in the Claim API.

Request

GET claim/v1/claims/demo_sample:1/activities?fields=id,subject

Response

{
  "count": 14,
    "data": [
      {
        "attributes": {
          "id": "cc:23218",
          "subject": "Contact insured"
        }
      },
      {
        "attributes": {
          "id": "cc:40404",
          "subject": "Determine fault rating"
        }
      },
      ...

The following query retrieves activity cc:40404 in detail. This endpoint is in the Common API.

Request

GET /common/v1/activities/pc:40404

Response

{
  "data": {
    "attributes": {
      "activityPattern": "general_reminder",
      "activityType": {
        "code": "general",
        "name": "General"
      },
      "assignedGroup": {
        "displayName": "Auto1 - TeamA",
        "id": "demo_sample:31"
      },
      "assignedUser": {
        "displayName": "Andy Applegate",
        "id": "demo_sample:1",
        "type": "User",
        "uri": "/admin/v1/users/demo_sample:1"
      },
      "assignmentStatus": {
        "code": "assigned",
        "name": "Assigned"
      },
      "createTime": "2023-11-18T02:00:20.481Z",
      "dueDate": "2023-11-07T00:00:00.000Z",
      "escalated": false,
      "externallyOwned": false,
      "id": "cc:40404",
      "importance": {
        "code": "notOnCalendar",
        "name": "Not On Calendar"
      },
      "mandatory": false,
      "priority": {
        "code": "normal",
        "name": "Normal"
      },
      "recurring": false,
      "relatedTo": {
        "displayName": "Ray Newton",
        "id": "cc:SW8RXsrWJZiKa7jfCEAYr",
        "type": "ClaimContact",
        "uri": "/claim/v1/claims/demo_sample:1/contacts/cc:SW8RXsrWJZiKa7jfCEAYr"
      },
      "status": {
        "code": "open",
        "name": "Open"
      },
      "subject": "Determine fault rating"
    },
    ...