Skip to main content
Medusa is an open-source, self-hosted commerce platform. SourceMedium connects to your Medusa store through a read-only reporting API that your developer exposes on your Medusa backend, secured with a publishable API key. SourceMedium polls this API to sync your orders, customers, products, inventory, and subscriptions.
You connect data sources yourself in SourceMedium. Sign in to your SourceMedium account, open your store, then in the Data sources section click Connect data source and choose the platform. You need an Editor or Admin role on the store. If you have view-only access, ask an admin or editor on your team to connect it.Once it is connected, what happens next covers first-sync timing and what each connection status means.

How to connect

Medusa uses a publishable API key plus your backend base URL. Request the connection in SourceMedium; our team stores those two values.
1

Your developer enables the reporting projection

Share the projection requirements below with your developer. They expose the /reporting routes on your Medusa backend and confirm each requirement with the self-test checklist.
2

Request setup

Find Medusa in the connector picker and click Request setup. The connection shows Requested · waiting on SourceMedium.
3

Send the key and base URL

Send your SourceMedium team two values (via your account manager or integrations@sourcemedium.com, not in public channels):
  • Your Medusa publishable API key (starts with pk_)
  • Your Medusa backend base URL (for example, https://store.yourdomain.com)
4

SourceMedium validates and backfills

SourceMedium runs a live validation against your projection. If anything is missing, we tell your developer exactly which route and field to fix. Once validation passes, we run the full historical backfill and your data starts syncing automatically.
SourceMedium only ever reads from your connected platforms. It does not create, change, or delete anything, so create the key with read-only access wherever the platform offers it. Treat it like a password: keep it confidential and avoid sharing it over email or in spreadsheets. If the credential is rotated or revoked, follow this guide’s connection method to update SourceMedium.

What data syncs

  • Orders, including line items, shipping lines, fulfillments, and refunds
  • Customers
  • Products and variants
  • Inventory items and levels
  • Subscriptions, when your store runs a subscription module that exposes them

Projection requirements (for your developer)

Expose a /reporting API on the store’s Medusa backend meeting this exact contract. Every requirement below comes from a production-validated integration. Meeting them up front means validation passes on the first try.

1. Authentication

  • Requests carry the store’s publishable API key in the x-publishable-api-key header.
  • The projection must reject requests without a valid key.

2. Routes and response envelope

Expose these five GET routes: Every route must:
  • Support offset/limit pagination: ?limit=200&offset=0 (limit up to 200).
  • Respond with the envelope { "<resource>": [...], "count": N, "offset": n, "limit": l }, where count is the total number of records. The <resource> key matches the route name for every route except /reporting/inventory, whose key is inventory_items.
  • Return records in a stable sort order (for example, created_at descending) so paginated reads are consistent.

3. Order filtering (required for backfill)

/reporting/orders must accept created_from and created_to ISO-8601 query params and filter server-side, both bounds inclusive:
SourceMedium uses these to backfill history in 30-day windows. Without them, historical backfill is not possible.

4. Order payload

Each order must include all of the following. Fields marked Commonly missed are the ones that most often fail validation. Each was a real issue that blocked or delayed a past onboarding.

5. Subscriptions (only for stores with subscriptions)

  • /reporting/subscriptions returns all subscription records with created_at and updated_at.
  • Subscription currency and money fields must use their native source values. SourceMedium applies reporting-currency conversion downstream when it is enabled for the workspace.
  • There must be a way to link a recurring order to its subscription, typically a subscription ID in the order’s metadata. The exact metadata keys are merchant-specific; SourceMedium reviews them during onboarding.
  • Note: subscription history only covers what your subscription module has synced into Medusa. If your provider started syncing recently, SourceMedium reports from that point forward.

6. Self-test checklist

Before handing off to SourceMedium, verify all of the following with curl:
Then confirm, by inspecting real responses:
  • A recent completed order has non-zero total, subtotal, item_total, and non-empty items[] with non-null quantity.
  • An order from your oldest month of business also has computed money totals and non-empty items[] (not header-only).
  • A refunded order has a top-level refunds[] array with the refund amount.
  • A canceled order has canceled_at populated.
  • An order with a partial capture has captures[] entries and net_captured set.
  • /reporting/products includes variants[] with prices[].
  • /reporting/inventory includes location_levels[].
  • All five routes reject a request with a missing or invalid key.

Data coverage notes

  • Returns and exchanges are not currently collected for Medusa stores.
  • Marketing attribution: Medusa has no built-in customer-journey source, so attribution models receive no Medusa-native input.
  • After the initial backfill, SourceMedium syncs your Medusa data automatically every 6 hours.

Troubleshooting

  • Validation failed on money fields? The projection is returning 0 or null instead of computed totals. This is the most common issue. Your developer must compute totals on the backend, including for historical orders.
  • Revenue looks off by 100x? Currency units were not confirmed. Contact your account manager to re-verify whether your projection emits major or minor units.
  • Old orders have no line items? The projection is only hydrating items[] for recent orders. It must hydrate them for all history.
  • Need to rotate a key? Create a new publishable key in your Medusa Admin (Settings → Publishable API Keys) and share it with your SourceMedium team; we update the stored credential in our connection manager with no data loss.