curl -X PUT "https://api.triple-a.work/kyc-api/v1/customers/<customerId>" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <token>" \
-d '{
"name": "John Doe",
"gender": "Male",
"country_code": "US",
"email": "[email protected]",
"dob": "1992-10-10"
}'
const response = await fetch(`https://api.triple-a.work/kyc-api/v1/customers/${customerId}`, {
method: 'PUT',
headers: { 'Content-Type': 'application/json', 'Authorization': 'Bearer <token>' },
body: JSON.stringify({
"name": "John Doe",
"gender": "Male",
"country_code": "US",
"email": "[email protected]",
"dob": "1992-10-10"
})
});
const data = await response.json();
import requests
response = requests.request(
"PUT",
"https://api.triple-a.work/kyc-api/v1/customers/{customerId}",
headers={ "Authorization": "Bearer <token>" },
json={
"name": "John Doe",
"gender": "Male",
"country_code": "US",
"email": "[email protected]",
"dob": "1992-10-10"
},
)
data = response.json()
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.triple-a.work/kyc-api/v1/customers/<customerId>");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["Content-Type: application/json", "Authorization: Bearer <token>"]);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{
"name": "John Doe",
"gender": "Male",
"country_code": "US",
"email": "[email protected]",
"dob": "1992-10-10"
}');
$response = curl_exec($ch);
curl_close($ch);
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
req, _ := http.NewRequest("PUT", "https://api.triple-a.work/kyc-api/v1/customers/<customerId>", strings.NewReader(`{
"name": "John Doe",
"gender": "Male",
"country_code": "US",
"email": "[email protected]",
"dob": "1992-10-10"
}`))
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer <token>")
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
data, _ := io.ReadAll(resp.Body)
fmt.Println(string(data))
}
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.triple-a.work/kyc-api/v1/customers/<customerId>"))
.header("Content-Type", "application/json")
.header("Authorization", "Bearer <token>")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"name\": \"John Doe\",\n \"gender\": \"Male\",\n \"country_code\": \"US\",\n \"email\": \"[email protected]\",\n \"dob\": \"1992-10-10\"\n}"))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
require "net/http"
require "uri"
uri = URI("https://api.triple-a.work/kyc-api/v1/customers/<customerId>")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
request = Net::HTTP::Put.new(uri)
request["Content-Type"] = "application/json"
request["Authorization"] = "Bearer <token>"
request.body = "{\n \"name\": \"John Doe\",\n \"gender\": \"Male\",\n \"country_code\": \"US\",\n \"email\": \"[email protected]\",\n \"dob\": \"1992-10-10\"\n}"
response = http.request(request)
puts response.body