Commerce Layer roles API

resource type

Operations 9

GET /api_credentials/{apiCredentialId}/role Related API credential #
GET /application_memberships/{applicationMembershipId}/role Related application membership #
GET /memberships/{membershipId}/role Related membership #
GET /organizations/{organizationId}/roles Related organization #
GET /permissions/{permissionId}/role Related permission #
POST /roles Creates an role #
GET /roles List all roles #
GET /roles/{roleId} Retrieve an role #
PATCH /roles/{roleId} Updates an role #

Documentation

Specifications

Schemas & Data

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/commerce-layer-roles-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

commerce-layer-roles-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Commerce Layer Provisioning Roles API
  version: 1.0.15
  contact:
    name: API Support
    url: https://commercelayer.io
    email: support@commercelayer.io
  description: Headless Commerce for Global Brands.
servers:
- url: https://provisioning.commercelayer.io
  description: Commerce Layer Provisioning API
- url: https://docs.commercelayer.io/provisioning-api
  description: API reference
security:
- bearerAuth: []
tags:
- name: roles
  description: resource type
paths:
  /api_credentials/{apiCredentialId}/role:
    get:
      operationId: GET/apiCredentialId/role
      summary: Related API credential
      description: Related API credential
      tags:
      - roles
      parameters:
      - name: apiCredentialId
        in: path
        schema:
          type: string
        required: true
        description: The ID of the resource.
      responses:
        '200':
          description: The role associated to the API credential
  /application_memberships/{applicationMembershipId}/role:
    get:
      operationId: GET/applicationMembershipId/role
      summary: Related application membership
      description: Related application membership
      tags:
      - roles
      parameters:
      - name: applicationMembershipId
        in: path
        schema:
          type: string
        required: true
        description: The ID of the resource.
      responses:
        '200':
          description: The role associated to the application membership
  /memberships/{membershipId}/role:
    get:
      operationId: GET/membershipId/role
      summary: Related membership
      description: Related membership
      tags:
      - roles
      parameters:
      - name: membershipId
        in: path
        schema:
          type: string
        required: true
        description: The ID of the resource.
      responses:
        '200':
          description: The role associated to the membership
  /organizations/{organizationId}/roles:
    get:
      operationId: GET/organizationId/roles
      summary: Related organization
      description: Related organization
      tags:
      - roles
      parameters:
      - name: organizationId
        in: path
        schema:
          type: string
        required: true
        description: The ID of the resource.
      responses:
        '200':
          description: The roles associated to the organization
  /permissions/{permissionId}/role:
    get:
      operationId: GET/permissionId/role
      summary: Related permission
      description: Related permission
      tags:
      - roles
      parameters:
      - name: permissionId
        in: path
        schema:
          type: string
        required: true
        description: The ID of the resource.
      responses:
        '200':
          description: The role associated to the permission
  /roles:
    post:
      operationId: POST/roles
      summary: Creates an role
      description: Creates an role
      tags:
      - roles
      requestBody:
        required: true
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/roleCreate'
      responses:
        '201':
          description: The created role object
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/roleResponse'
    get:
      operationId: GET/roles
      summary: List all roles
      description: List all roles
      tags:
      - roles
      responses:
        '200':
          description: A list of role objects
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/roleResponseList'
  /roles/{roleId}:
    get:
      operationId: GET/roles/roleId
      summary: Retrieve an role
      description: Retrieve an role
      parameters:
      - name: roleId
        in: path
        schema:
          type: string
        required: true
        description: The ID of the resource.
      tags:
      - roles
      responses:
        '200':
          description: The role object
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/roleResponse'
    patch:
      operationId: PATCH/roles/roleId
      summary: Updates an role
      description: Updates an role
      tags:
      - roles
      parameters:
      - name: roleId
        in: path
        schema:
          type: string
        required: true
        description: The ID of the resource.
      requestBody:
        required: true
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/roleUpdate'
      responses:
        '200':
          description: The updated role object
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/roleResponse'
components:
  schemas:
    roleResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            id:
              type: string
              description: The ID of the resource.
              example: XGZwpOSrWL
            type:
              type: string
              description: The resource's type.
              enum:
              - roles
            links:
              type: object
              properties:
                self:
                  type: string
                  description: URL
            attributes:
              $ref: '#/components/schemas/role/properties/data/properties/attributes'
            relationships:
              type: object
              properties:
                organization:
                  type: object
                  properties:
                    links:
                      type: object
                      properties:
                        self:
                          type: string
                          description: URL
                        related:
                          type: string
                          description: URL
                    data:
                      type: object
                      properties:
                        type:
                          type: string
                          description: The resource's type.
                          enum:
                          - organization
                        id:
                          type: string
                          description: The ID of the resource.
                permissions:
                  type: object
                  properties:
                    links:
                      type: object
                      properties:
                        self:
                          type: string
                          description: URL
                        related:
                          type: string
                          description: URL
                    data:
                      type: object
                      properties:
                        type:
                          type: string
                          description: The resource's type.
                          enum:
                          - permissions
                        id:
                          type: string
                          description: The ID of the resource.
                memberships:
                  type: object
                  properties:
                    links:
                      type: object
                      properties:
                        self:
                          type: string
                          description: URL
                        related:
                          type: string
                          description: URL
                    data:
                      type: object
                      properties:
                        type:
                          type: string
                          description: The resource's type.
                          enum:
                          - memberships
                        id:
                          type: string
                          description: The ID of the resource.
                api_credentials:
                  type: object
                  properties:
                    links:
                      type: object
                      properties:
                        self:
                          type: string
                          description: URL
                        related:
                          type: string
                          description: URL
                    data:
                      type: object
                      properties:
                        type:
                          type: string
                          description: The resource's type.
                          enum:
                          - api_credentials
                        id:
                          type: string
                          description: The ID of the resource.
                versions:
                  type: object
                  properties:
                    links:
                      type: object
                      properties:
                        self:
                          type: string
                          description: URL
                        related:
                          type: string
                          description: URL
                    data:
                      type: object
                      properties:
                        type:
                          type: string
                          description: The resource's type.
                          enum:
                          - versions
                        id:
                          type: string
                          description: The ID of the resource.
    roleUpdate:
      required:
      - data
      type: object
      properties:
        data:
          type: object
          required:
          - type
          - id
          - attributes
          properties:
            type:
              type: string
              description: The resource's type.
              enum:
              - roles
            id:
              type: string
              description: The ID of the resource.
              example: XGZwpOSrWL
            attributes:
              type: object
              properties:
                name:
                  type: string
                  description: The role name.
                  example: Custom role
                _add_missing_base_permissions:
                  type: boolean
                  description: Send this attribute if you want to update the role base permissions.
                  example: true
                reference:
                  type:
                  - string
                  - 'null'
                  description: A string that you can use to add any external identifier to the resource. This can be useful for integrating the resource to an external system, like an ERP, a marketing tool, a CRM, or whatever.
                  example: ANY-EXTERNAL-REFEFERNCE
                reference_origin:
                  type:
                  - string
                  - 'null'
                  description: Any identifier of the third party system that defines the reference code.
                  example: ANY-EXTERNAL-REFEFERNCE-ORIGIN
                metadata:
                  type:
                  - object
                  - 'null'
                  description: Set of key-value pairs that you can attach to the resource. This can be useful for storing additional information about the resource in a structured format.
                  example:
                    foo: bar
            relationships:
              type: object
              properties: {}
    role:
      type: object
      properties:
        data:
          type: object
          required:
          - type
          - attributes
          properties:
            type:
              type: string
              description: The resource's type.
              enum:
              - roles
            attributes:
              type: object
              properties:
                name:
                  type: string
                  description: The role name.
                  example: Custom role
                kind:
                  type: string
                  description: 'The kind of role, one of: `custom`, `admin`, `read_only`'
                  example: custom
                  readOnly: true
                created_at:
                  type: string
                  description: Time at which the resource was created.
                  example: '2018-01-01T12:00:00.000Z'
                  readOnly: true
                updated_at:
                  type: string
                  description: Time at which the resource was last updated.
                  example: '2018-01-01T12:00:00.000Z'
                  readOnly: true
                reference:
                  type:
                  - string
                  - 'null'
                  description: A string that you can use to add any external identifier to the resource. This can be useful for integrating the resource to an external system, like an ERP, a marketing tool, a CRM, or whatever.
                  example: ANY-EXTERNAL-REFEFERNCE
                reference_origin:
                  type:
                  - string
                  - 'null'
                  description: Any identifier of the third party system that defines the reference code.
                  example: ANY-EXTERNAL-REFEFERNCE-ORIGIN
                metadata:
                  type:
                  - object
                  - 'null'
                  description: Set of key-value pairs that you can attach to the resource. This can be useful for storing additional information about the resource in a structured format.
                  example:
                    foo: bar
            relationships:
              type: object
              properties:
                organization:
                  type: object
                  properties:
                    data:
                      type: object
                      properties:
                        type:
                          type: string
                          description: The resource's type.
                          enum:
                          - organizations
                        id:
                          type: string
                          description: The ID of the resource.
                          example: XGZwpOSrWL
                permissions:
                  type: object
                  properties:
                    data:
                      type: object
                      properties:
                        type:
                          type: string
                          description: The resource's type.
                          enum:
                          - permissions
                        id:
                          type: string
                          description: The ID of the resource.
                          example: XGZwpOSrWL
                memberships:
                  type: object
                  properties:
                    data:
                      type: object
                      properties:
                        type:
                          type: string
                          description: The resource's type.
                          enum:
                          - memberships
                        id:
                          type: string
                          description: The ID of the resource.
                          example: XGZwpOSrWL
                api_credentials:
                  type: object
                  properties:
                    data:
                      type: object
                      properties:
                        type:
                          type: string
                          description: The resource's type.
                          enum:
                          - api_credentials
                        id:
                          type: string
                          description: The ID of the resource.
                          example: XGZwpOSrWL
                versions:
                  type: object
                  properties:
                    data:
                      type: object
                      properties:
                        type:
                          type: string
                          description: The resource's type.
                          enum:
                          - versions
                        id:
                          type: string
                          description: The ID of the resource.
                          example: XGZwpOSrWL
    roleResponseList:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/roleResponse/properties/data'
    roleCreate:
      required:
      - data
      type: object
      properties:
        data:
          type: object
          required:
          - type
          - attributes
          properties:
            type:
              type: string
              description: The resource's type.
              enum:
              - roles
            attributes:
              type: object
              properties:
                name:
                  type: string
                  description: The role name.
                  example: Custom role
                reference:
                  type: string
                  description: A string that you can use to add any external identifier to the resource. This can be useful for integrating the resource to an external system, like an ERP, a marketing tool, a CRM, or whatever.
                  example: ANY-EXTERNAL-REFEFERNCE
                reference_origin:
                  type: string
                  description: Any identifier of the third party system that defines the reference code.
                  example: ANY-EXTERNAL-REFEFERNCE-ORIGIN
                metadata:
                  type: object
                  description: Set of key-value pairs that you can attach to the resource. This can be useful for storing additional information about the resource in a structured format.
                  example:
                    foo: bar
              required:
              - name
            relationships:
              type: object
              properties:
                organization:
                  required:
                  - data
                  type: object
                  properties:
                    data:
                      type: object
                      properties:
                        type:
                          type: string
                          description: The resource's type.
                          enum:
                          - organizations
                        id:
                          type: string
                          description: The ID of the resource.
                          example: XGZwpOSrWL
              required:
              - organization
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT