Pricefx REST API Reference
The Pricefx Backend API
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 } }
Request
Retrieves records from the Product Extensions table.
Export the table to the Excel file (XLSX), CSV, or JSON using the output URL query parameter. When exporting to the file, specify fields (within the resultFields property) you want to include in the output table.
Example request body for the export action:
{
"data":{
"criteria":[
],
"operator":"and"
},
"resultFields":[
"sku",
"lastUpdateDate",
"attribute1"
],
"valueFields":[
]
}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 Products' listProductsResponseExample_resultFields response example.
valueFields: returns just an array of values. Use this option if a better performance is required. See the List Products' listProductsResponseExample_valueFields response example.
- Mock serverhttps://api.pricefx.com/_mock/openapi/reference/pricefx-server_openapi/productmanager.fetch/*/PX/{ProductMasterExtensionName}
- URL:https://companynode.pricefx.com/pricefx/companypartition/productmanager.fetch/*/PX/{ProductMasterExtensionName}
- 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/productmanager.fetch/*/PX/{ProductMasterExtensionName}?output=xls&useColumnNames=false' \
-H 'Content-Type: application/json' \
-d '{
"endRow": 0,
"oldValues": null,
"operationType": "string",
"startRow": 0,
"textMatchStyle": "string",
"data": {
"_constructor": "string",
"operator": "string",
"criteria": [
{
"fieldName": "string",
"operator": "string",
"value": "string"
}
]
},
"sortBy": [
{}
]
}'{ "response": { "node": "e2e-staging-node", "data": [ … ], "endRow": 1, "totalRows": 1, "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