Insert Bulk Data From a File

post/loaddata.file/{TypeCode}

Inserts multiple records to the Master Data table from the CSV file.

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

If used in a Groovy logic, it is recommended to use the api.addOrUpdate() method instead of this loaddata endpoint within the boundCall().
For more details see the Avoid api.boundCall article.

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.file 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
path Parameters
TypeCode
required
string

Enter the type code of the entity you want to insert a data to. See the list of Type Codes in the Pricefx Knowledge Base article.

Possible values: "C" "CDESC" "CX" "JLTV" "LTV" "MLTV" "P" "PBOME" "PCOMP" "PDESC" "PR" "PX" "PXREF" "SL" "SX" "TODO" "UG"
Example: PX
query Parameters
name
string

The name of the table you want to upload a file to.

Request Body schema: multipart/form-data
fileName
required
string <binary>

Provide a file in the CSV format. The file must also contain the name column with the name(s) of the table (PX, CX, SX) you are inserting the records to.

joinFields
string

Specify fields that make up a Business key.

Responses
200

OK

Response Schema: application/json
object
node
string
Array of objects
Array
uploadStatusId
integer
loadedRecords
integer
invalidRecords
integer
totalRecords
integer
status
integer
Request samples
Response samples
application/json
{
  • "response": {
    • "node": "node",
    • "data": [
      • {
        • "uploadStatusId": 4306,
        • "loadedRecords": 4,
        • "invalidRecords": 0,
        • "totalRecords": 4
        }
      ],
    • "status": 0
    }
}