Pricefx REST API Reference
- Delete an Object
The Pricefx Backend API
Request
Updates an existing object.
Specify fields you want to update in the data property. Only one record can be updated per request (unless batched).
The object's type code. See the list of Type Codes.
Please note: The update request should contain all old values in the
oldValuesproperty (especially thetypedIdand theversion) and all values (along thetypedId) you want to update in thedataproperty.Apart from the version checks, additional integrity checks are performed. E.g. if fields that are part of the business key are changed then it is checked that no other object already is defined with those key(s).
Enter new field values. Multiple values can be updated. In our example the unitOfMeasure and label properties were updated.
Values of the object before the update. Especially important are typedId (to identify the object to update) and version (to detect date inconsistencies).
- Mock serverhttps://api.pricefx.com/_mock/openapi/reference/pricefx-server_openapi/update/{TypeCode}
- URL:https://companynode.pricefx.com/pricefx/companypartition/update/{TypeCode}
- 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/update/{TypeCode}' \
-H 'Content-Type: application/json' \
-d '{
"data": {
"unitOfMeasure": "EA",
"typedId": "2147501222.P"
},
"oldValues": {
"version": 5,
"typedId": "2147501222.P",
"sku": "33333",
"label": "Label Three",
"unitOfMeasure": "EA",
"userGroupEdit": "admin",
"userGroupViewDetails": null,
"currency": "CZK",
"formulaName": "PriceList",
"image": null,
"createDate": "2021-09-16T09:43:59",
"createdBy": 2147490696,
"lastUpdateDate": "2021-11-04T18:33:16",
"lastUpdateBy": 2147490696,
"attribute1": "56",
"attribute2": "3rd",
"attribute3": 4,
"attribute4": null,
"attribute5": null,
"attribute6": null,
"attribute7": null,
"attribute8": null,
"attribute9": null,
"attribute10": null,
"attribute11": null,
"attribute12": null,
"attribute13": null,
"attribute14": null,
"attribute15": null,
"attribute16": null,
"attribute17": null,
"attribute18": null,
"attribute19": null,
"attribute20": null,
"attribute21": null,
"attribute22": null,
"attribute23": null,
"attribute24": null,
"attribute25": null,
"attribute26": null,
"attribute27": null,
"attribute28": null,
"attribute29": null,
"attribute30": null
},
"operationType": "update",
"textMatchStyle": "exact"
}'Request
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.
Enter the type code of the entity you want to delete the object from. See the list of Type Codes in the Pricefx Knowledge Base article.
- Mock serverhttps://api.pricefx.com/_mock/openapi/reference/pricefx-server_openapi/delete/{TypeCode}
- URL:https://companynode.pricefx.com/pricefx/companypartition/delete/{TypeCode}
- 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/P \
-H 'Content-Type: application/json' \
-d '{
"data": {
"typedId": "2147501187.P"
}
}'{ "response": { "node": "string", "data": [ … ], "status": 0 } }
Request
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.
The object's type code. See the list of Type Codes.
Can be either one of these valid operators: + - * If omitted, the provided value is set (= operator). Otherwise the specified operation is applied.
- Mock serverhttps://api.pricefx.com/_mock/openapi/reference/pricefx-server_openapi/massedit/{TypeCode}
- URL:https://companynode.pricefx.com/pricefx/companypartition/massedit/{TypeCode}
- 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/massedit/{TypeCode}' \
-H 'Content-Type: application/json' \
-d '{
"data": {
"filterCriteria": {
"_constructor": "AdvancedCriteria",
"operator": "and",
"criteria": [
{
"fieldName": "id",
"operator": "inSet",
"value": [
"2147501189",
"2147501188"
],
"_constructor": "AdvancedCriteria"
}
]
},
"massEditRecords": [
{
"fieldName": "currency",
"massEditOperator": "=",
"fieldValue": "USD",
"precision": null
}
]
}
}'{ "response": { "node": "string", "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