Querying for activities
In BillingCenter, you can retrieve activities using the Common API.
Use the following endpoints to GET activities.
| Endpoint | Returns |
|---|---|
/common/v1/activities |
All activities assigned to the caller. |
/common/v1/activities/{activityId} |
The activity with the given ID. |
The following query retrieves the IDs and subjects of all activities assigned to the user who makes the call.
Request
GET /common/v1/activities?fields=id,subject
Response
{
"count": 3,
"data": [
{
"attributes": {
"id": "bc:SgDIOE5GHnRiVkqQ9x3mB",
"subject": "Inactivity Notification on Account bc:2538"
}
},
{
"attributes": {
"id": "bc:SbP7mYxSHaUAK7AWQDR8z",
"subject": "Inactivity Notification on Account bc:896"
}
},
{
"attributes": {
"id": "bc:SON0bsszUiQ5B9WexpeoK",
"subject": "Inactivity Notification on Account Standard Account"
}
}
],
...
}
The following query retrieves a single activity.
Request
GET /common/v1/activities/bc:40404
Response
{
"data": {
"attributes": {
"activityType": {
"code": "general",
"name": "General"
},
"assignedByUser": {
"displayName": "Super Visor",
"id": "bc:SV9U7v71njqJ2Jekl_sQO",
"type": "User",
"uri": "/admin/v1/users/bc:SV9U7v71njqJ2Jekl_sQO"
},
"assignedGroup": {
"displayName": "Default Root Group",
"id": "systemTables:1",
"type": "Group",
"uri": "/admin/v1/groups/systemTables:1"
},
"assignedUser": {
"displayName": "Default Owner",
"id": "systemTables:1",
"type": "User",
"uri": "/admin/v1/users/systemTables:1"
},
"assignmentStatus": {
"code": "assigned",
"name": "Assigned"
},
"createTime": "2024-11-25T17:52:00.408Z",
"description": "Account bc:893 has been inactive for 60 days",
"dueDate": "2024-12-02T17:52:00.229Z",
"escalated": false,
"externallyOwned": false,
"id": "bc:40404",
"mandatory": false,
"priority": {
"code": "normal",
"name": "Normal"
},
"recurring": false,
"status": {
"code": "open",
"name": "Open"
},
"subject": "Inactivity Notification on Account bc:893",
"subtype": {
"code": "AcctInactiveActivity",
"name": "AcctInactiveActivity"
}
},
...
}
}