Pular para o conteúdo

Account

Este conteúdo não está disponível em sua língua ainda.

The Account resource represents your shop’s identity, business profile, locale settings, opening hours, logo, and subscription plan. It is a singleton: every tenant has exactly one account object, so there are no list or create endpoints.

{
"object": "account",
"shop_name": "Riverside Repair",
"timezone": "America/New_York",
"currency_code": "USD",
"country_code": "US",
"logo_url": "https://app.benchkey.com/api/business/logo/abc123.png",
"business_profile": {
"name": "Riverside Repair",
"address1": "123 Main St",
"address2": null,
"city": "Springfield",
"state": "IL",
"zip": "62701",
"country": "US",
"phone": "+12175550100",
"email": "info@riversiderepair.com",
"website": "https://riversiderepair.com",
"tagline": "Fixed right the first time."
},
"business_hours": {
"mon": { "open": "09:00", "close": "17:00", "closed": false },
"tue": { "open": "09:00", "close": "17:00", "closed": false },
"sat": { "closed": true },
"sun": { "closed": true }
},
"plan": {
"name": "scale",
"status": "active",
"trial": false
}
}
FieldTypeDescription
shop_namestring|nullThe shop’s display name
timezonestring|nullIANA timezone (e.g. America/Chicago)
currency_codestringISO 4217 currency (e.g. USD)
country_codestringISO 3166-1 alpha-2 country
logo_urlstring|nullPublic URL of the shop logo, or null if not set
business_profileobjectContact and address fields, see sub-fields below
business_hoursobjectMap of weekday keys (mon–sun) to open/close/closed
planobject|nullSubscription summary; name currently contains the plan code (for example scale for Business), plus status and trial

plan.name uses starter for Standard, pro for Pro, and scale for Business. API access requires Business (scale). The summary is null if billing status cannot be read. plan.trial is true for a non-expired trial, including a synthetic trial; see Billing for prices, limits, and trial metadata.

FieldTypeDescription
namestring|nullLegal or trade name
address1string|nullStreet address
address2string|nullSuite, unit, etc.
citystring|nullCity
statestring|nullState / province
zipstring|nullPostal code
countrystring|nullCountry (ISO 3166-1 alpha-2)
phonestring|nullBusiness phone
emailstring|nullBusiness contact email
websitestring|nullWebsite URL
taglinestring|nullShort tagline

GET /api/v1/account

Returns the singleton account object.

Scope required: account.read

Terminal window
curl https://app.benchkey.com/api/v1/account \
-H "Authorization: Bearer bk_live_<tenantId>_<secret>"
const res = await fetch("https://app.benchkey.com/api/v1/account", {
headers: { Authorization: "Bearer bk_live_<tenantId>_<secret>" },
});
const account = await res.json();
console.log(account.shop_name);
{
"object": "account",
"shop_name": "Riverside Repair",
"timezone": "America/New_York",
"currency_code": "USD",
"country_code": "US",
"logo_url": null,
"business_profile": {
"name": "Riverside Repair",
"address1": null,
"address2": null,
"city": null,
"state": null,
"zip": null,
"country": "US",
"phone": "+12175550100",
"email": null,
"website": null,
"tagline": null
},
"business_hours": {
"mon": { "open": "09:00", "close": "17:00", "closed": false }
},
"plan": { "name": "scale", "status": "active", "trial": false }
}

GET /api/v1/account/logo

Returns the logo URL and a present flag. The raw image bytes are served at the url directly.

Scope required: account.read

Terminal window
curl https://app.benchkey.com/api/v1/account/logo \
-H "Authorization: Bearer bk_live_<tenantId>_<secret>"
const res = await fetch("https://app.benchkey.com/api/v1/account/logo", {
headers: { Authorization: "Bearer bk_live_<tenantId>_<secret>" },
});
const logo = await res.json();
if (logo.present) console.log("Logo URL:", logo.url);
{
"object": "account_logo",
"present": true,
"url": "https://app.benchkey.com/api/business/logo/abc123.png"
}
FieldTypeDescription
presentbooleantrue if a logo has been uploaded
urlstring|nullPublic URL of the logo, or null if not present

PATCH /api/v1/account

Updates one or more business-profile fields. Only the fields listed below are writable; unknown fields are rejected with 400 invalid_field. Returns the re-read account object.

Scope required: account.write

FieldTypeNotes
namestring|nullTrade or legal name
address1string|nullStreet address
address2string|nullSuite, unit, etc.
citystring|nullCity
statestring|nullState / province
zipstring|nullPostal code
countrystring|nullISO 3166-1 alpha-2
phonestring|nullBusiness phone
emailstring|nullBusiness email
websitestring|nullWebsite URL
taglinestring|nullShort tagline

Fields may be supplied flat (top-level) or nested under a business_profile key, both shapes are accepted. When the nested form is used, all fields must live inside business_profile; top-level keys alongside it are rejected with 400 invalid_field.

Terminal window
# Flat shape
curl -X PATCH https://app.benchkey.com/api/v1/account \
-H "Authorization: Bearer bk_live_<tenantId>_<secret>" \
-H "Content-Type: application/json" \
-d '{"phone": "+12175550200", "website": "https://riversiderepair.com"}'
# Nested shape
curl -X PATCH https://app.benchkey.com/api/v1/account \
-H "Authorization: Bearer bk_live_<tenantId>_<secret>" \
-H "Content-Type: application/json" \
-d '{"business_profile": {"phone": "+12175550200"}}'
const res = await fetch("https://app.benchkey.com/api/v1/account", {
method: "PATCH",
headers: {
Authorization: "Bearer bk_live_<tenantId>_<secret>",
"Content-Type": "application/json",
},
body: JSON.stringify({ phone: "+12175550200", tagline: "Fixed right the first time." }),
});
const account = await res.json();
console.log(account.business_profile.phone); // "+12175550200"

Returns the full updated account object.


CodeHTTPMeaning
invalid_body400Request body is not a JSON object
no_fields400Body contained no writable fields
invalid_field400Field is not writable, value is not a string or null, or profile text/email/phone validation failed
account_save_failed422The backend rejected the update
unauthorized401Missing or invalid API key
insufficient_scope403API key lacks account.read or account.write scope
Status do sistema