API documentation

Build on the platform behind every matgrk store — one API for storefronts and mobile apps today, with data and analytics APIs on the way.

The API surfaces

Quick start

  1. 1. Get an API key

    Every store gets its own credential with its own rate limit. The key (mk_live_…) is shown once when it is issued and matgrk keeps only a hash of it. Key management from the dashboard is coming; today a key is issued for your store on request through support.

  2. 2. Exchange it for tokens

    The key itself is only ever sent to the two token endpoints — every other call uses the short-lived access token.

    Request
    curl -X POST https://api.matgrk.com/v1/auth/anonymous \
      -H "X-Api-Key: mk_live_YOUR_KEY" \
      -H "Content-Type: application/json" \
      -d '{"transport": "bearer", "scope": ["catalogue:read"]}'
    Response
    {
      "data": {
        "transport": "bearer",
        "accessToken": "eyJhbGciOi…",
        "refreshToken": "eyJhbGciOi…",
        "expiresIn": 900,
        "scope": ["catalogue:read"]
      }
    }
  3. 3. Call the API

    curl https://api.matgrk.com/v1/catalogue/products \
      -H "Authorization: Bearer ACCESS_TOKEN"

Good to know

  • All requests are HTTPS and all bodies are JSON.
  • Every response is an envelope: { "data": … } on success, { "error": … } on failure — see conventions.
  • A credential belongs to exactly one store, and so does every token minted with it.