Location Details
Get location hours, address, and contact info.
Updated
On this page
Overview
Get detailed information about a specific store location.
SDK Usage
import dash from "@/lib/dash"
const { locations } = await dash.locations.list()
const location = locations[0]
// location = {
// id: "loc_abc",
// name: "Austin Store",
// address: "123 Main St",
// city: "Austin",
// state: "TX",
// zip: "78701",
// phone: "555-0123",
// email: "austin@store.com",
// hours: "Mon-Fri 9am-9pm, Sat-Sun 10am-6pm",
// latitude: 30.2672,
// longitude: -97.7431,
// }
Location Detail Page
export function LocationCard({ location }) {
return (
<div className="border rounded p-6">
<h2 className="text-xl font-bold">{location.name}</h2>
<address className="mt-2">
<p>{location.address}</p>
<p>{location.city}, {location.state} {location.zip}</p>
</address>
<p className="mt-2">Phone: <a href={`tel:${location.phone}`}>{location.phone}</a></p>
{location.hours && <p className="mt-1">Hours: {location.hours}</p>}
</div>
)
}
Next Steps
- List Locations — All locations
- getGlobalData() — Store-wide settings