Insert Bulk Products

post/loaddata/P

Inserts multiple products to the Master Data table.

The /loaddata operation is a very efficient and quick way to insert bulk data to the Master Data table. The main advantage is its greater speed when loading thousands of records (compared to e.g. /integrate).

Use the ISO 8601 date format (YYYY-MM-DD) if a date is included in the table.

Please note: If no joinFields are provided in the request, then this operation will insert entire records. It means that in this case (without joinFields) with /loaddata it is not possible to update just some fields (for this use the /integrate endpoint instead). The source data must always contain the entire row’s content.

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

Specify product field names in the header object and fields values in the data object.

Information: Field names (columns) sent in your request might be different from our sample request schema. Custom fields (attribute1..attribute30) can be retrieved using the /fetch/PAM endpoint.

required
object
header
required
Array of strings

Specify header field names (table columns) of the record in the target table.

object

Specify options of the bulk data insertion.

detectJoinFields
boolean

Set to true to use join fields definitions from the server. Set to false to specify join fields with the joinFields parameter in the request.

Array of objects

Using the maxJoinFieldsLenghts parameter you can tell loaddata that it is not needed to reserve 255 chars; instead you put there the real lengths of join Fields (based on your knowledge of the data being loaded).

Array
joinField
string

A join field name.

maxLength
string

The maximum number of characters of the value in the joinFields parameter.

data
required
Array of any

Specify the field values in the same order as specified in the header object.

Responses
200

Returns the number of inserted or updated objects.

Response Schema: application/json
object
node
string non-empty
data
Array of any
status
number
400

Bad Request - Invalid command parameters

Request samples
application/json
{
  • "data": {
    • "header": [
      • "sku",
      • "label",
      • "unitOfMeasure",
      • "currency",
      • "lastUpdateDate",
      • "formulaName",
      • "attribute1",
      • "attribute2",
      • "attribute3",
      • "attribute4",
      • "attribute5",
      • "attribute6",
      • "attribute7",
      • "attribute8",
      • "userGroupEdit",
      • "userGroupViewDetails"
      ],
    • "options": {
      • "detectJoinFields": true,
      • "maxJoinFieldsLengths": [ ]
      },
    • "data": [
      • [
        • "B-0001",
        • "Pub Beer",
        • "",
        • "EUR",
        • "2020-12-17T09:45:56",
        • "ElementWithVLookup",
        • "17.16",
        • "American Pale Lager",
        • "",
        • "",
        • "DG_03",
        • "Maturity",
        • "",
        • "2018-04-18",
        • "",
        • ""
        ],
      • [
        • "B-0002",
        • "Devil's Cup",
        • "",
        • "EUR",
        • "2022-10-07T09:43:30",
        • "",
        • "24.05",
        • "American Pale Ale (APA)",
        • "",
        • "",
        • "DG_03",
        • "Maturity",
        • "",
        • "2018-04-18",
        • "",
        • ""
        ],
      • [
        • "B-0003",
        • "Rise of the Phoenix",
        • "",
        • "EUR",
        • "2019-07-15T11:18:26",
        • "ConfiguratorWithRadioButton",
        • "34.4",
        • "American IPA",
        • "",
        • "A",
        • "DG_03",
        • "",
        • "",
        • "2018-04-18",
        • "",
        • ""
        ]
      ]
    }
}
Response samples
application/json
{
  • "response": {
    • "node": "<the server>",
    • "data": [
      • 3
      ],
    • "status": 0
    }
}