package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/participants/{id}"
payload := strings.NewReader("{\n \"active\": true,\n \"bcbCode\": \"0001\",\n \"document\": \"12345678000199\",\n \"ispb\": \"29011780\",\n \"metadata\": {},\n \"name\": \"Acquirer Example S.A.\",\n \"nucleaCode\": \"NU12345\",\n \"type\": \"ACQUIRER\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}