Katana ProductController API

The ProductController API from Katana — 2 operation(s) for productcontroller.

OpenAPI Specification

katana-productcontroller-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: katana-api-gateway AdditionalCostController ProductController API
  version: 0.0.1
  description: public api
  contact: {}
servers:
- url: https://api.katanamrp.com/v1
tags:
- name: ProductController
paths:
  /products/{id}:
    patch:
      x-controller-name: ProductController
      x-operation-name: updateProduct
      tags:
      - ProductController
      responses:
        '200':
          description: Return value of ProductController.updateProduct
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProductUpdateDto'
        required: true
        x-parameter-index: 1
      operationId: ProductController.updateProduct
      parameters:
      - name: id
        in: path
        schema:
          type: integer
          format: int32
        required: true
    get:
      x-controller-name: ProductController
      x-operation-name: getProduct
      tags:
      - ProductController
      responses:
        '200':
          description: Return value of ProductController.getProduct
      operationId: ProductController.getProduct
      parameters:
      - name: id
        in: path
        schema:
          type: integer
          format: int32
        required: true
      - name: extend
        in: query
        schema:
          type: array
          items:
            type: string
            enum:
            - supplier
    delete:
      x-controller-name: ProductController
      x-operation-name: deleteProduct
      tags:
      - ProductController
      responses:
        '200':
          description: Return value of ProductController.deleteProduct
      operationId: ProductController.deleteProduct
      parameters:
      - name: id
        in: path
        schema:
          type: integer
          format: int32
        required: true
  /products:
    post:
      x-controller-name: ProductController
      x-operation-name: createProduct
      tags:
      - ProductController
      responses:
        '200':
          description: Return value of ProductController.createProduct
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateProductDto'
        required: true
      operationId: ProductController.createProduct
    get:
      x-controller-name: ProductController
      x-operation-name: getAllProducts
      tags:
      - ProductController
      responses:
        '200':
          description: Return value of ProductController.getAllProducts
      operationId: ProductController.getAllProducts
      parameters:
      - name: pagination
        in: query
        content:
          application/json:
            schema:
              type: object
              additionalProperties: true
      - name: dateFilter
        in: query
        content:
          application/json:
            schema:
              type: object
              additionalProperties: true
      - name: ids
        in: query
        schema:
          type: array
          items:
            type: integer
            maximum: 2147483647
      - name: name
        in: query
        schema:
          type: string
      - name: uom
        in: query
        schema:
          type: string
      - name: category_name
        in: query
        schema:
          type: string
      - name: is_sellable
        in: query
        schema:
          type: boolean
      - name: is_producible
        in: query
        schema:
          type: boolean
      - name: is_purchasable
        in: query
        schema:
          type: boolean
      - name: is_auto_assembly
        in: query
        schema:
          type: boolean
      - name: default_supplier_id
        in: query
        schema:
          type: integer
          format: int32
      - name: batch_tracked
        in: query
        schema:
          type: string
      - name: serial_tracked
        in: query
        schema:
          type: string
      - name: operations_in_sequence
        in: query
        schema:
          type: boolean
      - name: purchase_uom
        in: query
        schema:
          type: string
      - name: purchase_uom_conversion_rate
        in: query
        schema:
          type: number
      - name: include_deleted
        in: query
        schema:
          type: boolean
      - name: include_archived
        in: query
        schema:
          type: boolean
      - name: extend
        in: query
        schema:
          type: array
          items:
            type: string
            enum:
            - supplier
components:
  schemas:
    ProductUpdateDto:
      title: ProductUpdateDto
      type: object
      properties:
        name:
          type: string
          nullable: false
          minLength: 1
          maxLength: 256
        uom:
          type: string
          nullable: false
          minLength: 1
          maxLength: 7
        category_name:
          type: string
          nullable: true
          minLength: 1
          maxLength: 35
        is_producible:
          type: boolean
          default: false
          nullable: false
        default_supplier_id:
          type: integer
          nullable: true
          maximum: 2147483647
          minimum: 1
        is_purchasable:
          type: boolean
          default: false
          nullable: false
        is_auto_assembly:
          type: boolean
          default: false
          nullable: false
        is_sellable:
          type: boolean
          default: false
          nullable: false
        is_archived:
          type: boolean
          default: false
          nullable: false
        purchase_uom:
          type: string
          nullable: true
          minLength: 1
          maxLength: 7
        purchase_uom_conversion_rate:
          type: number
          nullable: true
          minimum: 0
          maximum: 2147483647
        batch_tracked:
          type: boolean
          default: false
          nullable: false
        serial_tracked:
          type: boolean
          default: false
          nullable: false
        operations_in_sequence:
          type: boolean
          default: false
          nullable: false
        configs:
          type: array
          items:
            title: ItemVariantConfigDto
            type: object
            properties:
              id:
                type: number
              name:
                type: string
              values:
                type: array
                items:
                  type: string
            required:
            - values
            additionalProperties: false
          minItems: 1
          maxItems: 10
        additional_info:
          type: string
          nullable: true
          minLength: 1
        custom_field_collection_id:
          type: number
          nullable: true
      additionalProperties: false
    CreateProductDto:
      title: CreateProductDto
      type: object
      properties:
        name:
          type: string
          minLength: 1
        uom:
          type: string
          nullable: false
          minLength: 1
          maxLength: 7
        category_name:
          type: string
          minLength: 1
        is_producible:
          type: boolean
        is_purchasable:
          type: boolean
        is_auto_assembly:
          type: boolean
        default_supplier_id:
          type: integer
          maximum: 2147483647
        additional_info:
          type: string
        batch_tracked:
          type: boolean
          default: false
          nullable: false
        serial_tracked:
          type: boolean
          default: false
          nullable: false
        operations_in_sequence:
          type: boolean
          default: false
          nullable: false
        purchase_uom:
          type: string
          nullable: true
          minLength: 1
          maxLength: 7
        purchase_uom_conversion_rate:
          type: number
          maximum: 1000000000000
        configs:
          type: array
          items:
            title: CreateMaterialConfigDto
            type: object
            properties:
              name:
                type: string
              values:
                type: array
                items:
                  type: string
            required:
            - name
            - values
            additionalProperties: false
          minItems: 1
          maxItems: 10
        variants:
          type: array
          minItems: 1
          items:
            title: CreateProductVariantDto
            type: object
            properties:
              sku:
                type: string
                minLength: 1
              purchase_price:
                type: number
                nullable: true
                minimum: 0
                maximum: 100000000000
              sales_price:
                type: number
                nullable: true
                minimum: 0
                maximum: 100000000000
              internal_barcode:
                type: string
                maxLength: 40
                minLength: 3
              registered_barcode:
                type: string
                maxLength: 40
                minLength: 3
              supplier_item_codes:
                type: array
                items:
                  type: string
                  maxLength: 40
                  minLength: 1
              config_attributes:
                type: array
                items:
                  title: CreateVariantAttributesDto
                  type: object
                  properties:
                    config_name:
                      type: string
                    config_value:
                      type: string
                  required:
                  - config_name
                  - config_value
                  additionalProperties: false
                minItems: 1
              custom_fields:
                type: array
                maxItems: 3
                items:
                  title: CustomFieldValueDto
                  type: object
                  properties:
                    field_name:
                      type: string
                    field_value:
                      type: string
                  required:
                  - field_name
                  - field_value
                  additionalProperties: false
              lead_time:
                type: number
                nullable: true
                minimum: 0
                maximum: 2147483647
              minimum_order_quantity:
                type: number
                nullable: true
                minimum: 0
                maximum: 2147483647
            additionalProperties: false
        custom_field_collection_id:
          type: number
          nullable: true
        is_sellable:
          type: boolean
      required:
      - name
      - variants
      additionalProperties: false