Authentication > Roles > rolesCreate
Commerce APIAuthenticationRolesrolesCreate
rolesCreate
POST:roles.json

Description

Create one or multiple roles.

You cannot give more permissions to roles than you currently have.

Permission bit: "roles.create"

Topic: Roles

Arguments

data: [RoleCreate!]!

Main argument for mutations.


shop_id: String!

Unique shop identifier. See also: Unique Identifiers

Example: "sh_EQzGqWoY"


Data Argument Fields

name: String

The name of the role

Example: "Administrator"

Valid when: name is not empty

Valid when: name's length doesn't exceed 250 characters


permissions: [String!]

A set of permission bits describing this role


Result

[Role!]

Preview (typescript)

Loading module