Erply Permissions API

The Permissions API from Erply — 2 operation(s) for permissions.

OpenAPI Specification

erply-permissions-api-openapi.yml Raw ↑
swagger: '2.0'
info:
  description: "\n\n## Overview\n\n\n\nThis application offers an API for managing assignments and tasks.\n\n\n\nGraphQL endpoint for the same API is [also available](/graph)\n\n\n\n<details><summary>Authentication</summary>\n\n\n\n> \n\n> Authenticate using your Erply credentials and get a sessionKey. This sessionKey and your Erply clientCode must be provided in the HTTP headers of every request. You do not have to authenticate against this API - valid Erply sessionKey-s from other sources are also acceptable. To authenticate using this API, use the `POST /api/v1/auth` endpoint.\n\n>\n\n</details>\n\n"
  title: assignments Assortment Permissions API
  contact: {}
  version: 2.36.5
host: ''
basePath: ''
schemes: []
tags:
- name: Permissions
paths:
  /v1/permissions:
    patch:
      security:
      - sk: []
      - cc: []
      - jwt: []
      description: 'Some entities support setting up permissions on the user level. They include product groups and categpries.

        Response is the userID of the updated user

        '
      consumes:
      - application/json
      produces:
      - application/json
      tags:
      - Permissions
      summary: Set / Update a permission
      parameters:
      - type: string
        description: 'values: ''product group'' or ''product category'''
        name: entity
        in: query
        required: true
      - description: request
        name: request
        in: body
        required: true
        schema:
          $ref: '#/definitions/permissions.SetUserPermissionRequest'
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/responses.Response'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/responses.MessageResponse'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/responses.MessageResponse'
  /v1/permissions/{userID}:
    get:
      security:
      - sk: []
      - cc: []
      - jwt: []
      consumes:
      - application/json
      produces:
      - application/json
      tags:
      - Permissions
      summary: Get user permissions
      parameters:
      - type: integer
        description: user ID
        name: userID
        in: path
      - type: string
        description: 'values: ''product group'' or ''product category'''
        name: entity
        in: query
        required: true
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/permissions.UserPermission'
          headers:
            X-Total-Count:
              type: uint
              description: total number of records (ignores skip & take parameters)
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/responses.MessageResponse'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/responses.MessageResponse'
definitions:
  responses.Response:
    type: object
    properties:
      id:
        type: integer
        example: 73
  permissions.UserPermission:
    type: object
    properties:
      isCreateEnabled:
        type: boolean
      isDeleteEnabled:
        type: boolean
      isUpdateEnabled:
        type: boolean
      userID:
        type: integer
  permissions.SetUserPermissionRequest:
    type: object
    properties:
      isCreateEnabled:
        type: boolean
      isDeleteEnabled:
        type: boolean
      isUpdateEnabled:
        type: boolean
      userID:
        type: integer
  responses.MessageResponse:
    type: object
    properties:
      message:
        type: string
        example: some message
securityDefinitions:
  AccessToken:
    type: apiKey
    name: accessToken
    in: header
  ErplyClientCode:
    type: apiKey
    name: clientCode
    in: header
  ErplyJWT:
    type: apiKey
    name: jwt
    in: header
  ErplySession:
    type: apiKey
    name: sessionKey
    in: header
  RequestKey:
    type: apiKey
    name: requestKey
    in: header