API Reference - Site Info

Link: https://support.brilliantdirectories.com/support/solutions/articles/12000108659

← Back to API Reference | Getting Started

Site Info

Site Info returns a curated, read-only snapshot of the current website's runtime configuration in a single response. It bundles together the most commonly needed values an integration would otherwise have to pull from several different endpoints: site identity (name, phone, URL), locale (country, language, timezone, date format, distance unit, calendar 12h/24h), currency formatting (code, prefix, suffix, format pattern, dividers), brand image filenames (in both relative and absolute URL form), and the main member directory URL. Use this endpoint as the first call from any external client that needs to render values consistent with the website's settings.

Model name in URL: site_info — Read-only $w projection; not backed by a DB table.

The Site Info Object

FieldTypeDescription
website_idintegerUnique identifier of this BD website (websites.website_id on the main database)
website_namestringWebsite display name (EG Brilliant Directories Demo)
website_phonestringPublic contact phone number for the website (EG +1-555-0100)
full_urlstringCanonical HTTPS URL of the site (EG https://demo.brilliantdirectories.com); empty string when no host is configured
professionstringPrimary profession/vertical configured for the site (EG Attorney)
industrystringPrimary industry configured for the site (EG Legal Services)
primary_countrystringTwo-letter ISO 3166-1 alpha-2 country code (EG US)
languagestringSite language locale (EG en-US)
timezonestringIANA timezone identifier (EG America/Los_Angeles)
date_formatstringDefault jQuery-style date format used across the site (EG MM/DD/YYYY)
distance_formatstringDistance unit; one of mi or km
website_currencystringISO 4217 currency code (EG USD)
currency_prefixstringSymbol shown before a currency amount (EG $)
currency_suffixstringSymbol shown after a currency amount (often empty for USD-style locales)
currency_formatstringHuman-readable format template using zero placeholders to show the grouping pattern (EG 0,000.00)
currency_decimal_dividerstringCharacter that separates the integer and fractional parts of a currency amount (EG .)
currency_thousand_dividerstringCharacter that groups thousands in a currency amount (EG ,); empty string when the locale uses no thousands grouping
brand_images_relativeobjectBrand image filenames as stored (relative paths). Keys: website_logo, website_mascot, website_background, favicon, default_profile_image, default_logo_image, verified_member_image, watermark. Values are strings; empty string when no image is set
brand_images_absoluteobjectBrand image URLs with the site host prepended. Same keys as brand_images_relative; values are absolute HTTPS URLs, or empty string when no image is set. Values that are already absolute URLs are returned unchanged
main_directory_url_relativestringRelative URL path of the main member directory / search results page; defaults to search_results or whatever the Advanced Setting default_search_url overrides it to
main_directory_url_absolutestringAbsolute URL of the main member directory page (https://{host}/{relative}); empty string when the site host is blank
calendar_24hour_formatstringCalendar/time display format; one of 12h or 24h. Derived from the boolean setting calendar_24hour_format (012h, 124h)

Retrieve Site Info

GET /api/v2/site_info/get

Returns the current website's curated configuration as a single object. Takes no parameters beyond authentication.

Example Request

Copy
curl -X GET "https://www.yourdomain.com/api/v2/site_info/get" \
  -H "X-Api-Key: your-api-key-here"

Example Response

Copy
{
  "status": "success",
  "message": {
    "website_id": 29106,
    "website_name": "Brilliant Directories Demo",
    "website_phone": "+1-555-0100",
    "full_url": "https://demo.brilliantdirectories.com",
    "profession": "Attorney",
    "industry": "Legal Services",
    "primary_country": "US",
    "language": "en-US",
    "timezone": "America/Los_Angeles",
    "date_format": "MM/DD/YYYY",
    "distance_format": "mi",
    "website_currency": "USD",
    "currency_prefix": "$",
    "currency_suffix": "",
    "currency_format": "0,000.00",
    "currency_decimal_divider": ".",
    "currency_thousand_divider": ",",
    "brand_images_relative": {
      "website_logo": "uploads/logo.png",
      "website_mascot": "",
      "website_background": "uploads/bg.jpg",
      "favicon": "uploads/favicon.ico",
      "default_profile_image": "uploads/default-profile.png",
      "default_logo_image": "uploads/default-logo.png",
      "verified_member_image": "uploads/verified.png",
      "watermark": ""
    },
    "brand_images_absolute": {
      "website_logo": "https://demo.brilliantdirectories.com/uploads/logo.png",
      "website_mascot": "",
      "website_background": "https://demo.brilliantdirectories.com/uploads/bg.jpg",
      "favicon": "https://demo.brilliantdirectories.com/uploads/favicon.ico",
      "default_profile_image": "https://demo.brilliantdirectories.com/uploads/default-profile.png",
      "default_logo_image": "https://demo.brilliantdirectories.com/uploads/default-logo.png",
      "verified_member_image": "https://demo.brilliantdirectories.com/uploads/verified.png",
      "watermark": ""
    },
    "main_directory_url_relative": "search_results",
    "main_directory_url_absolute": "https://demo.brilliantdirectories.com/search_results",
    "calendar_24hour_format": "12h"
  }
}