API Documentation
Technical reference for integrating with the PinPoint Store Locator API.
Overview
PinPoint provides a RESTful API for accessing store data. The API is primarily used by the storefront widget, but you can also use it for custom integrations.
Authentication
API requests are scoped to your Shopify shop. There are two authentication methods:
App Proxy (Recommended for Storefronts)
The storefront widget uses Shopify's App Proxy feature. Requests are automatically authenticated based on the shop context.
GET https://your-store.myshopify.com/apps/store-locator/api/public/stores/Direct API Access
For server-to-server integrations, include your shop domain as a query parameter:
GET https://pinpoint-store-locator.replit.app/api/public/stores/?shop=your-store.myshopify.comPublic Endpoints
These endpoints are available for storefront and public integrations.
GET /api/public/stores/
Retrieve a list of active stores.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
search | string | Search by name, city, state, ZIP, or address |
tag | string | Filter by tag name (case-insensitive) |
featured | boolean | Filter to featured stores only |
product | integer | Filter by product ID |
variant | integer | Filter by variant ID |
lat | decimal | Latitude for distance calculations |
lng | decimal | Longitude for distance calculations |
radius | integer | Search radius (requires lat/lng) |
Response
{
"count": 50,
"results": [
{
"id": 1,
"name": "Downtown Store",
"address": "123 Main St",
"city": "New York",
"state": "NY",
"zip_code": "10001",
"country": "USA",
"phone": "+1 (555) 123-4567",
"website": "https://example.com",
"latitude": "40.712776",
"longitude": "-74.005974",
"hours": "Mon-Fri 9am-5pm",
"description": "Our flagship location",
"image_url": "",
"is_featured": true,
"tags": [
{"id": 1, "name": "Flagship", "color": "#667eea"}
],
"custom_field_values": {},
"distance": 2.5
}
]
}GET /api/public/settings/
Retrieve widget configuration settings.
GET /api/public/tags/
Retrieve available tags for filtering.
GET /api/public/filters/
Retrieve search filter definitions and options.
GET /api/public/products/
Retrieve products available for filtering (if product associations are enabled).
POST /api/public/analytics/track/
Track analytics events from the widget.
Request Body
{
"event_type": "store_click",
"store_id": 123,
"session_id": "abc-123"
}Event Types
view- Widget loadedsearch- Search performedstore_click- Store card clickedmarker_click- Map marker clickeddirections_click- Directions button clickedphone_click- Phone number clicked
POST /api/public/submissions/
Submit a new store suggestion (if external submissions are enabled).
Pagination
List endpoints return paginated results:
count- Total number of resultsnext- URL for next page (if available)previous- URL for previous page (if available)results- Array of items
Use ?page=2 to request specific pages.
Rate Limits
The API is subject to rate limiting to ensure fair usage:
- Public endpoints: 100 requests per minute per shop
- Analytics tracking: 1000 events per minute per shop
Error Responses
| Status | Description |
|---|---|
400 | Bad request - invalid parameters |
401 | Unauthorized - missing or invalid authentication |
403 | Forbidden - feature not available on plan |
404 | Not found - resource does not exist |
429 | Too many requests - rate limit exceeded |
500 | Internal server error |
