/api/public/v1/locationsStore Locations
Public Autrex store locations with address, geo coordinates, phone, Google identifiers, services (for example in-store pickup) and weekly opening hours shaped for schema.org OpeningHoursSpecification. Served by the ERP (public, read-only, non-sensitive fields only) and reachable through the same-origin storefront /api/erp proxy (base URL: {site}/api/erp). `opening_hours` is null when no schedule is linked (hours are never guessed) and `geo` is null when no position is known. The storefront /locations/{slug} pages and their AutoPartsStore JSON-LD are built from this endpoint through src/lib/api/locations.ts, which validates the response and falls back to an identity snapshot carrying the Google Business Profile hours on any error or missing schedule; Cornwall (coming soon) is never published.
The same-origin /api/erp relay accepts only storefront allow-listed paths and methods; other routes return 404. Browser-supplied API keys are discarded. Direct public API endpoints remain available at their documented URLs.
Use Cases
- Answer "is the Ottawa store open now" or "where can I pick up an order"
- Render store pages and AutoPartsStore structured data from one source
- Find the nearest store using geo coordinates
Request Example
curl "https://autrex.ca/api/erp/api/public/v1/locations"fetch("https://autrex.ca/api/erp/api/public/v1/locations")Response
{
"locations": [
{
"slug": "winchester",
"name": "Autrex Winchester",
"description": "Autrex Winchester is our head office and tire and wheel warehouse, with in-store pickup for online orders.",
"address": {
"street_address": "12555 County Rd 43",
"address_line_2": null,
"locality": "Winchester",
"region": "ON",
"postal_code": "K0C 2K0",
"country": "CA"
},
"geo": {
"latitude": 45.0827,
"longitude": -75.3104
},
"phone": "+1-866-461-2787",
"google_place_id": "ChIJ25Y97xXPzUwRNcUfczf4TTc",
"google_store_code": "14913180716963978874",
"services": [
"pickup"
],
"opening_hours": {
"timezone": "America/Toronto",
"days": [
{
"day_of_week": "Monday",
"is_open": true,
"opens": "08:00",
"closes": "16:00"
},
{
"day_of_week": "Tuesday",
"is_open": true,
"opens": "08:00",
"closes": "16:00"
},
{
"day_of_week": "Wednesday",
"is_open": true,
"opens": "08:00",
"closes": "16:00"
},
{
"day_of_week": "Thursday",
"is_open": true,
"opens": "08:00",
"closes": "16:00"
},
{
"day_of_week": "Friday",
"is_open": true,
"opens": "08:00",
"closes": "16:00"
},
{
"day_of_week": "Saturday",
"is_open": false,
"opens": "00:00",
"closes": "00:00"
},
{
"day_of_week": "Sunday",
"is_open": false,
"opens": "00:00",
"closes": "00:00"
}
],
"specification": [
{
"dayOfWeek": [
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday"
],
"opens": "08:00",
"closes": "16:00"
},
{
"dayOfWeek": [
"Saturday",
"Sunday"
],
"opens": "00:00",
"closes": "00:00"
}
]
}
},
{
"slug": "ottawa",
"name": "Autrex Ottawa",
"description": "Our Ottawa location serves the National Capital Region.",
"address": {
"street_address": "1131 Newmarket St",
"address_line_2": null,
"locality": "Ottawa",
"region": "ON",
"postal_code": "K1B 4N4",
"country": "CA"
},
"geo": {
"latitude": 45.409592,
"longitude": -75.6242159
},
"phone": "+1-866-461-2787",
"google_place_id": null,
"google_store_code": null,
"services": [
"pickup"
],
"opening_hours": {
"timezone": "America/Toronto",
"days": [
{
"day_of_week": "Monday",
"is_open": true,
"opens": "07:30",
"closes": "17:00"
},
{
"day_of_week": "Tuesday",
"is_open": true,
"opens": "07:30",
"closes": "17:00"
},
{
"day_of_week": "Wednesday",
"is_open": true,
"opens": "07:30",
"closes": "17:00"
},
{
"day_of_week": "Thursday",
"is_open": true,
"opens": "07:30",
"closes": "17:00"
},
{
"day_of_week": "Friday",
"is_open": true,
"opens": "07:30",
"closes": "17:00"
},
{
"day_of_week": "Saturday",
"is_open": false,
"opens": "00:00",
"closes": "00:00"
},
{
"day_of_week": "Sunday",
"is_open": false,
"opens": "00:00",
"closes": "00:00"
}
],
"specification": [
{
"dayOfWeek": [
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday"
],
"opens": "07:30",
"closes": "17:00"
},
{
"dayOfWeek": [
"Saturday",
"Sunday"
],
"opens": "00:00",
"closes": "00:00"
}
]
}
}
],
"generated_at": "2026-10-08T12:00:00.000Z"
}{
"error": "Provide url or page_type"
}Caching
- Max Age
- 300s
- Stale While Revalidate
- 3600s