> ## Documentation Index
> Fetch the complete documentation index at: https://docs.clearline.me/llms.txt
> Use this file to discover all available pages before exploring further.

# Import products categories to the system



## OpenAPI

````yaml /openapi.yaml post /pos/{posSystemId}/company/{posCompanyId}/import/productCategories
openapi: 3.0.1
info:
  title: ClearLine POS API
  description: >-
    Point of Sale integration API for ClearLine Marketing Platform. This API
    enables POS systems to send transaction data, manage customer interactions,
    and integrate with marketing campaigns.
  version: v1
servers:
  - url: https://public-api-demo.clearline.me
    description: ClearLine API Server
security: []
paths:
  /pos/{posSystemId}/company/{posCompanyId}/import/productCategories:
    post:
      tags:
        - Import
      summary: Import products categories to the system
      operationId: PosCompanyImport_ImportPosCompanyProductCategories
      parameters:
        - name: posSystemId
          in: path
          required: true
          schema:
            type: string
        - name: posCompanyId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/PosProductItemsCategoriesPostDto'
            example:
              items:
                - name: Category 1
                  posProductParentCategoryId: '10'
                  posProductCategoryId: '2'
                  posCatalogId: '1'
          application/json:
            schema:
              $ref: '#/components/schemas/PosProductItemsCategoriesPostDto'
            example:
              items:
                - name: Category 1
                  posProductParentCategoryId: '10'
                  posProductCategoryId: '2'
                  posCatalogId: '1'
          text/json:
            schema:
              $ref: '#/components/schemas/PosProductItemsCategoriesPostDto'
            example:
              items:
                - name: Category 1
                  posProductParentCategoryId: '10'
                  posProductCategoryId: '2'
                  posCatalogId: '1'
          application/*+json:
            schema:
              $ref: '#/components/schemas/PosProductItemsCategoriesPostDto'
            example:
              items:
                - name: Category 1
                  posProductParentCategoryId: '10'
                  posProductCategoryId: '2'
                  posCatalogId: '1'
          application/xml:
            schema:
              $ref: '#/components/schemas/PosProductItemsCategoriesPostDto'
            example:
              items:
                - name: Category 1
                  posProductParentCategoryId: '10'
                  posProductCategoryId: '2'
                  posCatalogId: '1'
          text/xml:
            schema:
              $ref: '#/components/schemas/PosProductItemsCategoriesPostDto'
            example:
              items:
                - name: Category 1
                  posProductParentCategoryId: '10'
                  posProductCategoryId: '2'
                  posCatalogId: '1'
          application/*+xml:
            schema:
              $ref: '#/components/schemas/PosProductItemsCategoriesPostDto'
            example:
              items:
                - name: Category 1
                  posProductParentCategoryId: '10'
                  posProductCategoryId: '2'
                  posCatalogId: '1'
      responses:
        '200':
          description: Success
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ImportResultDtoApiResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ImportResultDtoApiResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ImportResultDtoApiResponse'
            application/xml:
              schema:
                $ref: '#/components/schemas/ImportResultDtoApiResponse'
            text/xml:
              schema:
                $ref: '#/components/schemas/ImportResultDtoApiResponse'
      security:
        - BearerAuth: []
        - ImplicitAuth: []
components:
  schemas:
    PosProductItemsCategoriesPostDto:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/PosProductItemsCategoryPostDto'
          description: Items to add
          nullable: true
      additionalProperties: false
      description: Represents product items import category request for POS
    ImportResultDtoApiResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/ImportResultDto'
      additionalProperties: false
    PosProductItemsCategoryPostDto:
      type: object
      properties:
        name:
          type: string
          description: Category name
          nullable: true
        posProductParentCategoryId:
          type: string
          description: Parent category Id
          nullable: true
        posProductCategoryId:
          type: string
          description: Category Id
          nullable: true
        posCatalogId:
          type: string
          description: Catalog id
          nullable: true
      additionalProperties: false
      description: Represents product item category
    ImportResultDto:
      type: object
      properties:
        status:
          type: string
          description: Status message.
          nullable: true
        createdCount:
          type: integer
          description: Created new items count.
          format: int32
        updatedCount:
          type: integer
          description: Updated existing items count.
          format: int32
        errors:
          type: array
          items:
            $ref: '#/components/schemas/ImportErrorDto'
          description: Import errors.
          nullable: true
        warnings:
          type: array
          items:
            $ref: '#/components/schemas/ImportWarningDto'
          description: Import warnings.
          nullable: true
      additionalProperties: false
      description: Results of import
    ImportErrorDto:
      type: object
      properties:
        entityId:
          type: string
          description: Id of the imported entity
          nullable: true
        rowNumber:
          type: integer
          description: Row number in the source list
          format: int32
        errorMessage:
          type: string
          description: Error message
          nullable: true
        errorDetails:
          type: string
          description: Error details
          nullable: true
      additionalProperties: false
      description: Error in the import
    ImportWarningDto:
      type: object
      properties:
        entityId:
          type: string
          description: Id of the imported entity
          nullable: true
        rowNumber:
          type: integer
          description: Row number in the source list
          format: int32
        message:
          type: string
          description: Warning message
          nullable: true
        details:
          type: string
          description: Warning details
          nullable: true
      additionalProperties: false
      description: Warning in the import
  securitySchemes:
    BearerAuth:
      type: http
      description: |-

        JWT Authorization header using the Bearer scheme.

        Enter **_JWT Bearer token only_** in the text input below.
      scheme: bearer
      bearerFormat: JWT
    ImplicitAuth:
      type: oauth2
      description: Implicit scheme
      flows:
        implicit:
          authorizationUrl: https://logindemo.clearline.me/connect/authorize
          scopes:
            clearline_api: Grants access to Clearline API endpoints.

````