UpdateBondForm
PUT
/bond_form/{formID}
using System.Net.Http.Headers;var client = new HttpClient();var request = new HttpRequestMessage{ Method = HttpMethod.Put, RequestUri = new Uri("https://api.huddlesurety.co/bond_form/example"), Content = new StringContent("{ \"documentID\": \"example\", \"length\": 1, \"name\": \"example\", \"percentage\": 1, \"poaID\": \"example\", \"startPage\": 1 }") { Headers = { ContentType = new MediaTypeHeaderValue("application/json") } }};using (var response = await client.SendAsync(request)){ response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body);}package main
import ( "fmt" "strings" "net/http" "io")
func main() {
url := "https://api.huddlesurety.co/bond_form/example"
payload := strings.NewReader("{ \"documentID\": \"example\", \"length\": 1, \"name\": \"example\", \"percentage\": 1, \"poaID\": \"example\", \"startPage\": 1 }")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close() body, _ := io.ReadAll(res.Body)
fmt.Println(res) fmt.Println(string(body))
}OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");RequestBody body = RequestBody.create(mediaType, "{ \"documentID\": \"example\", \"length\": 1, \"name\": \"example\", \"percentage\": 1, \"poaID\": \"example\", \"startPage\": 1 }");Request request = new Request.Builder() .url("https://api.huddlesurety.co/bond_form/example") .put(body) .addHeader("Content-Type", "application/json") .build();
Response response = client.newCall(request).execute();import axios from 'axios';
const options = { method: 'PUT', url: 'https://api.huddlesurety.co/bond_form/example', headers: {'Content-Type': 'application/json'}, data: { documentID: 'example', length: 1, name: 'example', percentage: 1, poaID: 'example', startPage: 1 }};
try { const { data } = await axios.request(options); console.log(data);} catch (error) { console.error(error);}const url = 'https://api.huddlesurety.co/bond_form/example';const options = { method: 'PUT', headers: {'Content-Type': 'application/json'}, body: '{"documentID":"example","length":1,"name":"example","percentage":1,"poaID":"example","startPage":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")val body = RequestBody.create(mediaType, "{ \"documentID\": \"example\", \"length\": 1, \"name\": \"example\", \"percentage\": 1, \"poaID\": \"example\", \"startPage\": 1 }")val request = Request.Builder() .url("https://api.huddlesurety.co/bond_form/example") .put(body) .addHeader("Content-Type", "application/json") .build()
val response = client.newCall(request).execute()use std::str::FromStr;use serde_json::json;use reqwest;
#[tokio::main]pub async fn main() { let url = "https://api.huddlesurety.co/bond_form/example";
let payload = json!({ "documentID": "example", "length": 1, "name": "example", "percentage": 1, "poaID": "example", "startPage": 1 });
let mut headers = reqwest::header::HeaderMap::new(); headers.insert("Content-Type", "application/json".parse().unwrap());
let client = reqwest::Client::new(); let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url) .headers(headers) .json(&payload) .send() .await;
let results = response.unwrap() .json::<serde_json::Value>() .await .unwrap();
dbg!(results);}curl --request PUT \ --url https://api.huddlesurety.co/bond_form/example \ --header 'Content-Type: application/json' \ --data '{ "documentID": "example", "length": 1, "name": "example", "percentage": 1, "poaID": "example", "startPage": 1 }'Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”formID
required
string
Form ID
Request Bodyrequired
Section titled “Request Bodyrequired”Body
Media typeapplication/json
Body
object
documentID
string
length
required
integer
name
required
string
percentage
required
number
poaID
string
startPage
required
integer
Examplegenerated
{ "documentID": "example", "length": 1, "name": "example", "percentage": 1, "poaID": "example", "startPage": 1}Responses
Section titled “Responses”OK
Media typeapplication/json
object
bondType
required
string
createdAt
required
string
documentID
string
id
required
string
length
required
integer
name
required
string
orgID
required
string
percentage
required
number
poaID
string
projectID
required
string
startPage
required
integer
updatedAt
required
string
Example
{ "bondType": "bid"}