Legacy Dev Forum Posts

 View Only

Sign Up

Facing issue with Wrap up code API in Java sdk

  • 1.  Facing issue with Wrap up code API in Java sdk

    Posted 06-05-2025 18:26

    Gowthami | 2023-06-01 13:40:46 UTC | #1

    Hi, I am developing a custom solution in Eclipse using Java SDKs to get wrap up code name by passing wrap up code ID as input.

    I will get the wrap up code ID using the API "/api/v2/analytics/conversations/details/query"

    Then I am using the API to get wrap up code name "/api/v2/routing/wrapupcodes/{codeId}". But Java SDK of wrapup code API is giving error stating

    "com.mypurecloud.sdk.v2.ApiException: error at com.mypurecloud.sdk.v2.ApiClient.interpretConnectorResponse(ApiClient.java:705) at com.mypurecloud.sdk.v2.ApiClient.getAPIResponse(ApiClient.java:757) at com.mypurecloud.sdk.v2.ApiClient.invoke(ApiClient.java:868) at com.mypurecloud.sdk.v2.api.RoutingApi.getRoutingWrapupcode(RoutingApi.java:6121) at com.mypurecloud.sdk.v2.api.RoutingApi.getRoutingWrapupcode(RoutingApi.java:6090) at DollarTree.DollarTree1.RealTimeData.main(RealTime_Data.java:406)"

    The API is giving output for half of the conversation IDs and for reaming it is throwing error message like this.

    I am using the code as below,

    if(conversationlist.get(k).getParticipants().get(j).getSessions().get(0).getSegments().get(m).getSegmentType().toString()=="wrapup")
    							{
    								Participantfields2.add(conversationlist.get(k).getParticipants().get(j).getSessions().get(0).getSegments().get(m).getWrapUpCode());
    								WrapupCodeID= conversationlist.get(k).getParticipants().get(j).getSessions().get(0).getSegments().get(m).getWrapUpCode();
    								
    								
    								WrapupCode wrapupcodename = routingapi.getRoutingWrapupcode(WrapupCodeID);
    								
    								Participantfields10WrapupCodeName.add(wrapupcodename.getName());
    								
    								//g Setting WrapupcodeNote array
    								
    								Participantfields3.add(conversationlist.get(k).getParticipants().get(j).getSessions().get(0).getSegments().get(m).getWrapUpNote());
    							}

    Could you please help me with this issue?


    tim.smith | 2023-06-01 13:49:58 UTC | #2

    What's the error body?


    Gowthami | 2023-06-02 05:48:11 UTC | #3

    Hi Tim,

    I am invoking this API as a part of my Java code in Eclipse. I got the below error,

    "com.mypurecloud.sdk.v2.ApiException: error at com.mypurecloud.sdk.v2.ApiClient.interpretConnectorResponse(ApiClient.java:705) at com.mypurecloud.sdk.v2.ApiClient.getAPIResponse(ApiClient.java:757) at com.mypurecloud.sdk.v2.ApiClient.invoke(ApiClient.java:868) at com.mypurecloud.sdk.v2.api.RoutingApi.getRoutingWrapupcode(RoutingApi.java:6121) at com.mypurecloud.sdk.v2.api.RoutingApi.getRoutingWrapupcode(RoutingApi.java:6090) at DollarTree.DollarTree1.RealTimeData.main(RealTime_Data.java:406) "


    Gowthami | 2023-06-02 05:55:50 UTC | #4

    I am getting error at Line 406. My custom solution works as below: Step 1: Use API /api/v2/analytics/conversations/details/query to get conversation IDs and wrapup code IDs recorded during an interval Step 2: Use the API "/api/v2/routing/wrapupcodes/{codeId}"to get wrap up code name by passing wrap up IDs as input

    I am facing error at step 2. When I set short intervals for step 1 (for instance one hour interval), I am getting all the wrap up code names in step 2. But when I set large interval like 4 hours or 6 hours, I get wrap up code name for few wrap up IDs and then the API strucks gives error response.

    I am not sure why the wrap up code API gives response for some data at the starting point and then gives error for rest.

    In the below screenshot, I was getting wrap up name for few IDs and suddenly error message pops. So I would like to know is there any limit for the wrap up code API


    tim.smith | 2023-06-02 12:45:49 UTC | #5

    Can you share the error body please? ApiException.getRawBody()


    system | 2023-07-03 12:46:14 UTC | #6

    This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.


    This post was migrated from the old Developer Forum.

    ref: 20222