MerchantFlow Store API
The Store API from MerchantFlow — 2 operation(s) for store.
The Store API from MerchantFlow — 2 operation(s) for store.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/merchantflow-ai:merchantflow-ai-store-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: MerchantFlow Public Store API
version: 1.0.0
summary: Read-only access to a merchant's headline metrics, orders, products, and profitability.
description: 'The MerchantFlow Public API lets an authorised third-party application read a
merchant''s headline metrics, order economics, products, and profit and loss.
**Read-only.** Every endpoint is `GET`. There are no write scopes to request.
**Ask for the narrowest scope that works.** The `metrics:*` scopes each return
ONE figure. If your integration needs MER, request `metrics:mer:read` rather than
`profitability:read` - the latter returns the entire P&L waterfall including COGS,
expenses and net profit, and merchants decline it far more often. MerchantFlow
provisions each partner with an allowlist of the scopes it may request at all; a
scope outside that list is refused at `/authorize`, before any merchant sees a
consent screen.
**No customer PII.** Customer names, email addresses, phone numbers and shipping
addresses are never returned. Orders carry `customer_ref`, a pseudonymous
identifier that is stable for your application and for one merchant, and is not
correlatable with any other application''s identifiers.
**Two numbers need care.** `ad_spend_allocated` is a blended daily allocation, not
measured per-order ad spend - no ad platform reports spend at order granularity.
And `cogs_coverage_pct` tells you how much of an order actually has cost data;
a high margin on an order with low coverage is missing costs, not profit.'
contact:
name: MerchantFlow
url: https://docs.merchantflow.ai/docs/integrations/api
servers:
- url: https://merchantflow.ai/api/v1
description: Production
security:
- oauth2: []
tags:
- name: Store
paths:
/account:
get:
operationId: getAccount
summary: The connected store
description: Which store this token reads, how fresh its data is, and what the plan includes. Use it as a health check.
tags:
- Store
security:
- oauth2:
- store:read
responses:
'200':
description: The connected store.
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
data:
$ref: '#/components/schemas/Account'
meta:
$ref: '#/components/schemas/Meta'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'429':
$ref: '#/components/responses/RateLimited'
/stores:
get:
operationId: listStores
summary: Stores this authorization covers
description: Always exactly one entry today - a merchant authorises one store per application. Returned as an array so multi-store authorization can be added without a breaking change.
tags:
- Store
security:
- oauth2:
- store:read
responses:
'200':
description: Authorised stores.
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
data:
type: array
items:
$ref: '#/components/schemas/Store'
meta:
$ref: '#/components/schemas/Meta'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'429':
$ref: '#/components/responses/RateLimited'
components:
responses:
Forbidden:
description: The token lacks the scope this endpoint requires.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
Unauthorized:
description: Missing, expired, or revoked token. The `WWW-Authenticate` header names the protected-resource metadata document so you can rediscover the authorization server.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
RateLimited:
description: 'Budget exhausted. `Retry-After` gives the seconds to wait and `X-RateLimit-Reason` says which limit was hit: `burst`, `hour`, `day`, `concurrency`, or `client_global`. `concurrency` means too many requests are in flight for one store at once - page cursors sequentially rather than in parallel. `client_global` means your application exceeded its budget across ALL connected stores; stagger scheduled syncs instead of starting every store at the same moment.'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
schemas:
Error:
type: object
properties:
success:
type: boolean
const: false
error:
type: object
properties:
code:
type: string
message:
type: string
Account:
type: object
properties:
store:
type: object
properties:
id:
type: string
name:
type:
- string
- 'null'
platform:
type:
- string
- 'null'
shop_domain:
type:
- string
- 'null'
currency:
type: string
timezone:
type: string
connected_at:
type:
- string
- 'null'
format: date-time
connection:
type: object
properties:
client_id:
type: string
scopes:
type: array
items:
type: string
granted_at:
type:
- string
- 'null'
format: date-time
data_availability:
type: object
properties:
history_days:
type:
- integer
- 'null'
description: Null means unlimited history on this store's plan.
available_from:
type:
- string
- 'null'
last_sync_at:
type:
- string
- 'null'
format: date-time
stale:
type: boolean
rate_limits:
type: object
properties:
burst_per_minute:
type: integer
per_hour:
type: integer
per_day:
type: integer
max_concurrent:
type: integer
Meta:
type: object
description: Provenance attached to every response.
properties:
store_id:
type: string
currency:
type: string
description: ISO 4217 for this store.
timezone:
type: string
description: IANA timezone. All date-only filters resolve in it.
as_of:
type:
- string
- 'null'
format: date-time
description: When this store last synced. Not the request time.
stale:
type: boolean
description: True when the last sync is more than 24 hours old.
history_available_from:
type:
- string
- 'null'
description: Earliest date this store's plan includes (YYYY-MM-DD), or null for unlimited history.
truncated:
type: boolean
description: True when the request reached further back than the plan includes. Everything from history_available_from onwards is present and complete.
order_allowance:
$ref: '#/components/schemas/OrderAllowance'
OrderAllowance:
type: object
description: Present only on the metrics and profitability endpoints, and only when the store has exceeded its monthly order allowance and the window you asked for holds orders past it. The response still covers the whole window, but order-derived figures (revenue, COGS, fees, refunds, order counts, profit) leave those orders out; ad spend and expenses are complete. These are the same figures the merchant's own dashboard shows. Absent when every order in the window is counted.
properties:
status:
type: string
enum:
- partial
missing_orders:
type: integer
description: Orders in the requested window placed after the store passed its monthly allowance, left out of the figures.
resets_at:
type: string
format: date-time
description: When the allowance resets (the start of the store's next calendar month). Later months count every order again, and an upgrade includes them sooner.
required:
- status
- missing_orders
- resets_at
Store:
type: object
properties:
id:
type: string
name:
type: string
platform:
type: string
currency:
type: string
timezone:
type: string
last_sync_at:
type:
- string
- 'null'
format: date-time
securitySchemes:
oauth2:
type: oauth2
description: 'OAuth 2.1 authorization code flow with PKCE (S256 required).
Send the RFC 8707 resource indicator `resource=https://merchantflow.ai/api/v1` at both
the authorize and token endpoints. If you omit it, MerchantFlow infers it from
your requested scopes, but sending it explicitly is strongly preferred.
Request `offline_access` alongside your data scopes to receive a refresh token;
without it your access token expires after one hour and the merchant has to
repeat the browser consent flow.'
flows:
authorizationCode:
authorizationUrl: https://merchantflow.ai/api/auth/oauth2/authorize
tokenUrl: https://merchantflow.ai/api/auth/oauth2/token
refreshUrl: https://merchantflow.ai/api/auth/oauth2/token
scopes:
store:read: Read your store name, currency, timezone, and data freshness
metrics:mer:read: Read your Marketing Efficiency Ratio (MER) for a date range - the ratio only, not the underlying figures
metrics:revenue:read: Read the revenue total used to calculate MER (D2C gross revenue) for a date range
metrics:ad_spend:read: Read the advertising spend total used to calculate MER for a date range
metrics:contribution_profit:read: Read your contribution profit total for a date range - the single figure, not the cost breakdown behind it
orders:read: Read your orders and their economics (revenue, COGS, fees, profit). Includes a pseudonymous customer reference so the app can tell repeat buyers from new ones - never names, email addresses, phone numbers, or shipping addresses
products:read: Read your products, variants, and cost of goods sold
profitability:read: Read your full profit & loss summary and daily profit history, including COGS, expenses and net profit
offline_access: Receive a refresh token
externalDocs:
url: https://docs.merchantflow.ai/docs/integrations/api
description: Integration guide
x-rate-limits:
description: Per store per application, except client_global which is per application across every store it is connected to.
burst_per_minute: 60
per_hour: 1000
per_day: 10000
max_concurrent: 2
client_global_per_minute: 200