Docs / Developers

REST API

Authenticate with API keys and manage locations, tags, and leads from your own systems.

API keys are available on the Premium plan.

Authentication

Create a key in the app under Developers → API keys. Keys start with sk_ and are shown once. Send it as a bearer token:

curl https://app.mapstockist.com/admin/api/locations \
  -H "Authorization: Bearer sk_your_key"

A key has full access to your store’s locator data, the same as the app’s own admin, so keep it secret and give each system its own key. You can revoke a key at any time and it stops working immediately.

Admin endpoints

All under /admin/api:

Resource Endpoints
Account GET me (shop, plan, usage), GET plans, GET countries, GET/PUT settings
Locations GET/POST locations, GET/PUT/DELETE locations/{id}, POST locations/{id}/geocode, GET/PUT locations/{id}/products, POST locations/bulk
Filters (tags) GET/POST tags, PUT/DELETE tags/{id}
Hours GET/POST hours-templates, PUT/DELETE hours-templates/{id}
Import and export POST import, GET import/template, GET import-jobs, GET export, POST/DELETE sample-data
Sync PUT sheet, POST sheet/sync, PUT shopify-sync, POST shopify-sync/run
Products GET/POST products, GET shopify/products (search your Shopify catalog)
Leads GET leads, GET/PUT leads/{id}, POST leads/{id}/approve, POST leads/{id}/reject, GET/PUT lead-routing, GET/PUT territories
Analytics GET analytics/summary, GET analytics/heatmap, GET analytics/export
Developers GET/POST api-keys, DELETE api-keys/{id}, GET/POST webhooks, DELETE webhooks/{id}, GET webhooks/{id}/deliveries

Endpoints for features on a higher plan return 402 with "error": "plan_limit".

PUT settings changes only the fields you send; the rest keep their current values.

Public search API

The storefront API needs no key. It lives under /api/v1/shops/{handle}:

curl "https://app.mapstockist.com/api/v1/shops/my-store/search?lat=51.52&lng=-0.08&radius=10&unit=km&open_now=true"

Search parameters:

Parameter Meaning
lat, lng Center point
q Place to geocode, such as “Brooklyn” or “SW1A 1AA”
text Fuzzy match on name, address, city, ZIP, or postcode
radius, unit Radius in kilometers (km) or miles (mi)
bounds Map bounds as south,west,north,east
tags, tag_mode Comma-separated tag slugs, matched any or all (Basic and above)
product Product id, Shopify GID, or handle (Plus and above)
open_now Only open locations; requires opening hours (Basic and above)
limit, offset Pagination

Other public endpoints: config, autocomplete, locations/{slug}, events, contact, and dealer-applications.

Geocoding status

A location awaiting a lookup remains geocode_status: "pending" during temporary limits or outages. Location detail responses include nullable geocode_retry_at. POST locations/{id}/geocode can return a pending location when lookup is deferred; it does not label that address as failed. GET me includes a geocoding object with nullable reason and retry_at for the location provider’s current availability. Reasons include daily_limit, provider_unavailable, not_configured, and disabled; the retry time is an estimate.

Public search responses retain text_fallback and add nullable geocoding_status: not_found, shop_limit, daily_limit, unavailable, or timeout. When text_fallback is true, results match the place string as text rather than using it as a geographic center. For consistent pagination, send that string as text instead of q on subsequent pages. A successful lookup or a search needing no lookup returns a null status.

Public config responses include map.geocoding_attribution, containing the provider credits to display alongside results, including list-only views.