API · v1 · stable
CODEMETA OSDeveloper Center
FR
Ouvrir la console
Entité · shop_roles

Shop Role Schema

ID du schéma
shop_role
Collection
shop_roles
Autorisations
  • Lireshop_role_view
  • Créershop_role_create
  • Modifiershop_role_edit
  • Supprimershop_role_delete

Champs

Shop Role Schema

shop_roles4 autorisations

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.

partyIduuidobligatoire

Owner organization party ID (the customer this role belongs to).

namestringobligatoire

Display name (e.g. "Admin", "Einkäufer", "Leseberechtigt")

1–200 caractères
descriptionstringfacultatif

Free-text description of what this role is for

max. 1000 caractèresPar défaut : nullnullable
isDefaultbooleanfacultatif

When true, this role is auto-assigned to new contacts that have no explicit shopRoleId. Exactly one role per partyId may carry this flag.

Par défaut : false
permissionsstring[]facultatif

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).

Par défaut : []

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 filtrable
  • GET /api/v1/shop_roles/<id> — Une entité
  • POST /api/v1/shop_roles — Créer
  • PATCH /api/v1/shop_roles/<id> — Mise à jour partielle
  • DELETE /api/v1/shop_roles/<id> — Suppression logique
  • GET /api/v1/shop_roles/<id>/timeline — Audit et activités

Recherche