Pricefx REST API Reference
- Save a Model
The Pricefx Backend API
Request
Executes a recalculation of the item as a background task (JST) with the id of the last calculation JST (copies calculation results from the previous JST).
Use a filter in your request to specify items with CREATED or FAILED status. Cannot be used on items with the CALCULATED status.
Fails if called for anything else than a Parallel Calculation.
Returns two elements within the data array – the JST (Job Status Tracker) object (the calculation status of the newly created calculation) and the updated ModelObject object.
The typedId of the Model Object you want to recalculate the step for.
Enter the name of the step you want to calculate.
- Mock serverhttps://api.pricefx.com/_mock/openapi/reference/pricefx-server_openapi/optimization.modelcalcexec/{typedId}/{stepName}/{calcName}/item
- URL:https://companynode.pricefx.com/pricefx/companypartition/optimization.modelcalcexec/{typedId}/{stepName}/{calcName}/item
- 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/optimization.modelcalcexec/123.MO/definition/{calcName}/item' \
-H 'Content-Type: application/json' \
-d '{
"data": {
"criteria": [
{
"_constructor": "AdvancedCriteria",
"operator": "and",
"criteria": [
{
"fieldName": "status",
"operator": "iEquals",
"value": [
"FAILED"
]
}
]
}
]
}
}'{ "response": { "node": "pricefx-cluster-app-frontend-6689766d7c-6bzmz", "data": [ … ], "status": 0 } }
The data property can only contain the state field, all the rest fields will be ignored (and cannot be updated even with update/MO endpoint).
- Mock serverhttps://api.pricefx.com/_mock/openapi/reference/pricefx-server_openapi/optimization.modelsave/{typedId}/{stepName}
- URL:https://companynode.pricefx.com/pricefx/companypartition/optimization.modelsave/{typedId}/{stepName}
- 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/optimization.modelsave/123.MO/definition \
-H 'Content-Type: application/json' \
-d '{
"oldValues": {
"version": 11
},
"data": {
"state": {
"configuration": {
"advanced": {
"Advanced": {
"MaxSteps": 500,
"MaxDurationMinutes": 0,
"AutoStop": true,
"Profiling": false
}
},
"boundaries": {
"Boundaries": {
"SpecificAdjustmentMinPercent": -10,
"SpecificAdjustmentMaxPercent": 10,
"OnInvoiceDiscountMinPercent": 0,
"OnInvoiceDiscountMaxPercent": 30,
"OffInvoiceDiscountMinPercent": 0,
"OffInvoiceDiscountMaxPercent": 30,
"InvoicePriceMaxDecreasePercent": 16,
"InvoicePriceMaxIncreasePercent": 15
}
},
"objectives": {
"Objectives": {
"RevenueMarginMixCoeff": 1,
"CustomerGroupRevenueTarget": [],
"ProductGroupVolumeTarget": []
}
}
}
}
}
}'{ "response": { "node": "node", "data": [ … ], "status": 0 } }
- Mock serverhttps://api.pricefx.com/_mock/openapi/reference/pricefx-server_openapi/optimization.modelsubmit/{typedId}
- URL:https://companynode.pricefx.com/pricefx/companypartition/optimization.modelsubmit/{typedId}
- 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/optimization.modelsubmit/123.MO \
-H 'Content-Type: application/json' \
-d '{}'{ "response": { "node": "pricefx-cluster-app-frontend-7d7d8875d-7jn6c", "data": [ … ], "status": 0 } }
CommentsCopy for LLM Copy page as Markdown for LLMs View as Markdown Open this page as Markdown Open in ChatGPT Get insights from ChatGPT Open in Claude Get insights from Claude Connect to Cursor Install MCP server on Cursor Connect to VS Code Install MCP server on VS Code