> ## 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.

# Upsert articles

> Import or update full article information(including prices) in bulk. Usually performed via direct integration with Data Import service.



## OpenAPI

````yaml openapi/product-catalog-v2.json POST /v2/articles/import
openapi: 3.0.4
info:
  title: ProductCatalog.Api 2.0
  version: '2.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:
  /v2/articles/import:
    post:
      tags:
        - Articles
      summary: Upsert articles
      description: >-
        Import or update full article information(including prices) in bulk.
        Usually performed via direct integration with Data Import service.
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: >-
                  #/components/schemas/ProductCatalog.Contracts.Requests.ImportArticleV2Request
            examples:
              Single Product:
                value:
                  - name: Coca-Cola Classic 1.5L
                    externalId: EXT-1001
                    hierarchyId: '2001'
                    imageLink: https://example.com/images/cocacola-1-5l.jpg
                    brand:
                      id: Coca-Cola
                      name: BR-COCA
                    eans:
                      - '5449000131805'
                    suppliers:
                      - id: Metro Cash & Carry
                        name: SUP-201
                      - id: Retail Partners
                        name: SUP-202
                    saleUnit: bottle
                    units: null
                    unitOfMeasure: liter
                    unitsPerPiece: 1
                    isWeightable: false
                    restrictions: []
                    metadata:
                      isSugarFree: false
                      volume: 1.5L
                    depositItemExternalId: null
                    hamperItemExternalIds: []
                    prices:
                      - storeId: '-1'
                        salePrice: 19.99
                        pricePerUnit: null
                        pricePerPiece: null
                        isWithoutBarcode: null
                        taxCode: VAT20
                      - storeId: STORE-002
                        salePrice: 19.99
                        pricePerUnit: null
                        pricePerPiece: null
                        isWithoutBarcode: true
                        taxCode: VAT10
              Multiple Products:
                value:
                  - name: Lay's Classic Potato Chips 250g
                    externalId: EXT-1002
                    hierarchyId: '2002'
                    imageLink: https://example.com/images/lays-classic-150g.jpg
                    brand:
                      id: Lay's
                      name: BR-LAYS
                    eans:
                      - '8714100771234'
                    suppliers:
                      - id: Snack Distributors
                        name: SUP-301
                      - id: Metro Cash & Carry
                        name: SUP-201
                    saleUnit: pack
                    units: 2
                    unitOfMeasure: kg
                    unitsPerPiece: 0.125
                    isWeightable: true
                    restrictions: []
                    metadata:
                      flavor: Classic
                      isEcological: true
                    depositItemExternalId: null
                    hamperItemExternalIds: []
                    prices:
                      - storeId: '-1'
                        salePrice: 20
                        pricePerUnit: 80
                        pricePerPiece: 2.5
                        isWithoutBarcode: false
                        taxCode: VAT20
                      - storeId: STORE-002
                        salePrice: 22
                        pricePerUnit: 88
                        pricePerPiece: 2.75
                        isWithoutBarcode: true
                        taxCode: VAT10
                  - name: Heineken Beer 0.5L Can
                    externalId: EXT-1003
                    hierarchyId: '2003'
                    imageLink: https://example.com/images/heineken-0-5l.jpg
                    brand:
                      id: Heineken
                      name: BR-HEIN
                    eans:
                      - '8712000054321'
                    suppliers:
                      - id: Beer Wholesale
                        name: SUP-401
                      - id: Retail Partners
                        name: SUP-202
                    saleUnit: bottle
                    units: 1
                    unitOfMeasure: units
                    unitsPerPiece: 1
                    isWeightable: false
                    restrictions:
                      - Age18
                      - AlcoholOnElections
                    metadata:
                      alcoholContent: 5%
                      isImported: true
                    depositItemExternalId: null
                    hamperItemExternalIds: []
                    prices:
                      - storeId: '-1'
                        salePrice: 14.99
                        pricePerUnit: null
                        pricePerPiece: null
                        isWithoutBarcode: null
                        taxCode: VAT20
                      - storeId: STORE-002
                        salePrice: 14.5
                        pricePerUnit: null
                        pricePerPiece: null
                        isWithoutBarcode: null
                        taxCode: VAT10
          text/json:
            schema:
              type: array
              items:
                $ref: >-
                  #/components/schemas/ProductCatalog.Contracts.Requests.ImportArticleV2Request
            examples:
              Single Product:
                value:
                  - name: Coca-Cola Classic 1.5L
                    externalId: EXT-1001
                    hierarchyId: '2001'
                    imageLink: https://example.com/images/cocacola-1-5l.jpg
                    brand:
                      id: Coca-Cola
                      name: BR-COCA
                    eans:
                      - '5449000131805'
                    suppliers:
                      - id: Metro Cash & Carry
                        name: SUP-201
                      - id: Retail Partners
                        name: SUP-202
                    saleUnit: bottle
                    units: null
                    unitOfMeasure: liter
                    unitsPerPiece: 1
                    isWeightable: false
                    restrictions: []
                    metadata:
                      isSugarFree: false
                      volume: 1.5L
                    depositItemExternalId: null
                    hamperItemExternalIds: []
                    prices:
                      - storeId: '-1'
                        salePrice: 19.99
                        pricePerUnit: null
                        pricePerPiece: null
                        isWithoutBarcode: null
                        taxCode: VAT20
                      - storeId: STORE-002
                        salePrice: 19.99
                        pricePerUnit: null
                        pricePerPiece: null
                        isWithoutBarcode: true
                        taxCode: VAT10
              Multiple Products:
                value:
                  - name: Lay's Classic Potato Chips 250g
                    externalId: EXT-1002
                    hierarchyId: '2002'
                    imageLink: https://example.com/images/lays-classic-150g.jpg
                    brand:
                      id: Lay's
                      name: BR-LAYS
                    eans:
                      - '8714100771234'
                    suppliers:
                      - id: Snack Distributors
                        name: SUP-301
                      - id: Metro Cash & Carry
                        name: SUP-201
                    saleUnit: pack
                    units: 2
                    unitOfMeasure: kg
                    unitsPerPiece: 0.125
                    isWeightable: true
                    restrictions: []
                    metadata:
                      flavor: Classic
                      isEcological: true
                    depositItemExternalId: null
                    hamperItemExternalIds: []
                    prices:
                      - storeId: '-1'
                        salePrice: 20
                        pricePerUnit: 80
                        pricePerPiece: 2.5
                        isWithoutBarcode: false
                        taxCode: VAT20
                      - storeId: STORE-002
                        salePrice: 22
                        pricePerUnit: 88
                        pricePerPiece: 2.75
                        isWithoutBarcode: true
                        taxCode: VAT10
                  - name: Heineken Beer 0.5L Can
                    externalId: EXT-1003
                    hierarchyId: '2003'
                    imageLink: https://example.com/images/heineken-0-5l.jpg
                    brand:
                      id: Heineken
                      name: BR-HEIN
                    eans:
                      - '8712000054321'
                    suppliers:
                      - id: Beer Wholesale
                        name: SUP-401
                      - id: Retail Partners
                        name: SUP-202
                    saleUnit: bottle
                    units: 1
                    unitOfMeasure: units
                    unitsPerPiece: 1
                    isWeightable: false
                    restrictions:
                      - Age18
                      - AlcoholOnElections
                    metadata:
                      alcoholContent: 5%
                      isImported: true
                    depositItemExternalId: null
                    hamperItemExternalIds: []
                    prices:
                      - storeId: '-1'
                        salePrice: 14.99
                        pricePerUnit: null
                        pricePerPiece: null
                        isWithoutBarcode: null
                        taxCode: VAT20
                      - storeId: STORE-002
                        salePrice: 14.5
                        pricePerUnit: null
                        pricePerPiece: null
                        isWithoutBarcode: null
                        taxCode: VAT10
          application/*+json:
            schema:
              type: array
              items:
                $ref: >-
                  #/components/schemas/ProductCatalog.Contracts.Requests.ImportArticleV2Request
            examples:
              Single Product:
                value:
                  - name: Coca-Cola Classic 1.5L
                    externalId: EXT-1001
                    hierarchyId: '2001'
                    imageLink: https://example.com/images/cocacola-1-5l.jpg
                    brand:
                      id: Coca-Cola
                      name: BR-COCA
                    eans:
                      - '5449000131805'
                    suppliers:
                      - id: Metro Cash & Carry
                        name: SUP-201
                      - id: Retail Partners
                        name: SUP-202
                    saleUnit: bottle
                    units: null
                    unitOfMeasure: liter
                    unitsPerPiece: 1
                    isWeightable: false
                    restrictions: []
                    metadata:
                      isSugarFree: false
                      volume: 1.5L
                    depositItemExternalId: null
                    hamperItemExternalIds: []
                    prices:
                      - storeId: '-1'
                        salePrice: 19.99
                        pricePerUnit: null
                        pricePerPiece: null
                        isWithoutBarcode: null
                        taxCode: VAT20
                      - storeId: STORE-002
                        salePrice: 19.99
                        pricePerUnit: null
                        pricePerPiece: null
                        isWithoutBarcode: true
                        taxCode: VAT10
              Multiple Products:
                value:
                  - name: Lay's Classic Potato Chips 250g
                    externalId: EXT-1002
                    hierarchyId: '2002'
                    imageLink: https://example.com/images/lays-classic-150g.jpg
                    brand:
                      id: Lay's
                      name: BR-LAYS
                    eans:
                      - '8714100771234'
                    suppliers:
                      - id: Snack Distributors
                        name: SUP-301
                      - id: Metro Cash & Carry
                        name: SUP-201
                    saleUnit: pack
                    units: 2
                    unitOfMeasure: kg
                    unitsPerPiece: 0.125
                    isWeightable: true
                    restrictions: []
                    metadata:
                      flavor: Classic
                      isEcological: true
                    depositItemExternalId: null
                    hamperItemExternalIds: []
                    prices:
                      - storeId: '-1'
                        salePrice: 20
                        pricePerUnit: 80
                        pricePerPiece: 2.5
                        isWithoutBarcode: false
                        taxCode: VAT20
                      - storeId: STORE-002
                        salePrice: 22
                        pricePerUnit: 88
                        pricePerPiece: 2.75
                        isWithoutBarcode: true
                        taxCode: VAT10
                  - name: Heineken Beer 0.5L Can
                    externalId: EXT-1003
                    hierarchyId: '2003'
                    imageLink: https://example.com/images/heineken-0-5l.jpg
                    brand:
                      id: Heineken
                      name: BR-HEIN
                    eans:
                      - '8712000054321'
                    suppliers:
                      - id: Beer Wholesale
                        name: SUP-401
                      - id: Retail Partners
                        name: SUP-202
                    saleUnit: bottle
                    units: 1
                    unitOfMeasure: units
                    unitsPerPiece: 1
                    isWeightable: false
                    restrictions:
                      - Age18
                      - AlcoholOnElections
                    metadata:
                      alcoholContent: 5%
                      isImported: true
                    depositItemExternalId: null
                    hamperItemExternalIds: []
                    prices:
                      - storeId: '-1'
                        salePrice: 14.99
                        pricePerUnit: null
                        pricePerPiece: null
                        isWithoutBarcode: null
                        taxCode: VAT20
                      - storeId: STORE-002
                        salePrice: 14.5
                        pricePerUnit: null
                        pricePerPiece: null
                        isWithoutBarcode: null
                        taxCode: VAT10
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: >-
                  #/components/schemas/ProductCatalog.Contracts.Results.EmptyResult
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/ProductCatalog.Contracts.Results.EmptyResult
            text/json:
              schema:
                $ref: >-
                  #/components/schemas/ProductCatalog.Contracts.Results.EmptyResult
        '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
components:
  schemas:
    ProductCatalog.Contracts.Requests.ImportArticleV2Request:
      type: object
      properties:
        name:
          type: string
          description: Name of the product.
        externalId:
          type: string
          description: Identifier of the product in external system.
        hierarchyId:
          type: string
          description: Identifier of the hierarchy node the product belongs to.
        imageLink:
          type: string
          description: URL of the image associated with the entity.
          nullable: true
        brand:
          $ref: '#/components/schemas/ProductCatalog.Contracts.Common.ProductBrand'
        eans:
          type: array
          items:
            type: string
          description: List of EANs associated with the product.
        suppliers:
          type: array
          items:
            $ref: '#/components/schemas/ProductCatalog.Contracts.Common.Supplier'
          description: List of suppliers associated with the product.
          nullable: true
        saleUnit:
          type: string
          description: The unit in which the product is sold (e.g., piece, pack, box).
          nullable: true
        units:
          type: number
          description: Total weight of the product.
          format: double
          nullable: true
        unitOfMeasure:
          type: string
          description: >-
            The measurement unit used to quantify the product (e.g., kg, liter,
            meter, piece).
          nullable: true
        unitsPerPiece:
          type: number
          description: The number of units contained in a single piece of the product.
          format: double
          nullable: true
        isWeightable:
          type: boolean
          description: Indicates if the product is sold by weight.
          nullable: true
        restrictions:
          type: array
          items:
            type: string
          description: >-
            List of restrictions (e.g., Age16, Age18, etc.) associated with the
            product.
          nullable: true
        metadata:
          type: object
          additionalProperties: {}
          description: Additional metadata associated with the product.
          nullable: true
        depositItemExternalId:
          type: string
          description: >-
            Deposit item's externa id (from external system) associated with the
            product.
          nullable: true
        hamperItemExternalIds:
          type: array
          items:
            type: string
          description: >-
            Hamper item's external ids (from external system) associated with
            the product.
          nullable: true
        prices:
          type: array
          items:
            $ref: >-
              #/components/schemas/ProductCatalog.Contracts.Requests.ImportArticleV2Request.ArticlePriceRequest
          description: Artices prices per store.
      additionalProperties: false
      description: Import article request model.
    ProductCatalog.Contracts.Results.EmptyResult:
      type: object
      additionalProperties: false
    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.Common.ProductBrand:
      type: object
      properties:
        id:
          type: string
          description: Identifier of the brand
        name:
          type: string
          description: Name of the brand
      additionalProperties: false
      description: Represents product's brand.
    ProductCatalog.Contracts.Common.Supplier:
      type: object
      properties:
        id:
          type: string
          description: Identifier of the supplier
        name:
          type: string
          description: Name of the supplier
      additionalProperties: false
      description: Represents product's supplier.
    ProductCatalog.Contracts.Requests.ImportArticleV2Request.ArticlePriceRequest:
      type: object
      properties:
        storeId:
          type: string
          description: Identifier of store.
        salePrice:
          type: number
          description: Sale price of the product in store.
          format: double
        pricePerUnit:
          type: number
          description: The price per unit.
          format: double
          nullable: true
        pricePerPiece:
          type: number
          description: The price per piece.
          format: double
          nullable: true
        isWithoutBarcode:
          type: boolean
          description: Indicator whether the item is without a barcode.
          nullable: true
        taxCode:
          type: string
          description: Tax code associated with the product.
      additionalProperties: false
      description: Import article's price request model.
    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

````