Start

Getting started

Three steps to your first response: get the SDK, point it at the mock API, call a storefront route.

1. Get the SDK

The SDK is a typed client generated from the same contracts as the API reference. It ships as a package file you install directly — no registry account needed.

Download munim-sdk-0.3.1.tgz

Install from the file
# from the folder of your storefront project
npm install ./munim-sdk-0.3.1.tgz
# or
pnpm add ./munim-sdk-0.3.1.tgz

The SDK ships TypeScript source. In a Next.js site add transpilePackages: ["@munim/sdk"] to next.config. API ids made by your client (command_id, order_id, …) must be UUIDv7; the getting-started guide has a helper to copy.

2. Create a client

A storefront authenticates with its storefront key only. Customer sign-in is optional and adds a customer token; see Authentication.

storefront.ts
import { createMunimClient } from "@munim/sdk";

const munim = createMunimClient({
  baseUrl: "https://<this-site>/mock",           // the real API URL comes later
  storefrontKey: process.env.MUNIM_STOREFRONT_KEY!, // a mock key (see the Mock API page)
});

const { data, error } = await munim.GET("/v1/storefront/outlets");
if (error) throw new Error(error.error.code);    // e.g. "not_found" for a bad key
console.log(data);

3. Or call it over plain HTTP

Every SDK method is one HTTP request. JSON in, JSON out.

curl
curl -s https://<this-site>/mock/v1/storefront/outlets \
  -H "X-Munim-Storefront-Key: $MUNIM_STOREFRONT_KEY"

Next