Create a permission
How to create a permission via API
To create a new permission, send a POST
request to the /api/permissions
endpoint, passing the resource arguments in the request body.
Request
POST https://provisioning.commercelayer.io/api/permissions
Arguments
Body Parameter
Type
Required
type
string
Required
attributes.can_create
boolean
Required
attributes.can_read
boolean
Required
attributes.can_update
boolean
Required
attributes.can_destroy
boolean
Required
attributes.subject
string
Required
attributes.reference
string
Optional
attributes.reference_origin
string
Optional
attributes.metadata
object
Optional
relationships.role
object
Required
Example
The following request creates a new permission:
Last updated