Erply Matrix Dimension Value API

The Matrix Dimension Value API from Erply — 6 operation(s) for matrix dimension value.

OpenAPI Specification

erply-matrix-dimension-value-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 Matrix Dimension Value API
  contact: {}
  version: 2.36.5
host: ''
basePath: ''
schemes: []
tags:
- name: Matrix Dimension Value
paths:
  /v1/matrix/dimension/value:
    get:
      security:
      - sk: []
      - cc: []
      - jwt: []
      description: Get Matrix Dimension Value
      consumes:
      - application/json
      produces:
      - application/json
      tags:
      - Matrix Dimension Value
      summary: Get Matrix Dimension Values
      parameters:
      - type: integer
        description: skip n records
        name: skip
        in: query
      - type: integer
        description: 'items to take, default: 20, max: 100000'
        name: take
        in: query
      - type: string
        description: the sort parameter is explained in the `Filtering & Sorting` section on top of the Swagger documentation
        name: sort
        in: query
      - type: string
        description: the filter parameter is explained in the `Filtering & Sorting` section on top of the Swagger documentation
        name: filter
        in: query
      - type: boolean
        description: optionally return total number of records in the X-Total-Count response header
        name: withTotalCount
        in: query
      responses:
        '200':
          description: OK
          schema:
            type: array
            items:
              $ref: '#/definitions/matrixmodels.DimensionValueResponse'
          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'
    post:
      security:
      - sk: []
      - cc: []
      - jwt: []
      description: Create Matrix Dimension Value
      consumes:
      - application/json
      produces:
      - application/json
      tags:
      - Matrix Dimension Value
      summary: Create Matrix Dimension Value
      parameters:
      - description: matrixDimensionValueRequest
        name: matrixDimensionValueRequest
        in: body
        required: true
        schema:
          $ref: '#/definitions/matrixmodels.DimensionValueRequest'
      responses:
        '201':
          description: Created
          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/matrix/dimension/value/bulk:
    post:
      security:
      - sk: []
      - cc: []
      - jwt: []
      description: each request contains the created resource data
      consumes:
      - application/json
      produces:
      - application/json
      tags:
      - Matrix Dimension Value
      summary: Create dimension values in bulk
      parameters:
      - description: bulk create request
        name: request
        in: body
        required: true
        schema:
          $ref: '#/definitions/matrixmodels.DimensionValueBulkCreateRequest'
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/responses.BulkResponseWithResults'
  /v1/matrix/dimension/value/bulk/get:
    post:
      security:
      - sk: []
      - cc: []
      - jwt: []
      consumes:
      - application/json
      produces:
      - application/json
      tags:
      - Matrix Dimension Value
      summary: Get dimension values in bulk
      parameters:
      - description: requests have the parameters that the original get request has, but in json format. This way you can apply the parameters to each request separately.
        name: request
        in: body
        required: true
        schema:
          $ref: '#/definitions/parammodels.BulkReadRequestNoTotalCount'
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/matrixmodels.DimensionValueBulkReadResponse'
  /v1/matrix/dimension/value/{ids}:
    delete:
      security:
      - sk: []
      - cc: []
      - jwt: []
      consumes:
      - application/json
      produces:
      - application/json
      tags:
      - Matrix Dimension Value
      summary: Delete Matrix Dimension Values if not used by any active product
      parameters:
      - type: string
        description: semicolon delimited IDs
        name: ids
        in: path
        required: true
      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/matrix/dimension/value/{id}:
    put:
      security:
      - sk: []
      - cc: []
      - jwt: []
      consumes:
      - application/json
      produces:
      - application/json
      tags:
      - Matrix Dimension Value
      summary: Update Matrix Dimension Value
      parameters:
      - type: integer
        description: dimension value ID
        name: id
        in: path
        required: true
      - description: DimensionValueRequest
        name: DimensionValueRequest
        in: body
        required: true
        schema:
          $ref: '#/definitions/matrixmodels.DimensionValueUpdateRequest'
      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/matrix/dimension/value/{id}/move:
    put:
      security:
      - sk: []
      - cc: []
      - jwt: []
      description: 'position has to be one of the following:  `before` | `after`'
      consumes:
      - application/json
      produces:
      - application/json
      tags:
      - Matrix Dimension Value
      summary: Move Dimension Value
      parameters:
      - type: integer
        description: ID
        name: id
        in: path
        required: true
      - description: moveRequest
        name: moveRequest
        in: body
        required: true
        schema:
          $ref: '#/definitions/models.MoveRequest'
      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'
definitions:
  parammodels.ReadRequest:
    type: object
    properties:
      filters:
        type: array
        items:
          $ref: '#/definitions/parammodels.FilterJSON'
      paginationParameters:
        $ref: '#/definitions/parammodels.PaginationParameters'
      sortingParameters:
        $ref: '#/definitions/parammodels.SortRequest'
  models.MoveRequest:
    type: object
    properties:
      position:
        description: Position has to be  lastChild | before | after
        type: string
        example: after
      target_id:
        description: Target ID represents the object that the requested object is put after, or before, or becomes the last child of
        type: integer
  parammodels.FilterJSON:
    type: object
    properties:
      fieldName:
        type: string
        example: group_id
      operandBefore:
        description: supported values are "and", "or"
        type: string
        example: or
      operator:
        type: string
        example: '='
      sliceValue:
        description: to be used if the value is a slice
        type: array
        items: {}
      value:
        type: object
  matrixmodels.DimensionValueBulkReadResponseItem:
    type: object
    properties:
      dimensionValues:
        type: array
        items:
          $ref: '#/definitions/matrixmodels.DimensionValueResponse'
      message:
        type: string
        example: some message
      resultId:
        description: id of the response, if requested 3 read requests each ID represents 1 response item
        type: integer
      totalCount:
        description: total number of records (ignores skip & take parameters)
        type: integer
  matrixmodels.DimensionValueResponse:
    type: object
    properties:
      added:
        description: Unix timestamp
        type: integer
        example: 1595230999
      addedby:
        description: username
        type: string
        example: k@erp.xyz
      changed:
        description: Unix timestamp
        type: integer
        example: 1595230999
      changedby:
        description: username
        type: string
        example: k@erp.xyz
      dimension_id:
        type: integer
      dimension_value_code:
        type: string
      dimension_value_id:
        type: integer
      dimension_value_name:
        $ref: '#/definitions/Translatable'
      dimension_value_order:
        type: integer
      status:
        description: 'Status is a classifier with four possible values: ''ACTIVE'' (DEFAULT), ''NO_LONGER_ORDERED'', ''NOT_FOR_SALE'' and ''ARCHIVED''.'
        type: string
        example: ACTIVE
  responses.Response:
    type: object
    properties:
      id:
        type: integer
        example: 73
  parammodels.SortRequest:
    type: object
    properties:
      desc:
        description: If true - descending, if false - ascending
        type: boolean
      language:
        description: Language in ISO 639-1 standard. Is needed only for translatable properties like description and name.
        type: string
        example: en
      selector:
        description: 'JSON field. For description: description_plain or description_html'
        type: string
        example: name
  matrixmodels.DimensionValueRequest:
    type: object
    properties:
      dimension_id:
        type: integer
      dimension_value_code:
        type: string
      dimension_value_name:
        $ref: '#/definitions/Translatable'
      status:
        description: 'Status is a classifier with four possible values: ''ACTIVE'' (DEFAULT), ''NO_LONGER_ORDERED'', ''NOT_FOR_SALE'' and ''ARCHIVED''.'
        type: string
        example: ACTIVE
  matrixmodels.DimensionValueUpdateRequest:
    type: object
    properties:
      dimension_value_code:
        type: string
      dimension_value_name:
        $ref: '#/definitions/Translatable'
      status:
        description: 'Status is a classifier with four possible values: ''ACTIVE'' (DEFAULT), ''NO_LONGER_ORDERED'', ''NOT_FOR_SALE'' and ''ARCHIVED''.'
        type: string
        example: ACTIVE
  parammodels.PaginationParameters:
    type: object
    properties:
      skip:
        type: integer
      take:
        type: integer
  responses.MessageResponse:
    type: object
    properties:
      message:
        type: string
        example: some message
  matrixmodels.DimensionValueBulkCreateRequest:
    type: object
    properties:
      requests:
        type: array
        items:
          $ref: '#/definitions/matrixmodels.DimensionValueRequest'
  Translatable:
    type: object
    properties:
      en:
        description: This field supports more languages. Please read Translatable names and descriptions block in the documentation.
        type: string
  matrixmodels.DimensionValueBulkReadResponse:
    type: object
    properties:
      results:
        type: array
        items:
          $ref: '#/definitions/matrixmodels.DimensionValueBulkReadResponseItem'
  responses.BulkResult:
    type: object
    properties:
      message:
        type: string
        example: some message
      resourceId:
        description: identifier of the REST-ful response
        type: integer
        example: 2
      resultId:
        description: identifier of the result item
        type: integer
        example: 2
  parammodels.BulkReadRequestNoTotalCount:
    type: object
    properties:
      requests:
        type: array
        items:
          $ref: '#/definitions/parammodels.ReadRequest'
  responses.BulkResponseWithResults:
    type: object
    properties:
      results:
        type: array
        items:
          $ref: '#/definitions/responses.BulkResult'
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