curl -X PATCH "https://api.uat.triple-a.io/api/fiat-payout/v1/companies/<companyId>" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <token>" \
-d '{
"external_id": "my_user_millerinc01",
"native_registered_name": "米勒",
"registered_name": "Miller",
"trading_name": "Miller Inc",
"registration_type": "trade license",
"registration_number": "001205682",
"registration_date": "2021-02-16",
"registration_expiry_date": "2021-02-16",
"registration_country": "USA",
"email": "finance@miller.com",
"phone_number": "+13152455710",
"native_address": "7950 路易斯路",
"address": "7950 Lewis Rd",
"city": "New York City",
"province_state": "New York",
"country_code": "USA",
"zip_code": "13305",
"mobile_number": "+13152455710",
"remarks": "string",
"business_nature": "AGRICULTURE_FOOD_CROPS",
"is_blocked": true
}'
const response = await fetch(`https://api.uat.triple-a.io/api/fiat-payout/v1/companies/${companyId}`, {
method: 'PATCH',
headers: { 'Content-Type': 'application/json', 'Authorization': 'Bearer <token>' },
body: JSON.stringify({
"external_id": "my_user_millerinc01",
"native_registered_name": "米勒",
"registered_name": "Miller",
"trading_name": "Miller Inc",
"registration_type": "trade license",
"registration_number": "001205682",
"registration_date": "2021-02-16",
"registration_expiry_date": "2021-02-16",
"registration_country": "USA",
"email": "finance@miller.com",
"phone_number": "+13152455710",
"native_address": "7950 路易斯路",
"address": "7950 Lewis Rd",
"city": "New York City",
"province_state": "New York",
"country_code": "USA",
"zip_code": "13305",
"mobile_number": "+13152455710",
"remarks": "string",
"business_nature": "AGRICULTURE_FOOD_CROPS",
"is_blocked": true
})
});
const data = await response.json();
import requests
response = requests.request(
"PATCH",
"https://api.uat.triple-a.io/api/fiat-payout/v1/companies/{companyId}",
headers={ "Authorization": "Bearer <token>" },
json={
"external_id": "my_user_millerinc01",
"native_registered_name": "米勒",
"registered_name": "Miller",
"trading_name": "Miller Inc",
"registration_type": "trade license",
"registration_number": "001205682",
"registration_date": "2021-02-16",
"registration_expiry_date": "2021-02-16",
"registration_country": "USA",
"email": "finance@miller.com",
"phone_number": "+13152455710",
"native_address": "7950 路易斯路",
"address": "7950 Lewis Rd",
"city": "New York City",
"province_state": "New York",
"country_code": "USA",
"zip_code": "13305",
"mobile_number": "+13152455710",
"remarks": "string",
"business_nature": "AGRICULTURE_FOOD_CROPS",
"is_blocked": True
},
)
data = response.json()
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.uat.triple-a.io/api/fiat-payout/v1/companies/<companyId>");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["Content-Type: application/json", "Authorization: Bearer <token>"]);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{
"external_id": "my_user_millerinc01",
"native_registered_name": "米勒",
"registered_name": "Miller",
"trading_name": "Miller Inc",
"registration_type": "trade license",
"registration_number": "001205682",
"registration_date": "2021-02-16",
"registration_expiry_date": "2021-02-16",
"registration_country": "USA",
"email": "finance@miller.com",
"phone_number": "+13152455710",
"native_address": "7950 路易斯路",
"address": "7950 Lewis Rd",
"city": "New York City",
"province_state": "New York",
"country_code": "USA",
"zip_code": "13305",
"mobile_number": "+13152455710",
"remarks": "string",
"business_nature": "AGRICULTURE_FOOD_CROPS",
"is_blocked": true
}');
$response = curl_exec($ch);
curl_close($ch);
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
req, _ := http.NewRequest("PATCH", "https://api.uat.triple-a.io/api/fiat-payout/v1/companies/<companyId>", strings.NewReader(`{
"external_id": "my_user_millerinc01",
"native_registered_name": "米勒",
"registered_name": "Miller",
"trading_name": "Miller Inc",
"registration_type": "trade license",
"registration_number": "001205682",
"registration_date": "2021-02-16",
"registration_expiry_date": "2021-02-16",
"registration_country": "USA",
"email": "finance@miller.com",
"phone_number": "+13152455710",
"native_address": "7950 路易斯路",
"address": "7950 Lewis Rd",
"city": "New York City",
"province_state": "New York",
"country_code": "USA",
"zip_code": "13305",
"mobile_number": "+13152455710",
"remarks": "string",
"business_nature": "AGRICULTURE_FOOD_CROPS",
"is_blocked": true
}`))
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.uat.triple-a.io/api/fiat-payout/v1/companies/<companyId>"))
.header("Content-Type", "application/json")
.header("Authorization", "Bearer <token>")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"external_id\": \"my_user_millerinc01\",\n \"native_registered_name\": \"米勒\",\n \"registered_name\": \"Miller\",\n \"trading_name\": \"Miller Inc\",\n \"registration_type\": \"trade license\",\n \"registration_number\": \"001205682\",\n \"registration_date\": \"2021-02-16\",\n \"registration_expiry_date\": \"2021-02-16\",\n \"registration_country\": \"USA\",\n \"email\": \"finance@miller.com\",\n \"phone_number\": \"+13152455710\",\n \"native_address\": \"7950 路易斯路\",\n \"address\": \"7950 Lewis Rd\",\n \"city\": \"New York City\",\n \"province_state\": \"New York\",\n \"country_code\": \"USA\",\n \"zip_code\": \"13305\",\n \"mobile_number\": \"+13152455710\",\n \"remarks\": \"string\",\n \"business_nature\": \"AGRICULTURE_FOOD_CROPS\",\n \"is_blocked\": true\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.uat.triple-a.io/api/fiat-payout/v1/companies/<companyId>")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
request = Net::HTTP::Patch.new(uri)
request["Content-Type"] = "application/json"
request["Authorization"] = "Bearer <token>"
request.body = "{\n \"external_id\": \"my_user_millerinc01\",\n \"native_registered_name\": \"米勒\",\n \"registered_name\": \"Miller\",\n \"trading_name\": \"Miller Inc\",\n \"registration_type\": \"trade license\",\n \"registration_number\": \"001205682\",\n \"registration_date\": \"2021-02-16\",\n \"registration_expiry_date\": \"2021-02-16\",\n \"registration_country\": \"USA\",\n \"email\": \"finance@miller.com\",\n \"phone_number\": \"+13152455710\",\n \"native_address\": \"7950 路易斯路\",\n \"address\": \"7950 Lewis Rd\",\n \"city\": \"New York City\",\n \"province_state\": \"New York\",\n \"country_code\": \"USA\",\n \"zip_code\": \"13305\",\n \"mobile_number\": \"+13152455710\",\n \"remarks\": \"string\",\n \"business_nature\": \"AGRICULTURE_FOOD_CROPS\",\n \"is_blocked\": true\n}"
response = http.request(request)
puts response.body