Megaventory API v2017a

<back to all web services

WorkOrderDelete

The following routes are available for this service:
POST/WorkOrder/WorkOrderDeleteDeletes a work order.Uses your API Key and deletes the WorkOrder specified by the WorkOrderId and deletes the specified Work Order only if its status is Pending. Optionally, you can use mvInsertUpdateDeleteSourceApplication when an external application ( eg WooCommerce ) is the one that triggers the WorkOrderCancel call.

Examples:



A.

Delete Work Order with Id 15863.

Value:

 {
  "WorkOrderId": 15863
}  


Response:

{
  "ResponseStatus": {
    "ErrorCode": "0"
  },
  "entityID": 15863
}
 

To override the Content-type in your clients HTTP Accept Header, append the .json suffix or ?format=json

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /json/reply/WorkOrderDelete HTTP/1.1 
Host: api.megaventory.com 
Content-Type: application/json
Content-Length: length

{"APIKEY":"String","WorkOrderId":0,"mvInsertUpdateDeleteSourceApplication":"String"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"mvWorkOrder":{"WorkOrderId":0,"WorkOrderTypeId":0,"WorkOrderFinishedGoodTypeId":0,"WorkOrderTypeAbbreviation":"String","WorkOrderTypeDescription":"String","WorkOrderNo":"String","WorkOrderFinishedGoodSKU":"String","WorkOrderStartDate":"\/Date(-62135596800000-0000)\/","WorkOrderDueDate":"\/Date(-62135596800000-0000)\/","WorkOrderPriority":"Medium","WorkOrderCurrencyCode":"String","WorkOrderInventoryLocationID":0,"WorkOrderComments":"String","WorkOrderTags":"String","WorkOrderReferenceNo":"String","WorkOrderReferenceApplication":"String","TopLevelWorkOrderId":0,"WorkOrderOrderedQuantity":0,"WorkOrderReceivedQuantity":0,"WorkOrderTotalMaterialCost":0,"WorkOrderTotalLabourCost":0,"WorkOrderTotalOverheadCost":0,"WorkOrderFinishedGoodUnitCost":0,"WorkOrderDetails":[{"WorkOrderBOMRowProductSKU":"String","WorkOrderBOMRowProductDescription":"String","WorkOrderBOMRowProductVariant":"String","WorkOrderBOMRowOrderedQuantity":0,"WorkOrderBOMRowTotalAllocatedQuantity":0,"WorkOrderBOMRowProductQuantityUnit":"String","WorkOrderBOMRowRemarks":"String","WorkOrderRowAllocatedDetails":[{"WorkOrderBOMRowAllocatedQuantity":0,"WorkOrderBOMRowAllocatedDateTime":"\/Date(-62135596800000-0000)\/","WorkOrderBOMRowAllocatedDateTimeFormatted":"String","WorkOrderBOMRowAllocatedSerialNumbers":["String"],"WorkOrderBOMRowAllocatedBatchNumbers":[{"BatchNumberName":"String","ExpiryDate":"\/Date(-62135596800000-0000)\/","AssignedQTYInDetail":0}]}]}],"WorkOrderStatus":"Pending","WorkOrderCreationDate":"\/Date(-62135596800000-0000)\/","WorkOrderLastUpdatedDate":"\/Date(-62135596800000-0000)\/"},"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String"}]},"entityID":0,"InternalErrorCode":"String"}