Personel Listesi — GET /plugin-api/users/get ✓ CanlıPII

Tenant'ın personel (kullanıcı) listesini döner — örn. siparişi bir personele atamak için. Yalnız id + ad; hassas alanlar (pincode, yetki, e-posta, mesai) kasıtlı olarak dönmez.

← API Uçları · ortak kurallar (base, auth, hata zarfı) orada.

İstek

GET {RESTOMENUM_BASE}/plugin-api/users/get
Authorization: Bearer {serverId}.{pluginId}.{secret}     // install API key (token exchange)
  • Base ({RESTOMENUM_BASE}): Sandbox https://sandbox.plugins.restomenum.app, Production https://plugins.restomenum.app (API Uçları).
  • Parametre yok — tüm liste döner (en fazla 200 kayıt).
  • Auth: Authorization: Bearer <apiKey>token exchange'teki install API key (biçim: serverId.pluginId.secret).
  • Scope: users:read (PII) zorunlu (yoksa plugin.scope.denied).

Yanıt

PII consent verildiysename dolu gelir:

{ "success": true, "data": [
  { "id": "lZz6BqN46Og4HKrhjf6eflOgWnA2", "name": "Test User" }
] }

Consent yoksa — yalnız id (ad gizli):

{ "success": true, "data": [
  { "id": "lZz6BqN46Og4HKrhjf6eflOgWnA2" }
] }

Dönmeyen alanlar (gizli)

Şunlar KASITLI olarak DÖNMEZ: pincode (POS kredisi), authority (iç izin modeli), email, mesai (isbasi/issonu/günler) ve storages. Eklenti bu alanlara erişemez — yanıtta hiç yer almazlar. users:read bir PII scope'udur; kurulumda tenant'ın açık PII consent'ine (piiShared) bağlıdır — consent yoksa name bile gizlenir.

Performans

En fazla 200 kayıt döner. Personel listesi sık değişmez → kendi tarafında cache'le ve sık çağırma (rate limit'e takılma; bkz. Limitler).

Hatalar

DurumYanıt
Scope yok{ success:false, message:"plugin.scope.denied" }
Geçersiz/eksik keyunauthorized (HTTP 401)