Download a copy of my data
Return the shopper’s data as JSON for an export request the store approved (or that completed at once), during its seven-day download window. The copy is built when it is downloaded, so it reflects the store’s records at that moment. The response is sent as an attachment and is never cached.
409 when the request is still waiting, was declined, or its download window has ended (make a new request
for a fresh copy). Another shopper’s request, an erasure request, or an id from the other environment returns
404.
Customer-self access. Works with a publishable key (safe from the
browser). Provide the shopper’s session token in the x-auth-token
header (or the store’s bring-your-own-auth assertion in x-external-auth);
it must resolve to the customer in the {id} path parameter, otherwise the
request returns 403. Limited to 10 downloads per shopper per hour.
curl --request GET \
--url https://api.tybritelabs.com/v1/customers/{id}/data-requests/{request_id}/export \
--header 'Authorization: Bearer <token>' \
--header 'x-auth-token: <x-auth-token>'import requests
url = "https://api.tybritelabs.com/v1/customers/{id}/data-requests/{request_id}/export"
headers = {
"x-auth-token": "<x-auth-token>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-auth-token': '<x-auth-token>', Authorization: 'Bearer <token>'}
};
fetch('https://api.tybritelabs.com/v1/customers/{id}/data-requests/{request_id}/export', 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.tybritelabs.com/v1/customers/{id}/data-requests/{request_id}/export",
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-auth-token: <x-auth-token>"
],
]);
$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.tybritelabs.com/v1/customers/{id}/data-requests/{request_id}/export"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-auth-token", "<x-auth-token>")
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.tybritelabs.com/v1/customers/{id}/data-requests/{request_id}/export")
.header("x-auth-token", "<x-auth-token>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tybritelabs.com/v1/customers/{id}/data-requests/{request_id}/export")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-auth-token"] = '<x-auth-token>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"format": "customer-data-export",
"version": 1,
"generated_at": "2026-11-07T16:02:11+00:00",
"store_name": "Fernhill Goods",
"customer_id": "2b9d4c1a-6e7f-4a3b-8c2d-1e0f9a8b7c6d",
"environment": "production",
"tables": {
"customers": [
{
"id": "2b9d4c1a-6e7f-4a3b-8c2d-1e0f9a8b7c6d",
"name": "Ada Shopper",
"email": "ada@example.com"
}
],
"online_orders": [
{
"id": "9f8e7d6c-5b4a-4321-8fed-cba987654321",
"order_number": "1042",
"total_amount": 54.5
}
]
}
}Authorizations
API Key Authentication
Use your API key in the Authorization header:
Authorization: Bearer tybrite_sk_live_YOUR_KEY
Key Types:
Secret Keys (Server-Side Only):
- Format:
tybrite_sk_live_*(production) ortybrite_sk_test_*(sandbox) - Full read/write access to all endpoints
- ⚠️ NEVER expose in client-side code or public repositories
- Required for: every write a shopper does not make for themselves, authentication, payment verification, AI recommendations
Publishable Keys (Client-Safe):
- Format:
tybrite_pk_live_*(production) ortybrite_pk_test_*(sandbox) - Catalogue reads, plus the actions a shopper takes for themselves
- ✅ Safe for client-side JavaScript, mobile apps, and public code
- Allowed for: browsing products, search, CMS content, pricing queries, cart and wishlist, reviews, storefront events, and the Agent API's quotes, cart drafts and checkout intents
Endpoint-Specific Requirements:
- Authentication endpoints (
/v1/auth/*): state-changingPOSTcalls require a secret key, for store and marketplace keys alike;GET /v1/auth/meaccepts either key - Payment verification (
POST /v1/payments/verify): Secret key required - AI Recommendations (
POST /v1/recommendations): Secret key required - Semantic Search (
POST /v1/search): Both key types allowed (read-only operation) - Shopper actions (cart, wishlist, reviews, storefront events, Agent API quotes, cart drafts and checkout intents): Both key types allowed
- All other write operations: Secret key required
- All read operations: Both key types allowed
Using a publishable key for restricted operations returns 403 Forbidden.
Limited publishable keys:
A publishable key can be limited to the products that carry one tag (for example starter:jewellery), created from
the store's Developers page. The limit applies to the key, never to the shopper: shopper sign-up and sign-in stay store-wide.
- Reads return only the slice: products (with their facets, filters, search, brands and specifications), categories and
subcategories that hold in-slice products, collections, promotions, posts and lookbooks that carry the tag, reviews of
in-slice products, prices, discovery lists and the store information summary, with every count computed on the slice.
A product outside the slice answers
404, as if it did not exist. - A write that names a product or variant outside the slice (adding to the cart or wishlist, reserving stock, an order line,
a review, a promotion calculation, a storefront event) answers
403with the error codeout_of_scope, and nothing is written or reserved. An order is refused as a whole. - A route that carries no slice behaviour is not available to the key: it answers
403withendpoint_not_allowed. - Orders placed through such a key record the tag on the order's attribution as
key_scope. - Secret keys and connected-app keys cannot be limited.
- Responses are cached per key limit: a limited key never receives a response cached for the whole store, and the reverse.
Headers
Bring-your-own-auth assertion for stores that manage authentication in an external identity provider (Auth0, Clerk, Cognito, Firebase, NextAuth, SSO). Resolves the shopper whose data requests are managed.
Format: <base64url(JSON)>.<base64url(HMAC-SHA256(JSON))> where the JSON is { "external_id": "...", "iat": <unix>, "exp": <unix> } and the HMAC is keyed on the store's hmac_secret. Claim lifetime capped at 300 seconds. Provide exactly one of x-auth-token, x-external-auth, or x-idp-token.
A raw token from the store's own identity provider (e.g. a Firebase ID token). Galactic Core forwards it to the store's configured Auth verifier, which validates it against the provider and returns the identity; resolves the shopper whose data requests are managed.
Use this when the store wants Galactic Core to verify tokens on its behalf rather than signing an assertion itself. Verification is fail-closed: if the verifier rejects the token or is unreachable, the request is unauthenticated (401). Requires an Auth verifier to be configured for the store. Provide exactly one of x-auth-token, x-external-auth, or x-idp-token.
Path Parameters
Response
The shopper's data.
A copy of the personal data a store holds about one shopper, as JSON. tables maps each kind of record to the
shopper's rows (their profile, addresses, orders and their lines, returns, reviews, messages, wishlist, store
credit, consents and the store's custom fields about them). Secrets, access tokens and the store's own cost
figures are not included.
curl --request GET \
--url https://api.tybritelabs.com/v1/customers/{id}/data-requests/{request_id}/export \
--header 'Authorization: Bearer <token>' \
--header 'x-auth-token: <x-auth-token>'import requests
url = "https://api.tybritelabs.com/v1/customers/{id}/data-requests/{request_id}/export"
headers = {
"x-auth-token": "<x-auth-token>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-auth-token': '<x-auth-token>', Authorization: 'Bearer <token>'}
};
fetch('https://api.tybritelabs.com/v1/customers/{id}/data-requests/{request_id}/export', 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.tybritelabs.com/v1/customers/{id}/data-requests/{request_id}/export",
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-auth-token: <x-auth-token>"
],
]);
$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.tybritelabs.com/v1/customers/{id}/data-requests/{request_id}/export"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-auth-token", "<x-auth-token>")
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.tybritelabs.com/v1/customers/{id}/data-requests/{request_id}/export")
.header("x-auth-token", "<x-auth-token>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tybritelabs.com/v1/customers/{id}/data-requests/{request_id}/export")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-auth-token"] = '<x-auth-token>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"format": "customer-data-export",
"version": 1,
"generated_at": "2026-11-07T16:02:11+00:00",
"store_name": "Fernhill Goods",
"customer_id": "2b9d4c1a-6e7f-4a3b-8c2d-1e0f9a8b7c6d",
"environment": "production",
"tables": {
"customers": [
{
"id": "2b9d4c1a-6e7f-4a3b-8c2d-1e0f9a8b7c6d",
"name": "Ada Shopper",
"email": "ada@example.com"
}
],
"online_orders": [
{
"id": "9f8e7d6c-5b4a-4321-8fed-cba987654321",
"order_number": "1042",
"total_amount": 54.5
}
]
}
}
