Update a sub-account
curl --request PATCH \
--url https://b2b-api-sandbox.easyonramp.com/api/v1/sub-accounts/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Renamed Group"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Renamed Group'})
};
fetch('https://b2b-api-sandbox.easyonramp.com/api/v1/sub-accounts/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://b2b-api-sandbox.easyonramp.com/api/v1/sub-accounts/{id}"
payload = { "name": "Renamed Group" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://b2b-api-sandbox.easyonramp.com/api/v1/sub-accounts/{id}"
payload := strings.NewReader("{\n \"name\": \"Renamed Group\"\n}")
req, _ := http.NewRequest("PATCH", 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))
}Sub-accounts
Update a sub-account
Change the name on an existing sub-account group. The default sub-account cannot be updated.
PATCH
/
api
/
v1
/
sub-accounts
/
{id}
Update a sub-account
curl --request PATCH \
--url https://b2b-api-sandbox.easyonramp.com/api/v1/sub-accounts/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Renamed Group"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Renamed Group'})
};
fetch('https://b2b-api-sandbox.easyonramp.com/api/v1/sub-accounts/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://b2b-api-sandbox.easyonramp.com/api/v1/sub-accounts/{id}"
payload = { "name": "Renamed Group" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://b2b-api-sandbox.easyonramp.com/api/v1/sub-accounts/{id}"
payload := strings.NewReader("{\n \"name\": \"Renamed Group\"\n}")
req, _ := http.NewRequest("PATCH", 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))
}