Pricefx REST API Reference
- Execute a Logic Without a Context in a Service
The Pricefx Backend API
Request
Executes a logic and returns results.
Use the output=rawjson parameter in the URL, for example /formulamanager.executeformula/QuoteLogic?output=rawjson in order to return the result in the simple JSON format as "resultName":result.
- Mock serverhttps://api.pricefx.com/_mock/openapi/reference/pricefx-server_openapi/formulamanager.executeformula/{uniqueName}
- URL:https://companynode.pricefx.com/pricefx/companypartition/formulamanager.executeformula/{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.executeformula/{uniqueName}?output=xls&templateName=string&fileName=string' \
-H 'Content-Type: application/json' \
-d '{
"data": {
"priority": "high",
"quantity": 14,
"map": {
"key": "value"
}
}
}'{ "response": { "node": "string", "data": [ … ], "status": 0 } }
Request
Executes a logic and returns results.
The main difference between this command and the executeformula command is, that in this formulamanager.executeformulaservice command, the logic context is preserved and reused. This allows the formula to build and maintain a cache, as elements like api.global persist between calls.
Each thread operates with its own formula context and api.global instance. The system maintains a fixed number of service threads, with a predefined lifespan for each. Parallel API requests are queued and executed on these threads in sequence. If a request cannot be processed within a short timeframe, it will fail. For this reason, it is crucial that subsequent requests execute efficiently, leveraging caching whenever possible. Be aware that during long cache warm-up periods (e.g., when new threads are initialized), there is a higher risk of request failures.
Use the output=rawjson parameter in the URL, for example /formulamanager.executeformula/QuoteLogic?output=rawjson in order to return the result in the simple JSON format as "resultName":result.
- Mock serverhttps://api.pricefx.com/_mock/openapi/reference/pricefx-server_openapi/formulamanager.executeformulaservice/{uniqueName}
- URL:https://companynode.pricefx.com/pricefx/companypartition/formulamanager.executeformulaservice/{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.executeformulaservice/{uniqueName}' \
-H 'Content-Type: application/json' \
-d '{
"data": {
"priority": "high",
"quantity": 14,
"map": {
"key": "value"
}
}
}'{ "response": { "node": "node", "data": [ … ], "status": 0 } }
- Mock serverhttps://api.pricefx.com/_mock/openapi/reference/pricefx-server_openapi/formulamanager.executeformula/{uniqueName}/readonly
- URL:https://companynode.pricefx.com/pricefx/companypartition/formulamanager.executeformula/{uniqueName}/readonly
- 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.executeformula/{uniqueName}/readonly'{ "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