Code examples

Getting prices

Product pricing can change frequently. Always fetch current prices before finalizing orders to ensure accuracy.


Use case

Update cart totals just before order creation to avoid stale prices.


Example: price lookup by SKU

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

const sku = ['020056-07', '861070-L-001'].join(',')
const res = await fetch(`${baseUrl}/Catalog/Products/Prices?sku=${sku}`, {
  headers: { ApiKey: apiKey },
})

const prices = await res.json()
Previous
Getting inventory