wrapUpCode returning null in Analytics Detail API query despite valid data

I’ve spent hours trying to figure out why the wrapUpCode field consistently returns null in the response payload when querying the Analytics Detail API, even though the corresponding interaction clearly has a wrap-up code assigned in the UI.

I am constructing a query against the /api/v2/analytics/details endpoint to retrieve post-interaction metrics for voice conversations. My goal is to correlate specific wrap-up codes with handle time durations. I have verified that the interactions being returned are completed voice interactions with valid wrap-up codes visible in the PureCloud web interface.

Here is the JSON body of my request:

{
 "groupBy": ["wrapUpCode"],
 "interval": "P1D",
 "metricIds": ["handleTime"],
 "query": {
 "select": {
 "type": "and",
 "predicates": [
 {
 "select": {
 "type": "eq",
 "field": "interaction.medium",
 "value": "voice"
 }
 },
 {
 "select": {
 "type": "eq",
 "field": "interaction.state",
 "value": "completed"
 }
 }
 ]
 },
 "from": "2023-10-01T00:00:00Z",
 "to": "2023-10-02T00:00:00Z"
 }
}

The API returns a 200 OK status, and the response contains records. However, in the results array, the wrapUpCode object is always null.

  • Environment: Genesys Cloud EU1
  • API Version: v2
  • SDK: None (using raw HTTP via Postman)
  • Timezone: Africa/Lagos (UTC+1)

I have attempted the following troubleshooting steps:

  • Confirmed that the wrapUpCode field is included in the groupBy array.
  • Verified that the date range contains interactions with non-null wrap-up codes.
  • Checked the documentation for interaction.wrapUpCode vs wrapUpCode field naming conventions.

Is this a known limitation of the Detail API where wrap-up codes are not exposed in the detail view, or is there a specific predicate or projection required to surface this data? I need to understand if I should be using the Summary API instead or if there is a syntax error in my query structure preventing the field from populating.