Get Account
curl --request GET \
--url https://api.example.com/accountimport requests
url = "https://api.example.com/account"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/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://api.example.com/account",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/account"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/account")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/account")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"client_id": "<string>",
"name": "<string>",
"status": "active",
"creation_date": "2023-11-07T05:31:56Z",
"brands": [
{
"brand_id": "<string>",
"name": "<string>"
}
],
"plan": {
"name": "<string>",
"analytics_entitled": true,
"mcp_entitled": true,
"purchase_access": "all_purchases"
},
"scopes": [
"<string>"
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Account
Get Account
Your own account: your team, the brands you subscribe to, your plan and what it includes, and the OAuth scopes your token was granted. Any valid credential can read it; no scope is required.
GET
/
account
Get Account
curl --request GET \
--url https://api.example.com/accountimport requests
url = "https://api.example.com/account"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/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://api.example.com/account",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/account"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/account")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/account")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"client_id": "<string>",
"name": "<string>",
"status": "active",
"creation_date": "2023-11-07T05:31:56Z",
"brands": [
{
"brand_id": "<string>",
"name": "<string>"
}
],
"plan": {
"name": "<string>",
"analytics_entitled": true,
"mcp_entitled": true,
"purchase_access": "all_purchases"
},
"scopes": [
"<string>"
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Subtotal Connector tool: get_account
The account your credential acts for: your team, the brands you subscribe to, your plan and what it includes, and the OAuth scopes your token was granted.
plan.nameis the plan shown on the dashboard’s billing page, ornullwhen your account has no current plan. Without a plan,analytics_entitledandmcp_entitledarefalseandpurchase_accessisbrand_products.plan.purchase_accessis your plan’s purchase access:all_purchases,full_basket(whole baskets that hold one of your brands’ products), orbrand_products(only your brands’ items in those baskets). It is your plan’s ceiling and doesn’t change per credential: an API key or OAuth token can be set narrower, so a token withpurchases:brand_productsgets only your brands’ items even when this field showsall_purchases.scopeslists the scopes on a Subtotal Connector or partner app OAuth token, and isnullfor an API key, which is unscoped.
Response
Successful Response
Your account (team) id
Your team's name
Available options:
active, inactive The brands you subscribe to, by name
Show child attributes
Show child attributes
Show child attributes
Show child attributes
The OAuth scopes granted to the token making this call; null for an API key, which is unscoped