500 Error when calling POST /cases/summaries/cursor for Worldcheck One

I am calling "v2/cases/summaries" to get a list of cases. That works ok and returns a cursorId that I then pass to the end point "v2/cases/summaries/cursor" to get the next page of results but it returns a 500 error.

            var postGetCases = "/cases/summaries";
            var postGetCasesSummary = "{\"cursorOptions\": { \"itemsPerPage\": 2}}";


            var cursorId = PostNew(gatewayVersion, gatewayHost, postGetCases, apiKey, apiSecret,postGetCasesSummary);


            var postCursor = "/cases/summaries/cursor";
            var postCursorData = "{\"cursorId\":\""+cursorId+"\"}";


            var updatedCursor = PostNew(gatewayVersion, gatewayHost, postCursor, apiKey, apiSecret, postCursorData);

Is it something I am doing wrong or is that endpoint not currently working?

Best Answer

  • Wisey
    Wisey Newcomer
    Answer ✓

    It would appear I have to wrap the cursorId in a cursor and that then works.

    var postCursorData2 = "{\"cursor\":{\"cursorId\":\"" + cursorId + "\"}}";

Answers

  • Wisey
    Wisey Newcomer
    1. var postCursorData2 = "{\"cursor\":{\"cursorId\":\"" + cursorId + "\"}}";