---
title: "Insert Bulk Data"
method: POST
path: "/loaddata/{TypeCode}"
tags: ["General"]
---

# Insert Bulk Data

`POST /loaddata/{TypeCode}`

Inserts multiple records to the Master Data table.<p>

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**).<p>
Use the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) date format (YYYY-MM-DD) if a date is included in the table.<p>
See the list of [bulk-loadable objects](https://pricefx.atlassian.net/wiki/spaces/KB/pages/5345214465/Bulk-Loadable+Objects).
>If used in a Groovy logic, it is recommended to use the [api.addOrUpdate()](https://qa.pricefx.eu/pricefx-api/groovy/develop/net/pricefx/formulaengine/scripting/PublicGroovyAPI.html#addOrUpdate(java.lang.String,java.util.List)) method instead of this loaddata endpoint within the boundCall().<br>
>For more details see the [Avoid api.boundCall](https://pricefx.atlassian.net/wiki/spaces/KB/pages/2511699985/Avoid+api.boundCall) article.
<p>

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

## Request body

- object
  - `data` object, required
    - `header` unknown[], required — Specify header field names (table columns) of the record in the target table.
      - unknown
    - `options` object — Specify options of the bulk data insertion.
      - `detectJoinFields` boolean, required — 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.
      - `joinFields` string[], required — A list of fields (that also need to appear in `header` and `data`) that make up the business key.
      - `conditionRecords` object — Options applicable only for the CRCP data load.
        - `splicing` object — Options applicable for splicing process of the Condition Records.
          - `setFields` object — A list of fields for set (sets the attribute to a specified value).
          - `resetFields` string[] — A list of fields for reset (sets the attribute value to `NULL`).
          - `supersedeRecords` boolean — When enabled (set to `true` / `ON`) , the Superseding function moves the Condition Records from `CRCI` to `CRCIH` (the Historical Tables for Conditional Record Items). By default, this feature is turned off (`false`) and can be activated only by turning it on.
    - `data` array[], required — Specify the field values in the same order as specified in the header object.
      - unknown[]
        - unknown

## Response `200`

Returns the number of inserted or updated objects.

- object
  - `response` object
    - `node` string
    - `data` unknown[]
      - unknown
    - `status` number

---

[API](https://skmtc.net/pricefx/apis/the-pricefx-backend-api.md) · [All operations](https://skmtc.net/pricefx/apis/the-pricefx-backend-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/pricefx/the-pricefx-backend-api/versions/0850b5d6be73/schema)
