Pricefx REST API Reference
- Test a Logic
The Pricefx Backend API
- Mock serverhttps://api.pricefx.com/_mock/openapi/reference/pricefx-server_openapi/formulamanager.librarymethods
- URL:https://companynode.pricefx.com/pricefx/companypartition/formulamanager.librarymethods
- 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.librarymethods{ "response": { "node": "string", "csrfToken": "string", "data": [ … ], "status": 0 } }
Request
Executes a draft logic for a given approvable and calculates the result. This command is used to test a logic during editing (the "Test Logic" button in IntelliJ Pricefx Studio).
The backend will compile and execute the test logic (specified in the testFormula property) without persisting it in the database.
The Formula object. The type code is F.
- Mock serverhttps://api.pricefx.com/_mock/openapi/reference/pricefx-server_openapi/formulamanager.testexec
- URL:https://companynode.pricefx.com/pricefx/companypartition/formulamanager.testexec
- 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.testexec \
-H 'Content-Type: application/json' \
-d '{
"data": {
"targetDate": "2021-12-10",
"testFormula": {
"elements": [
{
"allowOverride": false,
"combinationType": "FUNCTION",
"displayOptions": 16,
"elementGroups": [],
"elementName": "NewElement",
"elementTimeout": 0,
"hideOnNull": false,
"hideWarnings": false,
"protectedExpression": false,
"summarize": false,
"formulaExpression": "api.inputBuilderFactory()\n .createStringUserEntry(\"MyStringParameter\")\n .getInput()"
}
],
"status": "ACTIVE",
"uniqueName": "MichalS",
"validAfter": "2020-01-01",
"__PROC": {
"sourceId": "CalculationLogic/MichalS+2020-01-01",
"typeCode": "F",
"fsId": "CalculationLogic/MichalS+2020-01-01",
"type": "CalculationLogic"
}
}
}
}'{ "response": { "node": "pricefx-cluster-app-frontend-65c978b8dd-6wgk5", "data": [ … ], "status": 0 } }
Request
Executes a specific function from a formula library element without requiring a full formula logic implementation.
Parameters are provided via the request payload and the calculated result is returned.
Note:
- This endpoint does not work with
inputsbindings. Provide ordered function arguments instead.- Used by the Pricefx MCP server to enable Groovy-configured MCP Tools.
- Requires the
PRICINGFORMULA_EXECUTEpermission.
- Mock serverhttps://api.pricefx.com/_mock/openapi/reference/pricefx-server_openapi/formulamanager.executelibraryfunction/{formulaName}/{elementName}/{functionName}
- URL:https://companynode.pricefx.com/pricefx/companypartition/formulamanager.executelibraryfunction/{formulaName}/{elementName}/{functionName}
- 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.executelibraryfunction/{formulaName}/{elementName}/{functionName}' \
-H 'Content-Type: application/json' \
-d '{
"data": {
"allowObjectMods": true,
"functionArgs": [
null
]
}
}'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