Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.tybritelabs.com/llms.txt

Use this file to discover all available pages before exploring further.

The SystemService class provides health checks and basic metadata about the Tybrite API. These methods are public and do not require authentication apart from getStoreInfo. Access this service via client.system.

getStoreInfo

Retrieve comprehensive store metadata, configuration, and catalog statistics in a single API call. This endpoint is specifically optimized for initial data synchronizations, AI agent context setting, and dashboard overviews.
  • Caching: Responses are cached for 5 minutes by default.
  • Selective Loading: Use the sections parameter to tailor the response and reduce payload size by up to 80%.
// 1. Get full store configuration (all sections)
const fullInfo = await client.system.getStoreInfo();
console.log(`Connected to: ${fullInfo.store.name}`);
console.log(`Currencies supported: ${fullInfo.store.currencies.join(', ')}`);

// 2. Optimized request for AI/Agent context
const { features, catalog } = await client.system.getStoreInfo({
  sections: 'features,catalog'
});

if (features.ai_recommendations) {
  console.log(`AI enabled. Total active products: ${catalog.products.active}`);
}

// 3. Bypass cache for fresh settings
const freshData = await client.system.getStoreInfo({ cache: false });
Available Sections:
SectionDescription
catalogProducts, categories, collections, and brand counts.
pricingDynamic pricing flags and customer tier configurations.
promotionsActive discounts and campaign summaries.
paymentsMerchant’s active payment providers and methods.
shippingDelivery zones and fee thresholds.
cmsNumber of published posts and lookbooks.
featuresPlatform capability flags (AI, Currency, etc.).
The store section (ID, Name, Timezone, Currencies) is always included regardless of the filtered sections.

getApiInfo

Retrieve basic information about the API, including the current version and list of available endpoint prefixes.
const info = await client.system.getApiInfo();

console.log(`Connected to: ${info.name} v${info.version}`);

healthCheck

Verify the operational status of the Tybrite API gateway. This is useful for monitoring or connectivity troubleshooting.
const health = await client.system.healthCheck();

if (health.status === 'healthy') {
  console.log('API is online and operational.');
}

Edge caching: getStoreInfo responses are cached for 5 minutes (300s) at the Cloudflare edge. Repeat calls from the same region typically hit the edge cache and never reach the origin worker. Pass cache: false to bypass.

Response Codes

getApiInfo (GET /) and healthCheck (GET /v1/health)

CodeMeaning
200Service is reachable.
These endpoints are unauthenticated public endpoints — no 401, 403, or 429 is emitted.

getStoreInfo (GET /v1/store/info)

Requires authentication. Both publishable and secret keys are accepted.
CodeMeaning
200Store info returned (possibly served from edge cache).
400Invalid sections parameter (unknown section name).
401Invalid or missing API key.
403Forbidden (e.g., key disabled or store suspended).
429Rate limit exceeded.
500Internal server error.