POST | /WorkOrder/WorkOrderClose | Closes a work order. | Uses
your API Key and closes the WorkOrder specified by the WorkOrderId, only if the WorkOrder is fully received. If the WorkOrder specified has slack
quantity, by setting ReturnSlackQuantity field to true, when WorkOrder closes, the exceed quantity of the product will be returned.
Optionally, you can use mvInsertUpdateDeleteSourceApplication
when an external application ( eg WooCommerce ) is the one that triggers the WorkOrderClose call.
A. Close a fully received Work Order with Id 15863 that has slack quantity on the finished good without returning the
exceed quantity of it and add some comments to describe it.
Value: {
"WorkOrderId": 15863,
"Comments": "Work Order closed.",
"ReturnSlackQuantity": false
}
Response:
{
"mvWorkOrder": {
"WorkOrderId": 15863,
"WorkOrderTypeId": -8,
"WorkOrderFinishedGoodTypeId": -9,
"WorkOrderTypeAbbreviation": "WO",
"WorkOrderTypeDescription": "Work order",
"WorkOrderNo": "54",
"WorkOrderFinishedGoodSKU": "Finished Good 1",
"WorkOrderStartDate": "/Date(1685394000000-0000)/",
"WorkOrderDueDate": "/Date(-62135596800000-0000)/",
"WorkOrderPriority": "Medium",
"WorkOrderCurrencyCode": "EUR",
"WorkOrderInventoryLocationID": 4442,
"WorkOrderComments": "",
"WorkOrderTags": "",
"WorkOrderReferenceNo": "",
"WorkOrderReferenceApplication": "",
"TopLevelWorkOrderId": 0,
"WorkOrderOrderedQuantity": 20,
"WorkOrderReceivedQuantity": 24,
"WorkOrderTotalMaterialCost": 99.572588679,
"WorkOrderTotalLabourCost": 0,
"WorkOrderTotalOverheadCost": 0,
"WorkOrderFinishedGoodUnitCost": 4.148857862,
"WorkOrderDetails": [
{
"WorkOrderBOMRowProductSKU": "Material 1",
"WorkOrderBOMRowProductDescription": "This material is used to construct the finished good",
"WorkOrderBOMRowProductVariant": "",
"WorkOrderBOMRowOrderedQuantity": 40,
"WorkOrderBOMRowTotalAllocatedQuantity": 0,
"WorkOrderBOMRowProductQuantityUnit": "Kg",
"WorkOrderBOMRowRemarks": "",
"WorkOrderRowAllocatedDetails": [
{
"WorkOrderBOMRowAllocatedQuantity": 40,
"WorkOrderBOMRowAllocatedDateTime": "/Date(1685436151380-0000)/",
"WorkOrderBOMRowAllocatedDateTimeFormatted": ""
}
]
},
{
"WorkOrderBOMRowProductSKU": "Material 2",
"WorkOrderBOMRowProductDescription": "This material is used to construct the finished good",
"WorkOrderBOMRowProductVariant": "",
"WorkOrderBOMRowOrderedQuantity": 60,
"WorkOrderBOMRowTotalAllocatedQuantity": 0,
"WorkOrderBOMRowProductQuantityUnit": "",
"WorkOrderBOMRowRemarks": "",
"WorkOrderRowAllocatedDetails": [
{
"WorkOrderBOMRowAllocatedQuantity": 4,
"WorkOrderBOMRowAllocatedDateTime": "/Date(1685436306213-0000)/",
"WorkOrderBOMRowAllocatedDateTimeFormatted": ""
},
{
"WorkOrderBOMRowAllocatedQuantity": 4,
"WorkOrderBOMRowAllocatedDateTime": "/Date(1685438198027-0000)/",
"WorkOrderBOMRowAllocatedDateTimeFormatted": ""
},
{
"WorkOrderBOMRowAllocatedQuantity": 52,
"WorkOrderBOMRowAllocatedDateTime": "/Date(1685438371487-0000)/",
"WorkOrderBOMRowAllocatedDateTimeFormatted": ""
}
]
}
],
"WorkOrderStatus": "Closed",
"WorkOrderCreationDate": "/Date(1685434175397-0000)/",
"WorkOrderLastUpdatedDate": "/Date(1685455866974+0300)/"
},
"ResponseStatus": {
"ErrorCode": "0"
},
"entityID": 15863
}
|
---|