---
title: "Import Competition Data"
method: POST
path: "/productmanager.importproductcompetition"
tags: ["Competition Data", "Products"]
---

# Import Competition Data

`POST /productmanager.importproductcompetition`

## Request

- Base URL: `https://companynode.pricefx.com/pricefx/companypartition`
- URL: `https://companynode.pricefx.com/pricefx/companypartition/productmanager.importproductcompetition`
- Auth: one of:
  - HTTP basic
  - API key in header `X-PriceFx-jwt`
- TypeScript: <https://skmtc.dev/pricefx/apis/the-pricefx-backend-api/docs/productmanager.importproductcompetition/post.ts> (a function with typed inputs; its response is checked against the schema)

Adds products to the Competition Data table. Returns the number of updated, inserted, and failed records during the import. Creates a new row for each product.

## Request body

- object
  - `data` object, required
    - `importStrategy` 'INSERT' | 'UPDATE', required: INSERT - always inserts new records, even duplicates. UPDATE - data is always overridden.
    - `products` object[], required
      - `sku` string, required
      - `label` string
      - `price` number
      - `currency` string
      - `competitor` string
      - `competitorSku` string
      - `competitionType` string
      - `country` string
      - `priceUnit` number
      - `unitOfMeasure` string
      - `infoDate` string
      - `additionalInfo1` number
      - `additionalInfo2` number
      - `additionalInfo4` string

## Response `200`

OK

- object
  - `response` object, required
    - `node` string
    - `data` object
      - `updated` integer: The number of records that have been updated.
      - `inserted` integer: The number of newly added records.
      - `error` integer: The number of error records.
      - `errorRecords` object[]: The list of errors with its records from the request.
        - `record` object: The error record from the request.
          - `sku` string
          - `label` string
          - `price` number
          - `currency` string
          - `competitor` string
          - `competitorSku` string
          - `competitionType` string
          - `country` string
          - `comments` string
          - `source` string
          - `priceType` string
          - `priceUnit` number
          - `unitOfMeasure` string
          - `infoDate` string
          - `additionalInfo1` number
          - `additionalInfo2` number
          - `additionalInfo3` string
          - `additionalInfo4` string
        - `errorMessages` string[]
    - `status` number

---

[API](https://skmtc.dev/pricefx/apis/the-pricefx-backend-api.md) - [All operations](https://skmtc.dev/pricefx/apis/the-pricefx-backend-api/llms.txt) - [OpenAPI document](https://skmtc.dev/pricefx/apis/the-pricefx-backend-api/revisions/23d941b00ac0?raw)
