Shop Role Schema
Champs
Shop Role Schema
Customer-tenant-defined shop role granting a permission bundle to a customer organization. Roles are owned by a single customer party (the organization) and assigned per-person via party_relationship.shopRoleId. Visibility (which articles/bundles a customer sees in the shop) lives on the entity itself via availableForPartyIds — not on the role.
partyId
Owner organization party ID (the customer this role belongs to).
name
Display name (e.g. "Admin", "Einkäufer", "Leseberechtigt")
description
Free-text description of what this role is for
isDefault
When true, this role is auto-assigned to new contacts that have no explicit shopRoleId. Exactly one role per partyId may carry this flag.
permissions
Capabilities this role grants in the customer portal (view products/prices, place orders, subscribe, view invoices/orders, manage users). Org-level shopConfig.featureFlags can mask these (kill switches).
Aucun champ ne correspond au filtre.
Endpoints standard
Cette ressource suit le contrat CRUD générique de la plateforme. Lisez les conventions pour la pagination, l'idempotence, le verrouillage optimiste et l'audit. Les endpoints principaux :
GET /api/v1/shop_roles— Liste, paginée et filtrableGET /api/v1/shop_roles/<id>— Une entitéPOST /api/v1/shop_roles— CréerPATCH /api/v1/shop_roles/<id>— Mise à jour partielleDELETE /api/v1/shop_roles/<id>— Suppression logiqueGET /api/v1/shop_roles/<id>/timeline— Audit et activités