API · v1 · stable
CODEMETA OSDeveloper Center
EN
Open console
Entity · shop_roles

Shop Role Schema

Schema ID
shop_role
Collection
shop_roles
Permissions
  • Readshop_role_view
  • Createshop_role_create
  • Editshop_role_edit
  • Deleteshop_role_delete

Fields

Shop Role Schema

shop_roles4 permissions

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.

partyIduuidrequired

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

namestringrequired

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

1–200 characters
descriptionstringoptional

Free-text description of what this role is for

max 1000 charactersDefault: nullnullable
isDefaultbooleanoptional

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

Default: false
permissionsstring[]optional

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

Default: []

Standard endpoints

This resource follows the platform's generic CRUD contract. Read the conventions for pagination, idempotency, optimistic locking and audit. The most important endpoints:

  • GET /api/v1/shop_roles — List, paginated + filterable
  • GET /api/v1/shop_roles/<id> — Single entity
  • POST /api/v1/shop_roles — Create
  • PATCH /api/v1/shop_roles/<id> — Partial update
  • DELETE /api/v1/shop_roles/<id> — Soft delete
  • GET /api/v1/shop_roles/<id>/timeline — Audit + activities

Search