Developers

Meridian API

JSON over HTTPS on the same domain as the app. The Margin API is live. Integration and webhook endpoints are reserved with fixed contracts and return 501 until each connection ships.

Endpoints

MethodPathStatusPurpose
POST/api/v1/marginLiveMargin, downside case, price floor and decision for one SKU on one channel
GET/api/v1/integrationsLiveList integrations and their status
GET/api/v1/integrations/{provider}LiveStatus and planned scopes for one provider
POST/api/v1/integrations/{provider}/connectReservedStart a connection (OAuth or API key) for a provider
POST/api/v1/integrations/{provider}/syncReservedPull catalog, fee or cost data from a connected provider
POST/api/v1/webhooks/{provider}ReservedReceive provider events (for example product or order updates)
GET/api/healthLiveService health check

Providers: shopify, amazon, walmart, tiktok, shipping, accounting. Authentication with API keys arrives with the first connected integration; the Margin API is open during the pilot and stores nothing.

POST /api/v1/margin

Send one product and one channel. Channel can be a preset (shopify, amazon, walmart, tiktok) or your own fee object. Any assumption you omit uses the app's starting values.

{
  "price": 24,
  "cogs": 5.2,
  "weightGrams": 520,
  "dutyRate": 32,
  "channel": "amazon",
  "assumptions": { "targetMargin": 20, "minimumMargin": 10 }
}

Custom channel: {"feePct":15,"feeFixed":0,"connectorPct":1,"fulfillmentBase":4,"fulfillmentPerKg":1.8,"adPct":8,"returnPct":10,"priceAdjPct":5}

Try it

Response appears here.

Reserved contracts

These return 501 Not Implemented today with the planned contract in the body, so client code can be written against them now.

POST /api/v1/integrations/shopify/connect
-> 501
{
  "ok": false,
  "status": "planned",
  "provider": "shopify",
  "action": "connect",
  "contract": {
    "request": { "shop": "your-store.myshopify.com" },
    "response": { "authorizeUrl": "string" }
  }
}

Webhooks

Provider events will arrive at /api/v1/webhooks/{provider}. Shopify webhooks will be verified with the HMAC header against a per-store secret before any processing.

POST /api/v1/webhooks/shopify
X-Shopify-Hmac-Sha256: <signature>
X-Shopify-Topic: products/update
-> 501 until the Shopify app ships

Building on Meridian?

Tell us what you want to connect and we'll prioritize it.