Null wrapUpCode in Analytics Detail API despite valid interaction

I’m digging into the GET /api/v2/analytics/interactions/summary endpoint to pull detailed call data for our custom reporting dashboard. We need the specific wrap-up codes agents select at the end of calls. The issue is that wrapUpCode is consistently coming back as null in the JSON response, even when I verify in the Genesys Cloud UI that the agent definitely selected a code.

Here is the query payload I’m sending:

{
 "interval": "PT1H",
 "dateFrom": "2023-10-25T00:00:00.000Z",
 "dateTo": "2023-10-26T00:00:00.000Z",
 "groupings": ["wrapUpCode"],
 "metrics": ["talkDuration", "holdDuration"]
}

The response returns valid data for talkDuration and holdDuration. The wrapUpCode grouping exists in the response structure but the value is always null for every interaction. I’ve checked the raw interaction data via the Guest API and the codes are there. So it’s not a data entry issue.

Things I’ve tried:

  • Verified the wrapUpCode metric is enabled in the Analytics settings for our org.
  • Checked if the agents have the correct permissions to view wrap-up codes (they do).
  • Tried changing the dateFrom and dateTo to cover different time ranges. No change.
  • Looked at the documentation for wrapUpCode in the analytics API. It says it should return the code ID.

Is this a known limitation with the summary endpoint? Maybe it only works with the detail endpoint? I tried GET /api/v2/analytics/interactions/details but the response size is huge and pagination is tricky. Does anyone have a working example of querying wrap-up codes specifically? I’m stuck on this.

We’re using the .NET SDK version 10.4.0. The timezone is PST. Any help would be great.