Read the browser origins your storefront may read this brand from
curl --request GET \
--url https://api.dev.purplelabelmd.com/v1/account/brands/{brand_id}/domains/member/browser-origins \
--header 'Authorization: Bearer <token>' \
--header 'X-Brand-Id: <x-brand-id>'import requests
url = "https://api.dev.purplelabelmd.com/v1/account/brands/{brand_id}/domains/member/browser-origins"
headers = {
"X-Brand-Id": "<x-brand-id>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'X-Brand-Id': '<x-brand-id>', Authorization: 'Bearer <token>'}
};
fetch('https://api.dev.purplelabelmd.com/v1/account/brands/{brand_id}/domains/member/browser-origins', 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.dev.purplelabelmd.com/v1/account/brands/{brand_id}/domains/member/browser-origins",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"X-Brand-Id: <x-brand-id>"
],
]);
$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.dev.purplelabelmd.com/v1/account/brands/{brand_id}/domains/member/browser-origins"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Brand-Id", "<x-brand-id>")
req.Header.Add("Authorization", "Bearer <token>")
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.dev.purplelabelmd.com/v1/account/brands/{brand_id}/domains/member/browser-origins")
.header("X-Brand-Id", "<x-brand-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dev.purplelabelmd.com/v1/account/brands/{brand_id}/domains/member/browser-origins")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Brand-Id"] = '<x-brand-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"browser_origins": [
"<string>"
]
}
}{
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>"
}{
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>"
}Brand configuration
Read the browser origins your storefront may read this brand from
Returns the exact web origins (scheme + host + port) your brand’s website may read its storefront prices and commerce readiness from, using your PUBLISHABLE key, from a browser. An origin that is not on this list gets no cross-origin permission, and the browser refuses the response. Requires a member domain to be registered for the brand.
GET
/
v1
/
account
/
brands
/
{brand_id}
/
domains
/
member
/
browser-origins
Read the browser origins your storefront may read this brand from
curl --request GET \
--url https://api.dev.purplelabelmd.com/v1/account/brands/{brand_id}/domains/member/browser-origins \
--header 'Authorization: Bearer <token>' \
--header 'X-Brand-Id: <x-brand-id>'import requests
url = "https://api.dev.purplelabelmd.com/v1/account/brands/{brand_id}/domains/member/browser-origins"
headers = {
"X-Brand-Id": "<x-brand-id>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'X-Brand-Id': '<x-brand-id>', Authorization: 'Bearer <token>'}
};
fetch('https://api.dev.purplelabelmd.com/v1/account/brands/{brand_id}/domains/member/browser-origins', 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.dev.purplelabelmd.com/v1/account/brands/{brand_id}/domains/member/browser-origins",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"X-Brand-Id: <x-brand-id>"
],
]);
$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.dev.purplelabelmd.com/v1/account/brands/{brand_id}/domains/member/browser-origins"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Brand-Id", "<x-brand-id>")
req.Header.Add("Authorization", "Bearer <token>")
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.dev.purplelabelmd.com/v1/account/brands/{brand_id}/domains/member/browser-origins")
.header("X-Brand-Id", "<x-brand-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dev.purplelabelmd.com/v1/account/brands/{brand_id}/domains/member/browser-origins")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Brand-Id"] = '<x-brand-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"browser_origins": [
"<string>"
]
}
}{
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>"
}{
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>"
}Authorizations
Per-client API key (M2M). Presented as Authorization: Bearer <key>.
Headers
Opaque brand id (brd_...). Validated to belong to the resolved client (§2).
Pattern:
^brd_[A-Za-z0-9][A-Za-z0-9_-]*$Path Parameters
the brand whose custom domains to view or manage (must match X-Brand-Id).
Pattern:
^brd_[A-Za-z0-9][A-Za-z0-9_-]*$Response
the brand's registered browser origins (may be empty)
Show child attributes
Show child attributes