/UpdateAPISmartReply

This method is used when it is desired to update the information of smart replies in the system. Inside the body in JSON format, as in the “InsertAPISmartReply” method, Pattern “,” Answer “,” IsActive “(Is Active),” MatchCase “(Case Sensitivity),” MatchWholeWord “(All compare the word) and “UseRegularExp” parameters should be given, in addition to this, in the query type, the “smartReplyId” parameter that specifies the Id value of the smart reply to be updated should be added.

¬†Authorization header should be entered as “token_type” value returned as a result of token request, space character, “Access_token” value.

As a result of the request, a message stating that the update has been made is received. When you make a request to the “GetAllSmartReply” method, you can see the record of the smart reply you have updated.

private static IRestResponse UpdateAPISmartReply()
            {
            RestClient client = new RestClient("http://api.flexxii.com/");
            RestRequest request = new RestRequest("api/SmartReplies/UpdateAPISmartReply", Method.PUT);
            request.AddHeader("Content-Type", "application/json; charset=utf-8");
            request.AddQueryParameter("smartReplyId", smartReplyId);
            request.AddJsonBody(new { "Pattern": "string", "Answer": "string","Media": "string","IsActive": true,"MatchCase": true,"MatchWholeWord": true,"UseRegularExp": true });
            request.AddHeader("Authorization", content_type + " " + access_token);
            IRestResponse response = client.Execute(request);
            return response;
        }

Was this helpful?

0 / 0