Genesys Cloud - Developer Community!

 View Only

Sign Up

  • 1.  PUT /api/v2/flows/datatables/{datatableId}/rows/{rowId} event input has no valid 'item' element error usingJS SDK

    Posted 06-30-2025 01:07

    Odd problem. I have a body that works fine in the Dev tools but not the JS SDK

    Dev Tools:

    PUT /api/v2/flows/datatables/--MyDataTableGuidGoesHere--/rows/3 HTTP/1.1
    {"key":"3","cellphone":"123456789","Name":"Person One","OnCall":true}

    But when I use the JS SDK via CDN the same request with the same (even body hard) coded it returns this error

    apiInstance.putFlowsDatatableRow(datatableId, 3, body)
    1. code: "flows.datatables.syntax.error"
    2. contextId: "60e4924b-155d-415c-8eec-4b100bed0b65"

    Even tried to JSON.Springify - but same error

        apiInstance.putFlowsDatatableRow(datatableId, rowKey, JSON.stringify(rowData))
    1. code: "flows.datatables.syntax.error"
    2. contextId: "ff7d908e-fe35-457a-a888-6aeb0f5eb948"

    Beats me - Anyone else hit this before?


    #Architect

    ------------------------------
    Lloyd Taylor
    Solution Architect & Development Lead
    ------------------------------


  • 2.  RE: PUT /api/v2/flows/datatables/{datatableId}/rows/{rowId} event input has no valid 'item' element error usingJS SDK

    Posted 07-01-2025 06:24

    Hello,

    The PUT /api/v2/flows/datatables/{datatableId}/rows/{rowId} needs a specific format for its optional parameter - the row data is nested under the "body" attribute.

    i.e.

    let rowId = "3";
    let opts = {
      "body": {
        "key": "3",
        "cellphone": "123456789",
        "Name": "Person One",
        "OnCall": true
      }
    };
    let apiResponse = await apiInstance.putFlowsDatatableRow(datatableId, rowId, opts);

    Regards,



    ------------------------------
    Jerome Saint-Marc
    Senior Development Support Engineer
    ------------------------------



  • 3.  RE: PUT /api/v2/flows/datatables/{datatableId}/rows/{rowId} event input has no valid 'item' element error usingJS SDK

    Posted 07-18-2025 02:01

    Thank you Jerome!



    ------------------------------
    Lloyd Taylor
    Solution Architect & Development Lead
    ------------------------------