Theme

Technical guides

Headers (Token-based)

Token-based authentication using web store access tokens eliminates the need to store customer credentials. This approach is ideal for server-to-server integrations and automated processes.


Required Headers

All API requests must include the following headers:

HeaderRequiredDescription
ApiKeyYesAccess token generated from the HLC web store
languageNoLocalization language: en (English) or fr (French)
callerNameNoApplication identifier for tracking and debugging

Multi-Tenant Platforms

If you operate a platform serving multiple customers with different API tokens, the callerName header is required. Platforms that fail to provide callerName may experience service degradation as HLC cannot guarantee SLA compliance without proper request attribution.


Implementation Example

const apiUrl = 'https://api.hlc.bike/us/v3.0'
const apiKey = process.env.HLC_API_KEY

const response = await fetch(`${apiUrl}/Catalog/Brands`, {
  headers: {
    ApiKey: apiKey,
    language: 'en',
    callerName: 'dealer-portal-v2',
  },
})

if (!response.ok) {
  throw new Error(`HTTP ${response.status}: ${response.statusText}`)
}

const brands = await response.json()

Additional Headers

Other HTTP headers control specific API behaviors:

  • Pagination: Use pageStartIndex and pageSize query parameters (see Pagination guide)
  • Compression: Include Accept-Encoding: gzip, deflate to reduce response sizes (see Compression guide)

Previous
State codes