# General ## Insert Bulk Data - [POST /loaddata/{TypeCode}](https://api.pricefx.com/openapi/reference/pricefx-server_openapi/general/post-loaddata-typecode.md): 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 (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. ## Insert Bulk Data From a File - [POST /loaddata.file/{TypeCode}](https://api.pricefx.com/openapi/reference/pricefx-server_openapi/general/post-loaddata.file-typecode.md): 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. ## Insert Bulk Data From a File (async) - [POST /loaddata.file/{TypeCode}/async](https://api.pricefx.com/openapi/reference/pricefx-server_openapi/general/post-loaddata.file-typecode-async.md): Creates a JST job (the LOADDATA_FILE type) for inserting multiple records to the Master Data table from a CSV file. You can get the status of the job by calling the admin.fetchjst/{jstId} endpoint. The jstId can be found in the response of the /loaddata.file/{TypeCode}/async endpoint. Allows parallel loaddata calls. You can also view the job in Administration > Logs > Jobs & Tasks. 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. ## Upsert an Object - [POST /integrate/{TypeCode}](https://api.pricefx.com/openapi/reference/pricefx-server_openapi/general/post-integrate-typecode.md): Upserts an object (the object type must be specified by Type Code in the path). To add a new object that does not exist, specify the sku parameter in the request. To update an existing object, specify the sku or typedId parameter of the existing object. The /integrate method performs a partial update – it does not delete field values that have not been specified in the update request. >Please note >This method is intended to be used with one or two objects and it allows you to update particular fields. The request will overwrite the existing data of the record being updated, regardless of other changes. >To insert more objects in bulk, please use the /loaddata/{TypeCode} endpoint. This operation is particularly useful if the caller does not (and should not) know about typed IDs and other internal data fields, i.e. typically in an integration scenario. The only mandatory pre-requisite for this operation is that the object's defined business key fields (vary per object type) are present in every request. No typed ID or version fields are required. This also means that no version checking is performed, thus the request will overwrite existing data of that record, regardless of other changes. >Information >You can upsert multiple records using one request. To do so, add multiple data objects into your JSON. See the example below. json [ { "data": { "sku": "111111", "typedId": "2147501227.P", "label": "The New Label", "unitOfMeasure": "EA", "currency": "USD", "formulaName": "priceLogic2", "attribute1": "1", "attribute2": "2", "userGroupEdit": "Administrators", "userGroupViewDetails": "PricingManagers" } }, { "data": { "sku": "222222", "label": "The New Label 2", "unitOfMeasure": "EA", "currency": "EUR", "formulaName": "priceLogic2", "attribute1": "1", "attribute2": "2", "userGroupEdit": "Administrators", "userGroupViewDetails": "PricingManagers" } } ] ## Upsert an Object (and return old data) - [POST /integrate/{TypeCode}/returnolddata](https://api.pricefx.com/openapi/reference/pricefx-server_openapi/general/post-integrate-typecode-olddata.md): Upserts an object (the object type must be specified by Type Code in the path) and returns record details of the previous version. It allows you to check changes in the record. To add a new object that does not exist, specify the sku parameter in the request. To update an existing object, specify the sku or typedId parameter of the existing object. The /integrate method performs a partial update – it does not delete values from fields that have not been specified in the update request. --- >Please note: >This method is intended to be used with one or two objects and it allows you to update particular fields. The request will overwrite the existing data of the record being updated, regardless of other changes. >To insert more objects in bulk please use the /loaddata/{TypeCode} endpoint. --- This operation is particularly useful if the caller does not (and should not) know about typed IDs and other internal data fields, i.e. typically in an integration scenario. The only mandatory pre-requisite for this operation is that the object's defined business key fields (vary per object type) are present in every request. No typed ID or version fields are required. This also means that no version checking is performed, thus the request will overwrite existing data of that record, regardless of other changes. >Information: >You can upsert multiple records using one request. To do so, add multiple data objects into your JSON. See the example below. json [ { "data": { "sku": "111111", "typedId": "2147501227.P", "label": "The New Label", "unitOfMeasure": "EA", "currency": "USD", "formulaName": "priceLogic2", "attribute1": "1", "attribute2": "2", "userGroupEdit": "Administrators", "userGroupViewDetails": "PricingManagers" } }, { "data": { "sku": "222222", "label": "The New Label 2", "unitOfMeasure": "EA", "currency": "EUR", "formulaName": "priceLogic2", "attribute1": "1", "attribute2": "2", "userGroupEdit": "Administrators", "userGroupViewDetails": "PricingManagers" } } ] --- ## Update an Object (and return old data) - [POST /update/{TypeCode}/returnolddata](https://api.pricefx.com/openapi/reference/pricefx-server_openapi/general/post-update-typecode-returnolddata.md): Updates an existing object and returns details of the previous version. Updates specified fields (in the data property) of the record. Only one record can be updated per request (unless batched). ## Update an Object - [POST /update/{TypeCode}](https://api.pricefx.com/openapi/reference/pricefx-server_openapi/general/post-update-typecode.md): Updates an existing object. Specify fields you want to update in the data property. Only one record can be updated per request (unless batched). ## Delete an Object - [POST /delete/{TypeCode}](https://api.pricefx.com/openapi/reference/pricefx-server_openapi/general/post-delete-typecode.md): Deletes an object. Only one object can be deleted per request (unless batched). Some object types may be blocked from being deleted by the update command as special processing is done by a dedicated manager command. Note: Some object types are only soft-deleted, some are hard-deleted in the database. This behavior cannot be influenced by the client. ## Mass Update - [POST /massedit/{TypeCode}](https://api.pricefx.com/openapi/reference/pricefx-server_openapi/general/post-massedit-typecode.md): Performs a mass update operation on the specified object. This operation is not available for all types of objects – "massEditable" = "true" must be set on the object to allow the mass edit operation. Set the filter criteria to restrict the scope of the mass edit operation. ## Delete Column Values - [POST /resetcolumn/{TypeCode}/{columnName}](https://api.pricefx.com/openapi/reference/pricefx-server_openapi/general/post-resetcolumn-typecode-columnname.md): Removes values from the specified column. ## Delete Objects - [POST /delete/{TypeCode}/batch/forcefilter](https://api.pricefx.com/openapi/reference/pricefx-server_openapi/general/post-delete-typecode-batch.md): Deletes multiple objects based on filter settings. >Please Note: >Invalid filter clauses are ignored. This could potentially lead to a full table truncate (the whole type without filter is deleted)! Use the forcefilter variant to enforce a filter in all cases! ## Create an Object - [POST /add/{TypeCode}](https://api.pricefx.com/openapi/reference/pricefx-server_openapi/general/post-add-typecode.md): Creates an object. Only one object can be added per request (unless batched). >Information: Some object types may be blocked from being added by the update command as special processing is done by a dedicated manager command. ## Get an Object - [POST /fetch/{TypeCode}/{id}](https://api.pricefx.com/openapi/reference/pricefx-server_openapi/general/post-fetch-typecode-id.md): Retrieves details of the specified object. >Note: Certain data elements (e.g. lookup table values of any table, including JSON lookup tables / pricing params) should NOT be retrieved with the general fetch commands (/fetch/{TypeCode}). Always use the "...manager.fetch" API endpoints where they are available. The same applies to update/delete/integrate commands. >Information: The following entities can intentionally be fetched by any user without any particular user role: CN, BR, CS, CLLIAM, CTAM, CTT, CTTAM, C, CAM, CXAM, DMDC, DMF, DMDL, DMDS, DM, DMM, DMR, DMT, DCRAM, FN, IE, JST, JLTVM, MPLIT, MPLAM, MLTVM, MRAM, MT, PYRAM, PGIM, PRAM, PLIM, P, PAM, PXAM, QAM, RBAAM, RRAM, RRS, RRSC, RBT, RBTAM, SC, SCN, SCNAM, SIM, SIAM, UG. ## List Objects - [POST /fetch/{TypeCode}](https://api.pricefx.com/openapi/reference/pricefx-server_openapi/general/post-fetch-typecode.md): Retrieves all objects (including details) of the specified type. A filter can be applied. >Information: Certain data elements (e.g. lookup table values of any table, including JSON lookup tables / pricing params) should NOT be retrieved with the general fetch commands (/fetch/{TypeCode}). Always use the "...manager.fetch" API endpoints where they are available. The same applies to update/delete/integrate commands. >Information: The following entities can intentionally be fetched by any user without any particular user role: CN, BR, CS, CLLIAM, CTAM, CTT, CTTAM, C, CAM, CXAM, DMDC, DMF, DMDL, DMDS, DM, DMM, DMR, DMT, DCRAM, FN, IE, JST, JLTVM, MPLIT, MPLAM, MLTVM, MRAM, MT, PYRAM, PGIM, PRAM, PLIM, P, PAM, PXAM, QAM, RBAAM, RRAM, RRS, RRSC, RBT, RBTAM, SC, SCN, SCNAM, SIM, SIAM, UG. You can choose fields to be returned in the response by employing the resultFields or valueFields filter: resultFields: returns key-value pairs as objects. This is the more friendly response compared to valueFields but the server fetches all fields from the database in the backend which might result in a slower performance. See the List Product's listProductsResponseExample_resultFields response example. valueFields: returns just an array of values. Use this option if a better performance is required. See the List Product's listProductsResponseExample_valueFields response example. ## List Type Codes - [POST /fetch](https://api.pricefx.com/openapi/reference/pricefx-server_openapi/general/post-fetch.md): Returns the list of all Type Codes.