Start

Authentication

Each operation in the reference lists the credentials it accepts. There are four kinds of caller.

Storefronts: a storefront key

A storefront sends X-Munim-Storefront-Key on every call. The key names one business and one sales channel, so it is all a public ordering website needs to read outlets and menus and to place orders. It is designed to sit in a browser; it grants nothing beyond that storefront.

  • Customer token (optional). A signed-in customer adds Authorization: Bearer <token> to see their own account, orders and loyalty.
  • Guest token. When a guest places an order, the response returns a guest access token for that one order, once. Keep it (for example in the browser's storage) and send it as X-Munim-Guest-Token, with the storefront key, to read the order's status.

Staff and owners: a member token and a tenant

People who work in a business sign in and send Authorization: Bearer <token> plus X-Munim-Tenant naming the business they are acting in. Their role and outlet scope decide what they may see and do; a manager sees only their own outlet. A few identity routes (such as "which businesses can I act in") take the token alone.

Munim operators

Operator routes under /platform/v1 take an operator's token. Storefront builders never need them.

No credential

5 read-only operations take no credential at all: the Munim Cares network pages.

A bad key is a 404, not a 403

A wrong, revoked or mistyped storefront key or guest token gets 404 not_found — the same answer as a resource that does not exist — so a key cannot be probed. Treat a 404 on every call as "check your key". Never log a key or a token.

Credentials in the OpenAPI file

SchemeSent asWhat it isOperations
memberTokenAuthorization: BearerIdP ID token of a signed-in person (a tenant member; alone on identity routes)224
operatorTokenAuthorization: BearerIdP ID token of a platform operator19
tenantHeaderX-Munim-TenantThe tenant a member acts in (with memberToken)222
storefrontKeyX-Munim-Storefront-KeyPublic storefront key; resolves the tenant and channel22
customerTokenAuthorization: BearerIdP ID token of a customer (optional on storefront routes)22
guestTokenX-Munim-Guest-TokenGuest access token of one order (returned once when the guest places it); with storefrontKey, on routes that mark guest access2

Counts are read from the OpenAPI file at build time. See them per operation in the API reference.