API · v1 · estable
CODEMETA OSDeveloper Center
ES
Abrir la consola
Entidad · shop_roles

Shop Role Schema

ID del esquema
shop_role
Colección
shop_roles
Permisos
  • Leershop_role_view
  • Crearshop_role_create
  • Modificarshop_role_edit
  • Eliminarshop_role_delete

Campos

Shop Role Schema

shop_roles4 permisos

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.

partyIduuidobligatorio

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

namestringobligatorio

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

1–200 caracteres
descriptionstringopcional

Free-text description of what this role is for

máx. 1000 caracteresValor por defecto: nulladmite null
isDefaultbooleanopcional

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

Valor por defecto: false
permissionsstring[]opcional

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

Valor por defecto: []

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 filtrable
  • GET /api/v1/shop_roles/<id> — Una entidad
  • POST /api/v1/shop_roles — Crear
  • PATCH /api/v1/shop_roles/<id> — Actualización parcial
  • DELETE /api/v1/shop_roles/<id> — Eliminación lógica
  • GET /api/v1/shop_roles/<id>/timeline — Auditoría y actividades

Búsqueda