Pricefx REST API Reference
Pricefx REST API
/Pricefx API Reference/- Set a Default Pricing Logic
Get a Logic
Get a Default Pricing Logic Name
Update a Logic
Update a Logic (Partial)
Update a Logic (No syntax check)
List Elements
Execute an Assigned Logic
Execute a Logic
Delete a Logic
List Logics
Generate Parameters
Syntax Check
List Logic Parameters (Input Fields)
List Libraries
Execute a Logic (Without a Context)
Execute a Logic Without a Context in a Service
Execute a Logic (Read-Only)
Execute a Logic Without a Context in a Service (Read-Only)
Copy a Logic
List Functions
Test a Logic
Execute Library Function
Set a Default Pricing Log...
The Pricefx Backend API
Download OpenAPI description
Overview
URL
Pricefx
Languages
Servers
Mock server
https://api.pricefx.com/_mock/openapi/reference/pricefx-server_openapi
URL:
https://{baseUrl}/pricefx/{partition}
- Mock serverhttps://api.pricefx.com/_mock/openapi/reference/pricefx-server_openapi/formulamanager.getdefault
- URL:https://companynode.pricefx.com/pricefx/companypartition/formulamanager.getdefault
- 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/formulamanager.getdefaultResponse
application/json
{ "response": { "node": "string", "data": [ … ], "status": 0 } }
- Mock serverhttps://api.pricefx.com/_mock/openapi/reference/pricefx-server_openapi/formulamanager.setdefault/{uniqueName}
- URL:https://companynode.pricefx.com/pricefx/companypartition/formulamanager.setdefault/{uniqueName}
- 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/formulamanager.setdefault/{uniqueName}'Response
application/json
{ "response": { "node": "string", "data": [ … ], "status": 0 } }
Request
Updates the given logic.
Information: If changes in the code (in the particular Groovy code) of some elements are made, it is highly recommended to use the update endpoint with compileOnly (/formulamanager.update/{logicId}/compileOnly) for optimal performance.
Security
basic or X-PriceFx-jwt
- Mock serverhttps://api.pricefx.com/_mock/openapi/reference/pricefx-server_openapi/formulamanager.update/{id}
- URL:https://companynode.pricefx.com/pricefx/companypartition/formulamanager.update/{id}
- 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/formulamanager.update/2147484837 \
-H 'Content-Type: application/json' \
-d '{
"data": {
"version": 6,
"typedId": "2147484837.F",
"uniqueName": "PriceList",
"label": "Price List",
"validAfter": "2021-07-12",
"status": "ACTIVE",
"simulationSet": null,
"userGroupEdit": null,
"userGroupViewDetails": null,
"formulaNature": null,
"lastUpdateByName": "admin",
"elements": [
{
"version": 9,
"typedId": "2147494038.FE",
"elementName": "BasePrice",
"elementLabel": "Base Price",
"elementDescription": null,
"elementGroups": [],
"conditionElementName": null,
"hideWarnings": false,
"excludeFromExport": false,
"protectedExpression": false,
"elementTimeout": 0,
"displayOptions": 21,
"formatType": "MONEY_EUR",
"elementSuffix": null,
"allowOverride": false,
"summarize": false,
"hideOnNull": false,
"userGroup": null,
"cssProperties": null,
"resultGroup": null,
"combinationType": "FUNCTION",
"criticalAlert": null,
"redAlert": null,
"yellowAlert": null,
"labelTranslations": null,
"createDate": "2021-11-04T14:56:11",
"createdBy": 2147490696,
"lastUpdateDate": "2021-11-04T18:16:42",
"lastUpdateBy": 2147490696,
"formulaExpression": "def avgCost = api.productExtension(\"pcost\")?.find()?.attribute1\nif(avgCost == null){\n api.addWarning(\"Could not find Average Cost in PX table ProductCost\")\n}\nreturn avgCost"
},
{
"version": 9,
"typedId": "2147494043.FE",
"elementName": "ListPrice",
"elementLabel": "List Price",
"elementDescription": null,
"elementGroups": [],
"conditionElementName": null,
"hideWarnings": false,
"excludeFromExport": false,
"protectedExpression": false,
"elementTimeout": 0,
"displayOptions": 5,
"formatType": null,
"elementSuffix": null,
"allowOverride": false,
"summarize": false,
"hideOnNull": false,
"userGroup": null,
"cssProperties": null,
"resultGroup": null,
"combinationType": "FUNCTION",
"criticalAlert": null,
"redAlert": null,
"yellowAlert": null,
"labelTranslations": null,
"createDate": "2021-11-04T14:56:11",
"createdBy": 2147490696,
"lastUpdateDate": "2021-11-04T18:16:42",
"lastUpdateBy": 2147490696,
"formulaExpression": "def listPrice = out.BasePrice\n\n\nreturn listPrice"
}
],
"inputDescriptors": [],
"formulaType": "PRICING",
"createdByName": null,
"createDate": "2021-11-04T14:56:11",
"createdBy": 2147490696,
"lastUpdateDate": "2021-11-04T18:16:42",
"lastUpdateBy": 2147490696
}
}'Response
application/json
{ "response": { "node": "node", "data": [ … ], "status": 0 } }
See the Key-Value Database Storage Knowledge Base article for more details.
Operations
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