Pricefx REST API Reference
The Pricefx Backend API
Request
Inserts multiple product extensions to the Master Data table.
The name (a name of the category) and sku must be provided for each record in the header and data object within the request body. 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
joinFieldsare 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.
Specify product extension field names in the header object and field values in the data object.
- Mock serverhttps://api.pricefx.com/_mock/openapi/reference/pricefx-server_openapi/loaddata/PX
- URL:https://companynode.pricefx.com/pricefx/companypartition/loaddata/PX
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
-u <username>:<password> \
https://api.pricefx.com/_mock/openapi/reference/pricefx-server_openapi/loaddata/PX \
-H 'Content-Type: application/json' \
-d '{
"data": {
"data": [
[
"p0006028005",
"Products"
],
[
"p0006047451",
"Products"
],
[
"p0006056838",
"Products"
],
[
"p0000412926",
"Products"
],
[
"p0000014471",
"Products"
],
[
"p0000412891",
"Products"
]
],
"header": [
"sku",
"name"
],
"options": {
"detectJoinFields": false,
"joinFields": [
"sku",
"name"
]
}
}
}'Request
Creates or updates a product extension.
To add a new product extension that does not exist, specify the sku and name (category) parameter in the request.
To update an existing product extension, specify the name and sku or typedId parameters of the existing product extension. The /integrate method performs a partial update – it does not delete values from fields that have not been specified in the update request.
Use the /integrate/{TypeCode}/returnolddata endpoint to return also the data of the previous version in the response.
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 work with more customers in bulk please use the /loaddata/P 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 within request. To do so, add multiple data objects into your JSON.
- Mock serverhttps://api.pricefx.com/_mock/openapi/reference/pricefx-server_openapi/integrate/PX
- URL:https://companynode.pricefx.com/pricefx/companypartition/integrate/PX
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
-u <username>:<password> \
https://api.pricefx.com/_mock/openapi/reference/pricefx-server_openapi/integrate/PX \
-H 'Content-Type: application/json' \
-d '{
"data": {
"sku": "111111",
"name": "ProductX",
"attribute1": "prdct",
"attribute2": "USD"
}
}'- listProductsResponseExample_resultFields
- listProductsResponseExample_valueFields
- listProductsResponseExample
{ "response": { "node": "node", "startRow": 0, "data": [ … ], "endRow": 8, "totalRows": 8, "status": 0 } }
Request
Deletes a product extension.
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.
- Mock serverhttps://api.pricefx.com/_mock/openapi/reference/pricefx-server_openapi/delete/PX
- URL:https://companynode.pricefx.com/pricefx/companypartition/delete/PX
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
-u <username>:<password> \
https://api.pricefx.com/_mock/openapi/reference/pricefx-server_openapi/delete/PX \
-H 'Content-Type: application/json' \
-d '{
"data": {
"typedId": "9051.PX6"
}
}'{ "response": { "node": "<node>", "data": [ … ], "status": 0 } }
See the Key-Value Database Storage Knowledge Base article for more details.
Here you can find all fields of the corresponding entity (represented by the type code).
Use the /metadata.describe endpoint to find out the correct data type of the field that is used in your partition.
Comments