Maptera Store Locator API
Version 1.0.0
Programmatic access to stores, configuration, and widget telemetry for Maptera. Auth: dashboard routes use session cookies; public API (v1) uses Bearer API keys (`Authorization: Bearer mk_xxx`).
Servers
https://maptera.switchlabs.dev— Productionhttp://localhost:3000— Local dev
Authentication
ApiKeyAuth
Send `Authorization: Bearer mk_xxx`
Authentication definition
{
"type": "http",
"scheme": "bearer",
"bearerFormat": "APIKey",
"description": "Send `Authorization: Bearer mk_xxx`"
}ShopifySession
Shopify App Bridge session token
Authentication definition
{
"type": "http",
"scheme": "bearer",
"bearerFormat": "JWT",
"description": "Shopify App Bridge session token"
}GET /api/health
Health check
Responses
{
"200": {
"description": "OK"
}
}Complete operation definition
{
"summary": "Health check",
"responses": {
"200": {
"description": "OK"
}
}
}GET /api/v1/api-keys
List API keys
Responses
{
"200": {
"description": "List of keys",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ApiKey"
}
}
}
}
}
}
}
}Complete operation definition
{
"summary": "List API keys",
"security": [
{
"ApiKeyAuth": []
}
],
"responses": {
"200": {
"description": "List of keys",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ApiKey"
}
}
}
}
}
}
}
}
}POST /api/v1/api-keys
Create API key
Request body
{
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiKeyCreateRequest"
}
}
}
}Responses
{
"201": {
"description": "Created",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"data": {
"$ref": "#/components/schemas/ApiKeyCreateResponse"
}
},
"required": [
"success",
"data"
]
}
}
}
},
"409": {
"description": "Duplicate",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
}Complete operation definition
{
"summary": "Create API key",
"security": [
{
"ApiKeyAuth": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiKeyCreateRequest"
}
}
}
},
"responses": {
"201": {
"description": "Created",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"data": {
"$ref": "#/components/schemas/ApiKeyCreateResponse"
}
},
"required": [
"success",
"data"
]
}
}
}
},
"409": {
"description": "Duplicate",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
}
}GET /api/v1/api-keys/{id}
Get API key
Parameters
[
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
}
}
]Responses
{
"200": {
"description": "Key",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiKey"
}
}
}
},
"404": {
"description": "Not found"
}
}Complete operation definition
{
"summary": "Get API key",
"security": [
{
"ApiKeyAuth": []
}
],
"responses": {
"200": {
"description": "Key",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiKey"
}
}
}
},
"404": {
"description": "Not found"
}
}
}PUT /api/v1/api-keys/{id}
Update API key
Parameters
[
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
}
}
]Request body
{
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiKeyUpdateRequest"
}
}
}
}Responses
{
"200": {
"description": "Updated"
},
"404": {
"description": "Not found"
}
}Complete operation definition
{
"summary": "Update API key",
"security": [
{
"ApiKeyAuth": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiKeyUpdateRequest"
}
}
}
},
"responses": {
"200": {
"description": "Updated"
},
"404": {
"description": "Not found"
}
}
}DELETE /api/v1/api-keys/{id}
Delete API key
Parameters
[
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
}
}
]Responses
{
"200": {
"description": "Deleted"
},
"404": {
"description": "Not found"
}
}Complete operation definition
{
"summary": "Delete API key",
"security": [
{
"ApiKeyAuth": []
}
],
"responses": {
"200": {
"description": "Deleted"
},
"404": {
"description": "Not found"
}
}
}GET /api/v1/stores
List stores (company scoped)
Parameters
[
{
"name": "page",
"in": "query",
"schema": {
"type": "integer",
"default": 1
}
},
{
"name": "limit",
"in": "query",
"schema": {
"type": "integer",
"default": 50
}
},
{
"name": "search",
"in": "query",
"schema": {
"type": "string"
}
},
{
"name": "city",
"in": "query",
"schema": {
"type": "string"
}
},
{
"name": "state",
"in": "query",
"schema": {
"type": "string"
}
},
{
"name": "country",
"in": "query",
"schema": {
"type": "string"
}
},
{
"name": "is_active",
"in": "query",
"schema": {
"type": "boolean"
}
},
{
"name": "sort_by",
"in": "query",
"schema": {
"type": "string",
"enum": [
"name",
"city",
"state",
"created_at",
"updated_at"
],
"default": "created_at"
}
},
{
"name": "sort_order",
"in": "query",
"schema": {
"type": "string",
"enum": [
"asc",
"desc"
],
"default": "desc"
}
}
]Responses
{
"200": {
"description": "Store list",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"data": {
"type": "object",
"properties": {
"stores": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Store"
}
},
"pagination": {
"$ref": "#/components/schemas/Pagination"
}
}
}
}
}
}
}
}
}Complete operation definition
{
"summary": "List stores (company scoped)",
"security": [
{
"ApiKeyAuth": []
}
],
"parameters": [
{
"name": "page",
"in": "query",
"schema": {
"type": "integer",
"default": 1
}
},
{
"name": "limit",
"in": "query",
"schema": {
"type": "integer",
"default": 50
}
},
{
"name": "search",
"in": "query",
"schema": {
"type": "string"
}
},
{
"name": "city",
"in": "query",
"schema": {
"type": "string"
}
},
{
"name": "state",
"in": "query",
"schema": {
"type": "string"
}
},
{
"name": "country",
"in": "query",
"schema": {
"type": "string"
}
},
{
"name": "is_active",
"in": "query",
"schema": {
"type": "boolean"
}
},
{
"name": "sort_by",
"in": "query",
"schema": {
"type": "string",
"enum": [
"name",
"city",
"state",
"created_at",
"updated_at"
],
"default": "created_at"
}
},
{
"name": "sort_order",
"in": "query",
"schema": {
"type": "string",
"enum": [
"asc",
"desc"
],
"default": "desc"
}
}
],
"responses": {
"200": {
"description": "Store list",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"data": {
"type": "object",
"properties": {
"stores": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Store"
}
},
"pagination": {
"$ref": "#/components/schemas/Pagination"
}
}
}
}
}
}
}
}
}
}POST /api/v1/stores
Create store
Request body
{
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/StoreCreateRequest"
}
}
}
}Responses
{
"201": {
"description": "Created",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Store"
}
}
}
}
}Complete operation definition
{
"summary": "Create store",
"security": [
{
"ApiKeyAuth": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/StoreCreateRequest"
}
}
}
},
"responses": {
"201": {
"description": "Created",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Store"
}
}
}
}
}
}GET /api/v1/stores/{id}
Get store
Parameters
[
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
}
}
]Responses
{
"200": {
"description": "Store",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Store"
}
}
}
},
"404": {
"description": "Not found"
}
}Complete operation definition
{
"summary": "Get store",
"security": [
{
"ApiKeyAuth": []
}
],
"responses": {
"200": {
"description": "Store",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Store"
}
}
}
},
"404": {
"description": "Not found"
}
}
}PUT /api/v1/stores/{id}
Update store
Parameters
[
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
}
}
]Request body
{
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/StoreUpdateRequest"
}
}
}
}Responses
{
"200": {
"description": "Updated",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Store"
}
}
}
}
}Complete operation definition
{
"summary": "Update store",
"security": [
{
"ApiKeyAuth": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/StoreUpdateRequest"
}
}
}
},
"responses": {
"200": {
"description": "Updated",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Store"
}
}
}
}
}
}DELETE /api/v1/stores/{id}
Delete store
Parameters
[
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
}
}
]Responses
{
"200": {
"description": "Deleted"
},
"404": {
"description": "Not found"
}
}Complete operation definition
{
"summary": "Delete store",
"security": [
{
"ApiKeyAuth": []
}
],
"responses": {
"200": {
"description": "Deleted"
},
"404": {
"description": "Not found"
}
}
}POST /api/v1/stores/bulk
Bulk create stores
Request body
{
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BulkStoreCreateRequest"
}
}
}
}Responses
{
"200": {
"description": "Bulk created (with per-item results)"
}
}Complete operation definition
{
"summary": "Bulk create stores",
"security": [
{
"ApiKeyAuth": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BulkStoreCreateRequest"
}
}
}
},
"responses": {
"200": {
"description": "Bulk created (with per-item results)"
}
}
}PUT /api/v1/stores/bulk
Bulk update stores
Request body
{
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BulkStoreUpdateRequest"
}
}
}
}Responses
{
"200": {
"description": "Bulk updated (with per-item results)"
}
}Complete operation definition
{
"summary": "Bulk update stores",
"security": [
{
"ApiKeyAuth": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BulkStoreUpdateRequest"
}
}
}
},
"responses": {
"200": {
"description": "Bulk updated (with per-item results)"
}
}
}POST /api/v1/sync-runs
Start an idempotent full-snapshot store synchronization run
Creates or returns a run keyed by idempotencyKey. Missing stores are never deactivated until the explicit completion request succeeds.
Request body
{
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"source",
"idempotencyKey",
"expectedRecords"
],
"properties": {
"source": {
"type": "string"
},
"idempotencyKey": {
"type": "string"
},
"expectedRecords": {
"type": "integer",
"minimum": 0,
"description": "Required full-snapshot record count; completion fails unless the received count matches exactly."
},
"dryRun": {
"type": "boolean",
"default": false
}
}
}
}
}
}Responses
{
"200": {
"description": "Existing idempotent run"
},
"201": {
"description": "Run created"
},
"409": {
"description": "Plan capacity exceeded"
}
}Complete operation definition
{
"summary": "Start an idempotent full-snapshot store synchronization run",
"description": "Creates or returns a run keyed by idempotencyKey. Missing stores are never deactivated until the explicit completion request succeeds.",
"security": [
{
"ApiKeyAuth": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"source",
"idempotencyKey",
"expectedRecords"
],
"properties": {
"source": {
"type": "string"
},
"idempotencyKey": {
"type": "string"
},
"expectedRecords": {
"type": "integer",
"minimum": 0,
"description": "Required full-snapshot record count; completion fails unless the received count matches exactly."
},
"dryRun": {
"type": "boolean",
"default": false
}
}
}
}
}
},
"responses": {
"200": {
"description": "Existing idempotent run"
},
"201": {
"description": "Run created"
},
"409": {
"description": "Plan capacity exceeded"
}
}
}GET /api/v1/sync-runs/{id}
Get a sync run and its durable batch receipts
Parameters
[
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
}
}
]Responses
{
"200": {
"description": "Run receipt"
},
"404": {
"description": "Not found"
}
}Complete operation definition
{
"summary": "Get a sync run and its durable batch receipts",
"security": [
{
"ApiKeyAuth": []
}
],
"responses": {
"200": {
"description": "Run receipt"
},
"404": {
"description": "Not found"
}
}
}DELETE /api/v1/sync-runs/{id}
Abort an open run without deactivating stores
Parameters
[
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
}
}
]Responses
{
"200": {
"description": "Run aborted"
},
"409": {
"description": "Run is no longer open"
}
}Complete operation definition
{
"summary": "Abort an open run without deactivating stores",
"security": [
{
"ApiKeyAuth": []
}
],
"responses": {
"200": {
"description": "Run aborted"
},
"409": {
"description": "Run is no longer open"
}
}
}POST /api/v1/sync-runs/{id}/batches
Validate and upsert one snapshot batch (maximum 100 stores)
Parameters
[
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
}
}
]Request body
{
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"batchKey",
"stores"
],
"properties": {
"batchKey": {
"type": "string"
},
"retry": {
"type": "boolean",
"description": "Replace a previously failed batch receipt after correcting all rows."
},
"geocodeMissing": {
"type": "boolean",
"default": false,
"description": "Best-effort automatic geocoding for at most 10 new or changed addresses in this request. Larger batches must include coordinates or be split."
},
"stores": {
"type": "array",
"maxItems": 100,
"items": {
"$ref": "#/components/schemas/SyncStoreRequest"
}
}
}
}
}
}
}Responses
{
"200": {
"description": "Existing idempotent receipt"
},
"202": {
"description": "Batch applied"
},
"422": {
"description": "Validation failed; no rows applied"
}
}Complete operation definition
{
"summary": "Validate and upsert one snapshot batch (maximum 100 stores)",
"security": [
{
"ApiKeyAuth": []
}
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"batchKey",
"stores"
],
"properties": {
"batchKey": {
"type": "string"
},
"retry": {
"type": "boolean",
"description": "Replace a previously failed batch receipt after correcting all rows."
},
"geocodeMissing": {
"type": "boolean",
"default": false,
"description": "Best-effort automatic geocoding for at most 10 new or changed addresses in this request. Larger batches must include coordinates or be split."
},
"stores": {
"type": "array",
"maxItems": 100,
"items": {
"$ref": "#/components/schemas/SyncStoreRequest"
}
}
}
}
}
}
},
"responses": {
"200": {
"description": "Existing idempotent receipt"
},
"202": {
"description": "Batch applied"
},
"422": {
"description": "Validation failed; no rows applied"
}
}
}POST /api/v1/sync-runs/{id}/complete
Atomically complete a snapshot and deactivate unseen stores from the same source
Parameters
[
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
}
}
]Request body
{
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"force": {
"type": "boolean",
"default": false,
"description": "Required only for an intentionally empty snapshot or one that removes more than half of the source's active locations."
}
}
}
}
}
}Responses
{
"200": {
"description": "Immutable completion receipt"
},
"409": {
"description": "Count, validation, duplicate, or plan-capacity gate failed; no deactivation performed"
}
}Complete operation definition
{
"summary": "Atomically complete a snapshot and deactivate unseen stores from the same source",
"security": [
{
"ApiKeyAuth": []
}
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
}
}
],
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"force": {
"type": "boolean",
"default": false,
"description": "Required only for an intentionally empty snapshot or one that removes more than half of the source's active locations."
}
}
}
}
}
},
"responses": {
"200": {
"description": "Immutable completion receipt"
},
"409": {
"description": "Count, validation, duplicate, or plan-capacity gate failed; no deactivation performed"
}
}
}GET /api/widget/bootstrap
Load public locator configuration and a short-lived signed event context
Parameters
[
{
"name": "publication",
"in": "query",
"schema": {
"type": "string"
}
},
{
"name": "shop",
"in": "query",
"schema": {
"type": "string"
}
}
]Responses
{
"200": {
"description": "Bootstrap document. data.capabilities.multilingual is true only for Scale (including legacy enterprise aliases). V2 /widget/map accepts language=en|nl|fr|de (regional variants supported) only with this capability. The parent bridge follows the website HTML lang; merchant-authored content remains unchanged."
}
}Complete operation definition
{
"summary": "Load public locator configuration and a short-lived signed event context",
"parameters": [
{
"name": "publication",
"in": "query",
"schema": {
"type": "string"
}
},
{
"name": "shop",
"in": "query",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Bootstrap document. data.capabilities.multilingual is true only for Scale (including legacy enterprise aliases). V2 /widget/map accepts language=en|nl|fr|de (regional variants supported) only with this capability. The parent bridge follows the website HTML lang; merchant-authored content remains unchanged."
}
}
}GET /api/widget/markers
Load the compressed minimal marker feed
Parameters
[
{
"name": "publication",
"in": "query",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "includeAddresses",
"in": "query",
"schema": {
"type": "boolean",
"default": false
},
"description": "Opt into public street/postal summaries with details_pending=true. Without it, legacy clients receive blank address and zip_code. The repair tuple profile is unchanged."
}
]Responses
{
"200": {
"description": "Active geocoded markers"
}
}Complete operation definition
{
"summary": "Load the compressed minimal marker feed",
"parameters": [
{
"name": "publication",
"in": "query",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "includeAddresses",
"in": "query",
"schema": {
"type": "boolean",
"default": false
},
"description": "Opt into public street/postal summaries with details_pending=true. Without it, legacy clients receive blank address and zip_code. The repair tuple profile is unchanged."
}
],
"responses": {
"200": {
"description": "Active geocoded markers"
}
}
}POST /api/widget/search
Perform authoritative text or coordinate search
Request body
{
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"publication",
"radiusMiles"
],
"properties": {
"publication": {
"type": "string"
},
"query": {
"type": "string"
},
"latitude": {
"type": "number"
},
"longitude": {
"type": "number"
},
"radiusMiles": {
"type": "number"
},
"searchSource": {
"type": "string",
"enum": [
"text",
"autocomplete",
"current_location"
]
}
}
}
}
}
}Responses
{
"200": {
"description": "Search ID, exact result count, zero-result state, and stores"
}
}Complete operation definition
{
"summary": "Perform authoritative text or coordinate search",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"publication",
"radiusMiles"
],
"properties": {
"publication": {
"type": "string"
},
"query": {
"type": "string"
},
"latitude": {
"type": "number"
},
"longitude": {
"type": "number"
},
"radiusMiles": {
"type": "number"
},
"searchSource": {
"type": "string",
"enum": [
"text",
"autocomplete",
"current_location"
]
}
}
}
}
}
},
"responses": {
"200": {
"description": "Search ID, exact result count, zero-result state, and stores"
}
}
}POST /api/widget/events
Record a signed, tenant-scoped locator event
Accepts locator_view, search_submitted, dealer_selected, and website/directions/phone click events. A 202 is returned only after durable persistence (or safe eventId deduplication); transient ingestion failure returns 503.
Responses
{
"202": {
"description": "Durably persisted or safely deduplicated"
},
"400": {
"description": "Invalid event"
},
"401": {
"description": "Invalid or expired context"
},
"503": {
"description": "Event could not be persisted after retry"
}
}Complete operation definition
{
"summary": "Record a signed, tenant-scoped locator event",
"description": "Accepts locator_view, search_submitted, dealer_selected, and website/directions/phone click events. A 202 is returned only after durable persistence (or safe eventId deduplication); transient ingestion failure returns 503.",
"responses": {
"202": {
"description": "Durably persisted or safely deduplicated"
},
"400": {
"description": "Invalid event"
},
"401": {
"description": "Invalid or expired context"
},
"503": {
"description": "Event could not be persisted after retry"
}
}
}GET /api/widget/stores
Public widget: stores by shop or company
Parameters
[
{
"name": "shop",
"in": "query",
"schema": {
"type": "string",
"description": "myshop.myshopify.com"
}
},
{
"name": "company",
"in": "query",
"schema": {
"type": "integer"
}
},
{
"name": "near",
"in": "query",
"schema": {
"type": "string",
"description": "lat,lng for filtering"
}
},
{
"name": "radius",
"in": "query",
"schema": {
"type": "number",
"default": 50
}
}
]Responses
{
"200": {
"description": "Widget stores",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"stores": {
"type": "array",
"items": {
"$ref": "#/components/schemas/WidgetStore"
}
},
"count": {
"type": "integer"
}
}
}
}
}
}
}Complete operation definition
{
"summary": "Public widget: stores by shop or company",
"parameters": [
{
"name": "shop",
"in": "query",
"schema": {
"type": "string",
"description": "myshop.myshopify.com"
}
},
{
"name": "company",
"in": "query",
"schema": {
"type": "integer"
}
},
{
"name": "near",
"in": "query",
"schema": {
"type": "string",
"description": "lat,lng for filtering"
}
},
{
"name": "radius",
"in": "query",
"schema": {
"type": "number",
"default": 50
}
}
],
"responses": {
"200": {
"description": "Widget stores",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"stores": {
"type": "array",
"items": {
"$ref": "#/components/schemas/WidgetStore"
}
},
"count": {
"type": "integer"
}
}
}
}
}
}
}
}GET /api/widget/nearby
Public widget: find nearby stores
Parameters
[
{
"name": "company",
"in": "query",
"schema": {
"type": "integer"
}
},
{
"name": "shop",
"in": "query",
"schema": {
"type": "string"
}
},
{
"name": "lat",
"in": "query",
"required": true,
"schema": {
"type": "number"
}
},
{
"name": "lng",
"in": "query",
"required": true,
"schema": {
"type": "number"
}
},
{
"name": "radius",
"in": "query",
"schema": {
"type": "number",
"default": 50
}
}
]Responses
{
"200": {
"description": "Nearby stores",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"stores": {
"type": "array",
"items": {
"$ref": "#/components/schemas/WidgetStore"
}
},
"count": {
"type": "integer"
}
}
}
}
}
}
}Complete operation definition
{
"summary": "Public widget: find nearby stores",
"parameters": [
{
"name": "company",
"in": "query",
"schema": {
"type": "integer"
}
},
{
"name": "shop",
"in": "query",
"schema": {
"type": "string"
}
},
{
"name": "lat",
"in": "query",
"required": true,
"schema": {
"type": "number"
}
},
{
"name": "lng",
"in": "query",
"required": true,
"schema": {
"type": "number"
}
},
{
"name": "radius",
"in": "query",
"schema": {
"type": "number",
"default": 50
}
}
],
"responses": {
"200": {
"description": "Nearby stores",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"stores": {
"type": "array",
"items": {
"$ref": "#/components/schemas/WidgetStore"
}
},
"count": {
"type": "integer"
}
}
}
}
}
}
}
}POST /api/widget/geocode
Geocode free-form address
Request body
{
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"address"
],
"properties": {
"address": {
"type": "string"
}
}
}
}
}
}Responses
{
"200": {
"description": "Coordinates"
}
}Complete operation definition
{
"summary": "Geocode free-form address",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"address"
],
"properties": {
"address": {
"type": "string"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Coordinates"
}
}
}POST /api/widget/analytics
Log widget analytics event
Request body
{
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"eventType"
],
"properties": {
"eventType": {
"type": "string"
},
"payload": {
"type": "object"
},
"shop": {
"type": "string"
},
"company": {
"type": "string"
}
}
}
}
}
}Responses
{
"200": {
"description": "Logged"
}
}Complete operation definition
{
"summary": "Log widget analytics event",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"eventType"
],
"properties": {
"eventType": {
"type": "string"
},
"payload": {
"type": "object"
},
"shop": {
"type": "string"
},
"company": {
"type": "string"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Logged"
}
}
}GET /api/widget/analytics-summary
Retired unauthenticated analytics summary
Responses
{
"410": {
"description": "Use authenticated /api/analytics reports"
}
}Complete operation definition
{
"deprecated": true,
"summary": "Retired unauthenticated analytics summary",
"responses": {
"410": {
"description": "Use authenticated /api/analytics reports"
}
}
}GET /api/embed/config
Get embed configuration
Parameters
[
{
"name": "companyId",
"in": "query",
"schema": {
"type": "integer"
}
},
{
"name": "company",
"in": "query",
"schema": {
"type": "string"
}
},
{
"name": "shop",
"in": "query",
"schema": {
"type": "string"
}
}
]Responses
{
"200": {
"description": "Config",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/EmbedConfig"
}
}
}
}
}Complete operation definition
{
"summary": "Get embed configuration",
"parameters": [
{
"name": "companyId",
"in": "query",
"schema": {
"type": "integer"
}
},
{
"name": "company",
"in": "query",
"schema": {
"type": "string"
}
},
{
"name": "shop",
"in": "query",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Config",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/EmbedConfig"
}
}
}
}
}
}POST /api/embed/config
Update embed configuration (company-scoped)
Parameters
[
{
"name": "companyId",
"in": "query",
"schema": {
"type": "integer"
}
},
{
"name": "company",
"in": "query",
"schema": {
"type": "string"
}
},
{
"name": "shop",
"in": "query",
"schema": {
"type": "string"
}
}
]Request body
{
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"config": {
"$ref": "#/components/schemas/EmbedConfig"
}
}
}
}
}
}Responses
{
"200": {
"description": "Saved"
}
}Complete operation definition
{
"summary": "Update embed configuration (company-scoped)",
"security": [
{
"ApiKeyAuth": []
}
],
"parameters": [
{
"name": "companyId",
"in": "query",
"schema": {
"type": "integer"
}
},
{
"name": "company",
"in": "query",
"schema": {
"type": "string"
}
},
{
"name": "shop",
"in": "query",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"config": {
"$ref": "#/components/schemas/EmbedConfig"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Saved"
}
}
}GET /api/settings
Get shop settings
Parameters
[
{
"name": "shop",
"in": "query",
"required": true,
"schema": {
"type": "string"
}
}
]Responses
{
"200": {
"description": "Settings"
}
}Complete operation definition
{
"summary": "Get shop settings",
"parameters": [
{
"name": "shop",
"in": "query",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Settings"
}
}
}POST /api/settings
Save shop settings (Shopify session token required)
Parameters
[
{
"name": "shop",
"in": "query",
"required": true,
"schema": {
"type": "string"
}
}
]Request body
{
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"settings": {
"$ref": "#/components/schemas/SettingsPayload"
}
}
}
}
}
}Responses
{
"200": {
"description": "Saved"
}
}Complete operation definition
{
"summary": "Save shop settings (Shopify session token required)",
"security": [
{
"ShopifySession": []
}
],
"parameters": [
{
"name": "shop",
"in": "query",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"settings": {
"$ref": "#/components/schemas/SettingsPayload"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Saved"
}
}
}Schemas
ErrorResponse
ErrorResponse definition
{
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"error": {
"type": "string"
},
"message": {
"type": "string"
}
}
}Pagination
Pagination definition
{
"type": "object",
"properties": {
"page": {
"type": "integer"
},
"limit": {
"type": "integer"
},
"total": {
"type": "integer"
},
"pages": {
"type": "integer"
}
}
}ApiKey
ApiKey definition
{
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"permissions": {
"type": "array",
"items": {
"type": "string"
}
},
"is_active": {
"type": "boolean"
},
"last_used_at": {
"type": "string",
"format": "date-time",
"nullable": true
},
"created_at": {
"type": "string",
"format": "date-time"
},
"expires_at": {
"type": "string",
"format": "date-time",
"nullable": true
},
"key_preview": {
"type": "string",
"nullable": true
}
}
}ApiKeyCreateRequest
ApiKeyCreateRequest definition
{
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string"
},
"permissions": {
"type": "array",
"items": {
"type": "string"
}
},
"expires_at": {
"type": "string",
"format": "date-time",
"nullable": true
}
}
}ApiKeyCreateResponse
ApiKeyCreateResponse definition
{
"allOf": [
{
"$ref": "#/components/schemas/ApiKey"
},
{
"type": "object",
"properties": {
"api_key": {
"type": "string",
"description": "Full secret value, returned once"
}
}
}
]
}ApiKeyUpdateRequest
ApiKeyUpdateRequest definition
{
"type": "object",
"properties": {
"name": {
"type": "string"
},
"permissions": {
"type": "array",
"items": {
"type": "string"
}
},
"is_active": {
"type": "boolean"
},
"expires_at": {
"type": "string",
"format": "date-time",
"nullable": true
}
}
}Store
Store definition
{
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"address": {
"type": "string"
},
"address_line_1": {
"type": "string",
"nullable": true
},
"address_line_2": {
"type": "string",
"nullable": true
},
"city": {
"type": "string"
},
"state": {
"type": "string"
},
"zip_code": {
"type": "string"
},
"country": {
"type": "string",
"nullable": true
},
"phone": {
"type": "string",
"nullable": true
},
"email": {
"type": "string",
"nullable": true
},
"website": {
"type": "string",
"nullable": true
},
"latitude": {
"type": "number",
"nullable": true
},
"longitude": {
"type": "number",
"nullable": true
},
"timezone": {
"type": "string",
"nullable": true
},
"hours_json": {
"type": "object",
"nullable": true
},
"categories": {
"type": "string",
"nullable": true
},
"amenities": {
"type": "object",
"nullable": true
},
"is_active": {
"type": "boolean"
},
"geocoded_at": {
"type": "string",
"format": "date-time",
"nullable": true
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
}StoreCreateRequest
StoreCreateRequest definition
{
"type": "object",
"required": [
"name",
"address",
"city",
"state",
"zip_code"
],
"properties": {
"name": {
"type": "string"
},
"address": {
"type": "string"
},
"address_line_1": {
"type": "string"
},
"address_line_2": {
"type": "string"
},
"city": {
"type": "string"
},
"state": {
"type": "string"
},
"zip_code": {
"type": "string"
},
"country": {
"type": "string"
},
"phone": {
"type": "string"
},
"email": {
"type": "string"
},
"website": {
"type": "string"
},
"external_id": {
"type": "string"
},
"latitude": {
"type": "number"
},
"longitude": {
"type": "number"
},
"timezone": {
"type": "string"
},
"hours_json": {
"type": "object"
},
"categories": {
"type": "string"
},
"amenities": {
"type": "object"
},
"is_active": {
"type": "boolean"
}
}
}StoreUpdateRequest
StoreUpdateRequest definition
{
"type": "object",
"properties": {
"name": {
"type": "string"
},
"address": {
"type": "string"
},
"address_line_1": {
"type": "string"
},
"address_line_2": {
"type": "string"
},
"city": {
"type": "string"
},
"state": {
"type": "string"
},
"zip_code": {
"type": "string"
},
"country": {
"type": "string"
},
"phone": {
"type": "string"
},
"email": {
"type": "string"
},
"website": {
"type": "string"
},
"latitude": {
"type": "number"
},
"longitude": {
"type": "number"
},
"timezone": {
"type": "string"
},
"hours_json": {
"type": "object"
},
"categories": {
"type": "string"
},
"amenities": {
"type": "object"
},
"is_active": {
"type": "boolean"
}
}
}SyncStoreRequest
SyncStoreRequest definition
{
"allOf": [
{
"$ref": "#/components/schemas/StoreCreateRequest"
},
{
"type": "object",
"required": [
"external_id",
"name",
"address",
"city",
"country"
],
"properties": {
"external_id": {
"type": "string",
"minLength": 1
},
"is_active": {
"type": "boolean",
"default": true
}
}
}
]
}BulkStoreCreateRequest
BulkStoreCreateRequest definition
{
"type": "object",
"required": [
"stores"
],
"properties": {
"stores": {
"type": "array",
"items": {
"$ref": "#/components/schemas/StoreCreateRequest"
},
"maxItems": 100
},
"geocode": {
"type": "boolean",
"default": true
}
}
}BulkStoreUpdateRequest
BulkStoreUpdateRequest definition
{
"type": "object",
"required": [
"stores"
],
"properties": {
"stores": {
"type": "array",
"items": {
"allOf": [
{
"$ref": "#/components/schemas/StoreUpdateRequest"
},
{
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"external_id": {
"type": "string"
}
}
}
]
}
},
"geocode": {
"type": "boolean",
"default": true
}
}
}WidgetStore
WidgetStore definition
{
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"address": {
"type": "string"
},
"zip_code": {
"type": "string",
"nullable": true
},
"details_pending": {
"type": "boolean",
"description": "True on address-bearing marker summaries. Fetch full store details on selection; false means details already loaded."
},
"city": {
"type": "string"
},
"state": {
"type": "string"
},
"country": {
"type": "string"
},
"latitude": {
"type": "number"
},
"longitude": {
"type": "number"
},
"phone": {
"type": "string"
},
"email": {
"type": "string"
},
"website": {
"type": "string"
},
"hours_json": {
"type": "object"
},
"categories": {
"type": "string"
},
"amenities": {
"type": "object"
},
"timezone": {
"type": "string"
},
"distance": {
"type": "number",
"description": "Miles from searched point",
"nullable": true
}
}
}EmbedConfig
EmbedConfig definition
{
"type": "object",
"properties": {
"mapProvider": {
"type": "string"
},
"theme": {
"type": "string"
},
"markerColor": {
"type": "string"
},
"height": {
"type": "string"
},
"width": {
"type": "string"
},
"showSearch": {
"type": "boolean"
},
"showFilters": {
"type": "boolean"
},
"hideBranding": {
"type": "boolean"
},
"layout": {
"type": "string"
},
"sidebarPosition": {
"type": "string"
},
"sidebarWidth": {
"type": "string"
},
"fontFamily": {
"type": "string"
},
"primaryColor": {
"type": "string"
},
"secondaryColor": {
"type": "string"
},
"backgroundColor": {
"type": "string"
},
"textColor": {
"type": "string"
},
"listItemSpacing": {
"type": "string"
},
"showStoreImages": {
"type": "boolean"
},
"showStoreHours": {
"type": "boolean"
},
"showDistance": {
"type": "boolean"
},
"showZoomControls": {
"type": "boolean"
},
"showFullscreenButton": {
"type": "boolean"
},
"showMapTypeSelector": {
"type": "boolean"
},
"enableClustering": {
"type": "boolean"
},
"clickBehavior": {
"type": "string"
},
"animationSpeed": {
"type": "string"
},
"customMarkerIcon": {
"type": "string"
},
"popupStyle": {
"type": "string"
},
"showDirectionsButton": {
"type": "boolean"
},
"showCallButton": {
"type": "boolean"
},
"showLocationButton": {
"type": "boolean"
},
"searchPlaceholder": {
"type": "string"
}
}
}SettingsPayload
SettingsPayload definition
{
"type": "object",
"properties": {
"defaultZoom": {
"type": "integer",
"minimum": 1,
"maximum": 20
},
"mapStyle": {
"type": "string"
},
"showDistances": {
"type": "boolean"
},
"allowDirections": {
"type": "boolean"
},
"searchRadius": {
"type": "integer",
"minimum": 1,
"maximum": 500
}
}
}