Shop Role Schema
Campos
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).
Ningún campo coincide con el filtro.
Endpoints estándar
Este recurso sigue el contrato CRUD genérico de la plataforma. Lea las convenciones sobre paginación, idempotencia, bloqueo optimista y auditoría. Los endpoints principales:
GET /api/v1/shop_roles— Lista, paginada y filtrableGET /api/v1/shop_roles/<id>— Una entidadPOST /api/v1/shop_roles— CrearPATCH /api/v1/shop_roles/<id>— Actualización parcialDELETE /api/v1/shop_roles/<id>— Eliminación lógicaGET /api/v1/shop_roles/<id>/timeline— Auditoría y actividades