Inserts multiple records 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.
See the list of bulk-loadable objects.
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 (withoutjoinFields
) 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.
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. Example: P |
The /loaddata/P
endpoint (Insert Bulk Products) is used in our example.
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/<entity>AM
(AttributeMeta) endpoint, for example, use/fetch/RBTAM
to retrieve Rebate Type attribute fields.
{- "data": {
- "header": [
- "sku",
- "label",
- "unitOfMeasure",
- "currency"
], - "options": {
- "detectJoinFields": false,
- "joinFields": [
- "sku"
], - "maxJoinFieldsLengths": [
- {
- "joinField": "string",
- "maxLength": 6
}
]
}, - "data": [
- [
- 11111,
- "Label One",
- "EA",
- "USD"
], - [
- 22222,
- "Label Two",
- "EA",
- "EUR"
], - [
- 33333,
- "Label Three",
- "EA",
- "CZK"
]
]
}
}
{- "response": {
- "node": "<the server>",
- "data": [
- 3
], - "status": 0
}
}