Update
curl --request PATCH \
--url https://{defaultHost}/v1/account \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"account": {
"name": "New Account Name",
"currency": "aud"
}
}
'import requests
url = "https://{defaultHost}/v1/account"
payload = { "account": {
"name": "New Account Name",
"currency": "aud"
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({account: {name: 'New Account Name', currency: 'aud'}})
};
fetch('https://{defaultHost}/v1/account', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{defaultHost}/v1/account",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'account' => [
'name' => 'New Account Name',
'currency' => 'aud'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{defaultHost}/v1/account"
payload := strings.NewReader("{\n \"account\": {\n \"name\": \"New Account Name\",\n \"currency\": \"aud\"\n }\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))
}HttpResponse<String> response = Unirest.patch("https://{defaultHost}/v1/account")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"account\": {\n \"name\": \"New Account Name\",\n \"currency\": \"aud\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{defaultHost}/v1/account")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"account\": {\n \"name\": \"New Account Name\",\n \"currency\": \"aud\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "75e7c0be-d6c9-42cb-bd4a-6d61090ea8a4",
"object": "account",
"cache_keys": {
"coupons": "coupons/query-59239b325aa5b24f4858a9c2b931c79d-2-20261130183828367279",
"display_currencies": "display_currencies/query-34c1f615ed0d8edd01d7787188cd0d80-2-20261130183828375086",
"manual_payment_methods": "manual_payment_methods/query-cfbde6d93e8bb01e688a98dd3ed03ff9-0",
"processors": "processors/query-1117308bb46c15be5a232be37ebded28-1-20261130183828344492",
"products": "products/query-a7ef8b0adf3857460f1eca867109b8fe-0",
"product_collections": "product_collections/query-5cfc9d9590fc8c5d1293a37c7fb118d5-0",
"reviews": "reviews/query-af9803526769095e0a6ebf70d64086d3-0",
"shipping_providers": "shipping_providers/query-e513612668bcffd8dfef1d4f4d02c2b6-0",
"webhook_endpoints": "webhook_endpoints/query-ec357ba1a17c36bef2b49f432657da9f-0"
},
"claimed": true,
"claim_url": null,
"claim_window_ends_at": null,
"currency": "aud",
"currency_locked": false,
"locale": "en",
"medias_total_byte_size": 0,
"name": "New Account Name",
"slug": "test-account",
"time_zone": "Etc/UTC",
"url": null,
"plan": {
"free": true,
"name": "Launch"
},
"public_token": "pt_WnyMwgYjFZbdUEZyjNfQvn73",
"seeded_at": null,
"seeded_resources": [],
"abandoned_checkout_protocol": "43b17051-4b09-4b15-bcdb-bbb42c06e531",
"affiliation_protocol": "0fd42ed4-b699-4cb2-bdd1-3be92f018ce8",
"brand": "69c1053e-17ce-4972-8876-6716ced85d15",
"checkout_portal_protocol": "394804ef-341d-4d18-aeee-49558561982c",
"customer_notification_protocol": "7e5f5286-7da5-47b8-8392-e4f4c4dc43a8",
"customer_portal_protocol": "aef53b94-39dd-4a4a-9a2b-9814011397e0",
"order_protocol": "1bc6afe1-e007-4d86-ad74-4a56e8a68a70",
"review_protocol": "7fa1600c-c241-463d-a1a2-63059e666f8b",
"shipping_protocol": "46746989-4c29-472e-a356-730f1b1b3498",
"subscription_protocol": "e341aee9-307e-4c9f-a556-ef9195b256cb",
"tax_protocol": "44355587-6554-4768-9b64-74c709911a94",
"test_data_purged_at": null,
"created_at": 1796063908,
"updated_at": 1796063908
}Accounts
Update
Updates the current account.
PATCH
/
v1
/
account
Update
curl --request PATCH \
--url https://{defaultHost}/v1/account \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"account": {
"name": "New Account Name",
"currency": "aud"
}
}
'import requests
url = "https://{defaultHost}/v1/account"
payload = { "account": {
"name": "New Account Name",
"currency": "aud"
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({account: {name: 'New Account Name', currency: 'aud'}})
};
fetch('https://{defaultHost}/v1/account', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{defaultHost}/v1/account",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'account' => [
'name' => 'New Account Name',
'currency' => 'aud'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{defaultHost}/v1/account"
payload := strings.NewReader("{\n \"account\": {\n \"name\": \"New Account Name\",\n \"currency\": \"aud\"\n }\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))
}HttpResponse<String> response = Unirest.patch("https://{defaultHost}/v1/account")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"account\": {\n \"name\": \"New Account Name\",\n \"currency\": \"aud\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{defaultHost}/v1/account")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"account\": {\n \"name\": \"New Account Name\",\n \"currency\": \"aud\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "75e7c0be-d6c9-42cb-bd4a-6d61090ea8a4",
"object": "account",
"cache_keys": {
"coupons": "coupons/query-59239b325aa5b24f4858a9c2b931c79d-2-20261130183828367279",
"display_currencies": "display_currencies/query-34c1f615ed0d8edd01d7787188cd0d80-2-20261130183828375086",
"manual_payment_methods": "manual_payment_methods/query-cfbde6d93e8bb01e688a98dd3ed03ff9-0",
"processors": "processors/query-1117308bb46c15be5a232be37ebded28-1-20261130183828344492",
"products": "products/query-a7ef8b0adf3857460f1eca867109b8fe-0",
"product_collections": "product_collections/query-5cfc9d9590fc8c5d1293a37c7fb118d5-0",
"reviews": "reviews/query-af9803526769095e0a6ebf70d64086d3-0",
"shipping_providers": "shipping_providers/query-e513612668bcffd8dfef1d4f4d02c2b6-0",
"webhook_endpoints": "webhook_endpoints/query-ec357ba1a17c36bef2b49f432657da9f-0"
},
"claimed": true,
"claim_url": null,
"claim_window_ends_at": null,
"currency": "aud",
"currency_locked": false,
"locale": "en",
"medias_total_byte_size": 0,
"name": "New Account Name",
"slug": "test-account",
"time_zone": "Etc/UTC",
"url": null,
"plan": {
"free": true,
"name": "Launch"
},
"public_token": "pt_WnyMwgYjFZbdUEZyjNfQvn73",
"seeded_at": null,
"seeded_resources": [],
"abandoned_checkout_protocol": "43b17051-4b09-4b15-bcdb-bbb42c06e531",
"affiliation_protocol": "0fd42ed4-b699-4cb2-bdd1-3be92f018ce8",
"brand": "69c1053e-17ce-4972-8876-6716ced85d15",
"checkout_portal_protocol": "394804ef-341d-4d18-aeee-49558561982c",
"customer_notification_protocol": "7e5f5286-7da5-47b8-8392-e4f4c4dc43a8",
"customer_portal_protocol": "aef53b94-39dd-4a4a-9a2b-9814011397e0",
"order_protocol": "1bc6afe1-e007-4d86-ad74-4a56e8a68a70",
"review_protocol": "7fa1600c-c241-463d-a1a2-63059e666f8b",
"shipping_protocol": "46746989-4c29-472e-a356-730f1b1b3498",
"subscription_protocol": "e341aee9-307e-4c9f-a556-ef9195b256cb",
"tax_protocol": "44355587-6554-4768-9b64-74c709911a94",
"test_data_purged_at": null,
"created_at": 1796063908,
"updated_at": 1796063908
}Authorizations
Response
200 - application/json
Success
Expandable – The associated abandoned checkout protocol ID.
Expandable – The associated affililiation protocol ID.
Expandable – The associated brand ID.
Expandable – The associated checkout portal protocol ID.
Expandable – The associated customer notification protocol ID.
Expandable – The associated customer portal protocol ID.
Expandable – The associated review protocol ID.
Expandable – The associated shipping protocol ID.
Expandable – The associated subscription protocol ID.
Expandable – The associated tax protocol ID.
Was this page helpful?