Import Competition Data

post/productmanager.importproductcompetition

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.

Securitybasic or X-PriceFx-jwt
Request
Request Body schema: application/json

The competition product details.

required
object
importStrategy
required
string

INSERT - always inserts new records, even duplicates. UPDATE - data is always overridden.

Possible values: "INSERT" "UPDATE"
required
Array of objects non-empty unique
Array (non-empty)
sku
required
string non-empty
label
string non-empty
price
number
currency
string non-empty
competitor
string non-empty
competitorSku
string non-empty
competitionType
string non-empty
country
string non-empty
priceUnit
number
unitOfMeasure
string non-empty
infoDate
string non-empty
additionalInfo1
number
additionalInfo2
number
additionalInfo4
string non-empty
Responses
200

OK

Response Schema: application/json
required
object
node
string non-empty
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.

Array of objects

The list of errors with its records from the request.

Array
object

The error record from the request.

errorMessages
Array of strings
status
number
Request samples
application/json
{
  • "data": {
    • "importStrategy": "INSERT",
    • "products": [
      • {
        • "sku": "01",
        • "label": "Product01",
        • "price": 10,
        • "currency": "EUR",
        • "competitor": "COMP",
        • "competitorSku": "P001",
        • "competitionType": "string",
        • "country": "Spain",
        • "priceUnit": 1,
        • "unitOfMeasure": "string",
        • "infoDate": "2021-10-25T12:14:28.646Z",
        • "additionalInfo1": 0,
        • "additionalInfo2": 100,
        • "additionalInfo4": "test"
        },
      • {
        • "sku": "02",
        • "label": "Product02",
        • "price": 10,
        • "currency": "EUR",
        • "competitor": "COMP",
        • "competitorSku": "P002",
        • "competitionType": "string",
        • "country": "Italy",
        • "priceUnit": 1,
        • "unitOfMeasure": "string",
        • "infoDate": "2021-10-25T12:16:28.646Z",
        • "additionalInfo1": 0,
        • "additionalInfo2": 100,
        • "additionalInfo4": "test"
        }
      ]
    }
}
Response samples
application/json
{
  • "response": {
    • "node": "string",
    • "data": {
      • "updated": 0,
      • "inserted": 0,
      • "error": 0,
      • "errorRecords": [
        • {
          }
        ]
      },
    • "status": 0
    }
}