Jump to content

Featured Replies

Solved by InfinityRazz

Go to solution
  • Author

Anyone have an idea? The support does not want to help here, it would be above the standard... ðŸ¥´

  • Solution
 

Anyone have an idea? The support does not want to help here, it would be above the standard... ðŸ¥´

i mean.. in c# using RestSharp it's something along the lines of => 

 

var Client = new RestClient("WebsiteUrl");
var Request = new RestRequest("/api/cms/records/{dID}/{rID}" + "/?key=Api Key With perms", DataFormat.Json);
Request.AddUrlSegment("dID", 6);
Request.AddUrlSegment("rID", 1);
Request.AddParameter("fields[24]", "This changes record title");
var Response = Client.Post(Request);

if (Response.StatusCode == HttpStatusCode.OK)
{
    // Convert Response.Content and/or Response.Data to class object            
}
else Console.WriteLine(Response.StatusCode);

 

Edited by InfinityRazz
Tested for sure ;)

  • Author

Perfect. I didn't know

Request.AddParameter("fields[24]", "This changes record title");

is how an array is passed via RESTSharp.

Thank you!

 

Perfect. I didn't know


Request.AddParameter("fields[24]", "This changes record title");

is how an array is passed via RESTSharp.

Thank you!

Yeah! It's definitely a lil weird cause it returns field_##, took me a couple weeks to get used to making RestRequests here 😛

CustomFields on a purchase/member request are similar as well

Request.AddParameter("customField[#]", "StringValue"); ðŸ˜‰

  • Author
 

Yeah! It's definitely a lil weird cause it returns field_##, took me a couple weeks to get used to making RestRequests here 😛

CustomFields on a purchase/member request are similar as well

Request.AddParameter("customField[#]", "StringValue"); ðŸ˜‰

Yeah, same thing. Took me also weeks until to ask for support here. If the REST API would accept a json body, it would be easier.

Recently Browsing 0

  • No registered users viewing this page.