# Optimization ## Calculate a Model Object Step - [POST /optimization.modelcalcexec/{typedId}/{stepName}](https://api.pricefx.com/openapi/reference/pricefx-server_openapi/optimization/post-optimization.modelcalcexec-typedid-stepname.md): Executes a calculation of the step as a background task in the context of the Model Object. 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. ## Recalculate a Calculation of a Step - [POST /optimization.modelcalcexec/{typedId}/{stepName}/{calcName}](https://api.pricefx.com/openapi/reference/pricefx-server_openapi/optimization/post-optimization.modelcalcexec-typedid-stepname-calcname.md): Executes a recalculation the calculation of the step as a background task (JST) in the context of the Model Object. 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. ## Recalculate Items of a Parallel Calculation - [POST /optimization.modelcalcexec/{typedId}/{stepName}/{calcName}/item](https://api.pricefx.com/openapi/reference/pricefx-server_openapi/optimization/post-optimization.modelcalcexec-typedid-stepname-calcname/item.md): 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. ## Save a Model - [POST /optimization.modelsave/{typedId}/{stepName}](https://api.pricefx.com/openapi/reference/pricefx-server_openapi/optimization/post-optimization.modelsave-typedid-stepname.md): Saves a Model Object of the step. Returns the updated ModelObject object. ## Submit a Model - [POST /optimization.modelsubmit/{typedId}](https://api.pricefx.com/openapi/reference/pricefx-server_openapi/optimization/post-optimization.modelsubmit-typedid.md): Submits a Model for approval. Returns the submited ModelObject object. >Note: A scheduled Model cannot be submitted. Required permission: MODELOBJECT_UPDATE ## Get a Calculation Status - [POST /optimization.modelcalcstatus/{typedId}](https://api.pricefx.com/openapi/reference/pricefx-server_openapi/optimization/post-optimization.modelcalcstatus-typedid.md): Retrieves the status of all calculations for the given Model. ## Get a Step Calculation Status - [POST /optimization.modelcalcstatus/{typedId}/{stepName}](https://api.pricefx.com/openapi/reference/pricefx-server_openapi/optimization/post-optimization.modelcalcstatus-typedid-stepname.md): Retrieves the status of the specified step calculation for the given Model. ## Cancel a Calculation Step - [POST /optimization.modelcalccancel/{typedId}/{stepName}](https://api.pricefx.com/openapi/reference/pricefx-server_openapi/optimization/post-optimization.modelcalccancel-typedid-stepname.md): Cancels the calculation of the specified step for the given Model. ## List Model Logic Parameters - [POST /optimization.modelformulaparams/{typedId}/{stepName}/{formulaName}](https://api.pricefx.com/openapi/reference/pricefx-server_openapi/optimization/post-optimization.modelformulaparams-typedid-stepname-formulaname.md): Retrieves parameters of the specified logic. ## Execute a Model Logic - [POST /optimization.modelformulaexec/{typedId}/{stepName}/{formulaName}](https://api.pricefx.com/openapi/reference/pricefx-server_openapi/optimization/post-optimization.modelformulaexec-typedid-stepname-formulaname.md): Executes the logic in the context of the model and the step. Returns logic results. ## List Parallel Calculation Items - [POST /optimization.modelfetchpci](https://api.pricefx.com/openapi/reference/pricefx-server_openapi/optimization/post-optimization.modelfetchpci.md): Retrieves all PCI objects (Parallel Calculation Items) for the specified job. A lightweight version of the general fetch/PCI endpoint. Does not return possibly large outputs and messages fields. ## Get a Parallel Calculation Item - [POST /fetch/PCI/{id}](https://api.pricefx.com/openapi/reference/pricefx-server_openapi/optimization/post-fetch-pci-id.md): Retrieves the Parallel Calculation Item (PCI) object specified by id as a path parameter. ## Revoke a Model - [POST /optimization.modelrevoke/{typedId}](https://api.pricefx.com/openapi/reference/pricefx-server_openapi/optimization/post-optimization.modelrevoke-typedid.md): Revokes a model with a workflow so it can be deleted afterward. Only models with the workflow status = APPROVED or NO_APPROVAL_REQUIRED can be revoked. The revoke action will set the workflow status of a model to WITHDRAWN. Once revoked, the model is back in an editable state and can be deleted by users having the right to do so. Required roles: - PO_MCMO_MANAGER (Administrate Model Classes/Objects) - PO_MCMO (Manage Model Objects) - for models in Module Categories (see User Group Entitlements in Module Categories): MODULECATEGORY_MO_MANAGER (Manage Model in Module Category) ## Duplicate a Model - [POST /optimization.modelduplicate/{typedId}](https://api.pricefx.com/openapi/reference/pricefx-server_openapi/optimization/post-optimization.modelduplicate-typedid.md): Creates a copy of the specified model with a new name, including the parameter tables (if copyParamTables=true). ## Import Models - [POST /optimization.modelimport](https://api.pricefx.com/openapi/reference/pricefx-server_openapi/optimization/post-optimization.modelimport.md): Imports a previously exported model from a ZIP file. ## Export Models - [POST /optimization.modelexport](https://api.pricefx.com/openapi/reference/pricefx-server_openapi/optimization/post-optimization.modelexport.md): Export models to a ZIP file. ## Load Data Into FieldCollection - [POST /datamart.loadfc/{typedId}](https://api.pricefx.com/openapi/reference/pricefx-server_openapi/optimization/post-datamart.loadfc-typedid.md): Loads AVRO data into a DMFieldCollection (DMDS or DMT) from a multipart/form-data request. It fails if the specified FieldCollection does not exist. Duplicate key values are forbidden. Type checking and schema validation are enforced.