Code examples
Getting shipment tracking
Retrieve shipment tracking information to provide order status updates to your customers.
Use case
Show shipment status on the order detail page and notify customers of delivery updates.
Example: track by order number
const baseUrl = 'https://api.hlc.bike/us/v3.0'
const apiKey = process.env.HLC_API_KEY
const res = await fetch(`${baseUrl}/Orders/Tracking?orderNumber=12345678`, {
headers: { ApiKey: apiKey },
})
if (!res.ok) throw new Error('Tracking not available yet')
const tracking = await res.json()