Skip to main content

Simple Production Order


Simple Production Order Registration​

The PostAddSimpleProductionOrder endpoint is responsible for registering a Simple Production Order in the MIMS system and can be consulted through PRO021.


How to register a Simple Production Order​

HTTP POST Request

Request TypeExample URL
POST{{url_base}}/PostAddSimpleProductionOrder
Examplehttp://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostAddSimpleProductionOrder"

Input Parameters​

ParameterTypeRequiredDescription
BranchNoString(25)YesExternal branch code
SimpleProductionOrderNoString(25)YesExternal simple production order code
SlaughterStructureNoString(25)NoExternal slaughter structure code
StartDateDateYesProduction order start date
FinalDateDateYesProduction order end date
ItemListAddSimpleProductionOrderItemListYesList of production order items

📝 AddSimpleProductionOrderItem Object​

The AddSimpleProductionOrderItem object represents a list of items from a simple production order

Input Parameters​

ParameterTypeRequiredDescription
SimpleProductionOrderItemNoString(25)YesExternal production order item number code
ProductNoString(25)YesExternal product code
QtyIntegerNoQuantity to be produced
WeightFloatNoWeight to be produced
ControlPanelBooleanYesFlag indicating whether the item is controlled by the control panel
AlertOvermeasureProductsBooleanYesFlag indicating whether the item alerts overmeasure products
StartAlertIntegerNoQuantity of products to start the alert
BlockOvermeasureProductsBooleanYesFlag indicating whether it blocks overmeasure production

Return​

ParameterTypeRequiredDescription
WebServiceReturnWebServiceReturnYesStandard WebService response information on method execution
SimpleProductionOrderCodeIntegerYesInternal simple production order code generated in the MIMS system

Request Example​

curl --location 'http://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostAddSimpleProductionOrder"' \
--header 'Content-Type: application/json' \
--data '{
"BranchNo": "BR001",
"SimpleProductionOrderNo": "SPO-20251111-001",
"SlaughterStructureNo": "SLG-015",
"StartDate": "2025-11-11",
"FinalDate": "2025-11-12",
"ItemList": [
{
"SimpleProductionOrderItemNo": "ITEM-001",
"ProductNo": "PROD-001",
"Qty": 150,
"Weight": 1250.5,
"ControlPanel": true,
"AlertOvermeasureProducts": true,
"StartAlert": 140,
"BlockOvermeasureProducts": false
}
]
}'

Response Example​

{
"WebServiceReturn": {
"Status": "wrsSuccess",
"ErrorCode": "",
"Message": "",
"Actor": "",
"ReturnQuestion": null
},
"SimpleProductionOrderCode": 12345
}

🐞 Possible Errors​

CodeMessage
APO‑001It is necessary to inform a quantity!
APO‑002It is necessary to inform only one quantity!
APO‑003The product [value sent in request] informed at index [index code] already exists for production order [production order number], operation not allowed!
APO‑004The final scheduling date must be greater than or equal to the initial date
APO‑005The informed scheduling order item code already exists, operation not allowed!
APO‑006The informed scheduling order code already exists, operation not allowed!


Simple Production Order Item Deletion​

The PostDeleteSimpleProductionOrderItem endpoint is responsible for executing the deletion of a Simple Production Order item in the MIMS system.


How to delete a Simple Production Order item​

HTTP POST Request

Request TypeExample URL
POST{{url_base}}/PostDeleteSimpleProductionOrderItem
Examplehttp://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostDeleteSimpleProductionOrderItem"

Input Parameters​

ParameterTypeRequiredDescription
SimpleProductionOrderItemNoString(25)YesExternal production order item number code
ErrorIfNotFoundBooleanYesReturns error if the informed item does not exist in the database

Return​

ParameterTypeRequiredDescription
WebServiceReturnWebServiceReturnYesStandard WebService response information on method execution

Request Example​

curl --location 'http://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostDeleteSimpleProductionOrderItem"' \
--header 'Content-Type: application/json' \
--data '{
"SimpleProductionOrderItemNo": "SPI001",
"ErrorIfNotFound": false
}'

Response Example​

{
"WebServiceReturn": {
"Status": "wrsSuccess",
"ErrorCode": "",
"Message": "",
"Actor": "",
"ReturnQuestion": null
}
}

🐞 Possible Errors​

CodeMessage
DSP‑001The informed "SimpleProductionOrderItemNo" does not exist!
DSP‑002The informed "SimpleProductionOrderItemNo" is a fixed record, deletion not allowed!
DSP‑003There are batches generated for this scheduling "SimpleProductionOrderItemNo". Deletion not allowed!
DSP‑004Production has already been started for the informed "ProductionOrderItemNo". Deletion not allowed!