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

# Legacy article upsert

> Imports article information in bulk. Since this endpoint has been developed for backwards compatibility purpose, the endpoint may be removed in future versions. Use v2 import of articles instead.



## OpenAPI

````yaml openapi/product-catalog-v1.json POST /v1/import
openapi: 3.0.4
info:
  title: ProductCatalog.Api 1.0
  version: '1.0'
servers:
  - url: https://{host}/product-catalog
    description: Your Lobyco environment
    variables:
      host:
        default: your-environment.lobyco.net
        description: >-
          The API host for your Lobyco environment. Replace it with the host you
          were given — this placeholder does not resolve.
security: []
paths:
  /v1/import:
    post:
      tags:
        - Articles
      summary: Legacy article upsert
      description: >-
        Imports article information in bulk. Since this endpoint has been
        developed for backwards compatibility purpose, the endpoint may be
        removed in future versions. Use v2 import of articles instead.
      parameters:
        - name: mode
          in: query
          description: The different import types
          schema:
            $ref: '#/components/schemas/ProductCatalog.Contracts.Requests.ImportType'
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: >-
                  #/components/schemas/ProductCatalog.Contracts.Requests.ImportArticleRequest
          text/json:
            schema:
              type: array
              items:
                $ref: >-
                  #/components/schemas/ProductCatalog.Contracts.Requests.ImportArticleRequest
          application/*+json:
            schema:
              type: array
              items:
                $ref: >-
                  #/components/schemas/ProductCatalog.Contracts.Requests.ImportArticleRequest
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: >-
                  #/components/schemas/ProductCatalog.Contracts.Response.ImportArticlesResponse
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/ProductCatalog.Contracts.Response.ImportArticlesResponse
            text/json:
              schema:
                $ref: >-
                  #/components/schemas/ProductCatalog.Contracts.Response.ImportArticlesResponse
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: >-
                  #/components/schemas/ProductCatalog.Contracts.Results.DataImportErrorResult
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/ProductCatalog.Contracts.Results.DataImportErrorResult
            text/json:
              schema:
                $ref: >-
                  #/components/schemas/ProductCatalog.Contracts.Results.DataImportErrorResult
      deprecated: true
components:
  schemas:
    ProductCatalog.Contracts.Requests.ImportType:
      enum:
        - FullWithUpsert
        - Incremental
        - FullWithCleanup
      type: string
      description: The different import types
    ProductCatalog.Contracts.Requests.ImportArticleRequest:
      type: object
      properties:
        command:
          $ref: '#/components/schemas/ProductCatalog.Contracts.Requests.ImportCommand'
        article:
          $ref: >-
            #/components/schemas/ProductCatalog.Contracts.Requests.ImportArticleRequest.ArticleRequest
      additionalProperties: false
    ProductCatalog.Contracts.Response.ImportArticlesResponse:
      type: object
      properties:
        modifiedCount:
          type: integer
          description: The number of articles that were modified
          format: int64
        insertedCount:
          type: integer
          description: The number of articles that were inserted
          format: int64
        deletedCount:
          type: integer
          description: The number of articles that were deleted
          format: int64
        errorCount:
          type: integer
          description: The number of occurred errors
          format: int64
      additionalProperties: false
      description: The legacy import articles response
    ProductCatalog.Contracts.Results.DataImportErrorResult:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: >-
              #/components/schemas/LoopFoundation.Commons.Contracts.WebServiceError
      additionalProperties: false
      description: Class for integration with Data import service.
    ProductCatalog.Contracts.Requests.ImportCommand:
      enum:
        - Insert
        - Update
        - Delete
      type: string
      description: The import command types
    ProductCatalog.Contracts.Requests.ImportArticleRequest.ArticleRequest:
      type: object
      properties:
        articleId:
          type: string
        name:
          type: string
        eans:
          type: array
          items:
            type: string
        category:
          $ref: >-
            #/components/schemas/ProductCatalog.Contracts.Requests.ImportArticleRequest.Category
        units:
          type: number
          format: double
        hierarchyId:
          type: string
          nullable: true
        storeId:
          type: string
        chainId:
          type: string
        salePrice:
          type: number
          format: double
        unitOfMeasure:
          $ref: '#/components/schemas/ProductCatalog.Contracts.Response.UnitType'
        taxCode:
          type: number
          format: double
        pricePerUnit:
          type: number
          format: double
        isWeightable:
          type: boolean
        pricePerPiece:
          type: number
          format: double
        unitsPerPiece:
          type: number
          format: double
        restrictions:
          type: array
          items:
            $ref: >-
              #/components/schemas/ProductCatalog.Contracts.Common.ProductRestrictionType
        depositItem:
          $ref: >-
            #/components/schemas/ProductCatalog.Contracts.Requests.ImportArticleRequest.ArticleRequest
        hamperItems:
          type: array
          items:
            $ref: >-
              #/components/schemas/ProductCatalog.Contracts.Requests.ImportArticleRequest.ArticleRequest
          nullable: true
        createdDate:
          type: string
          format: date-time
        lastUpdateDate:
          type: string
          format: date-time
        imageUrl:
          type: string
          nullable: true
        isWithoutBarcode:
          type: boolean
          nullable: true
      additionalProperties: false
    LoopFoundation.Commons.Contracts.WebServiceError:
      required:
        - message
        - name
      type: object
      properties:
        name:
          minLength: 1
          type: string
        message:
          minLength: 1
          type: string
        details:
          nullable: true
      additionalProperties: false
    ProductCatalog.Contracts.Requests.ImportArticleRequest.Category:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        groupName:
          type: string
      additionalProperties: false
    ProductCatalog.Contracts.Response.UnitType:
      enum:
        - Kg
        - Piece
        - Liter
      type: string
      description: The unit type
    ProductCatalog.Contracts.Common.ProductRestrictionType:
      enum:
        - Age16
        - Age18
        - Age20
        - AlcoholOnElections
      type: string
      description: The restriction type applied to a product.

````