Megaventory API v2017a

<back to all web services

WorkOrderDeleteFinishedGoodReceipt

The following routes are available for this service:
POST/WorkOrder/WorkOrderDeleteFinishedGoodReceiptDeletes a Finished Good Receipt document from a work order.Uses your API Key and deletes a finished good receipt (specified by the FinishedGoodReceiptId) from the related Work Order.

Examples:



A.

Deletes a finished good receipt document with Id 22730.

Value:

 {
  "FinishedGoodReceiptId": 22730
}  


Response:

{
  "mvWorkOrder": {
    "WorkOrderId": 22728,
    "WorkOrderTypeId": -8,
    "WorkOrderFinishedGoodTypeId": -9,
    "WorkOrderTypeAbbreviation": "PROD-O",
    "WorkOrderTypeDescription": "Production Order",
    "WorkOrderNo": "5",
    "WorkOrderFinishedGoodSKU": "Cappuccino",
    "WorkOrderStartDate": "/Date(1685566800000-0000)/",
    "WorkOrderDueDate": "/Date(-62135596800000-0000)/",
    "WorkOrderPriority": "Medium",
    "WorkOrderCurrencyCode": "EUR",
    "WorkOrderInventoryLocationID": 1011,
    "WorkOrderComments": "",
    "WorkOrderTags": "",
    "WorkOrderReferenceNo": "",
    "WorkOrderReferenceApplication": "",
    "TopLevelWorkOrderId": 0,
    "WorkOrderOrderedQuantity": 2,
    "WorkOrderReceivedQuantity": 1,
    "WorkOrderTotalMaterialCost": 0,
    "WorkOrderTotalLabourCost": 0,
    "WorkOrderTotalOverheadCost": 0,
    "WorkOrderFinishedGoodUnitCost": 0,
    "WorkOrderDetails": [
      {
        "WorkOrderBOMRowProductSKU": "Milk",
        "WorkOrderBOMRowProductDescription": "Coffe ingredient",
        "WorkOrderBOMRowProductVariant": "",
        "WorkOrderBOMRowOrderedQuantity": 2,
        "WorkOrderBOMRowTotalAllocatedQuantity": 0,
        "WorkOrderBOMRowProductQuantityUnit": "",
        "WorkOrderBOMRowRemarks": "",
        "WorkOrderRowAllocatedDetails": [
          {
            "WorkOrderBOMRowAllocatedQuantity": 2,
            "WorkOrderBOMRowAllocatedDateTime": "/Date(1685615484200-0000)/",
            "WorkOrderBOMRowAllocatedDateTimeFormatted": ""
          }
        ]
      },
      {
        "WorkOrderBOMRowProductSKU": "Coffee",
        "WorkOrderBOMRowProductDescription": "Coffe ingredient",
        "WorkOrderBOMRowProductVariant": "",
        "WorkOrderBOMRowOrderedQuantity": 2,
        "WorkOrderBOMRowTotalAllocatedQuantity": 0,
        "WorkOrderBOMRowProductQuantityUnit": "",
        "WorkOrderBOMRowRemarks": "",
        "WorkOrderRowAllocatedDetails": [
          {
            "WorkOrderBOMRowAllocatedQuantity": 2,
            "WorkOrderBOMRowAllocatedDateTime": "/Date(1685615484217-0000)/",
            "WorkOrderBOMRowAllocatedDateTimeFormatted": ""
          }
        ]
      },
      {
        "WorkOrderBOMRowProductSKU": "Sugar",
        "WorkOrderBOMRowProductDescription": "Coffe ingredient",
        "WorkOrderBOMRowProductVariant": "",
        "WorkOrderBOMRowOrderedQuantity": 2,
        "WorkOrderBOMRowTotalAllocatedQuantity": 0,
        "WorkOrderBOMRowProductQuantityUnit": "",
        "WorkOrderBOMRowRemarks": "",
        "WorkOrderRowAllocatedDetails": [
          {
            "WorkOrderBOMRowAllocatedQuantity": 2,
            "WorkOrderBOMRowAllocatedDateTime": "/Date(1685615484227-0000)/",
            "WorkOrderBOMRowAllocatedDateTimeFormatted": ""
          }
        ]
      }
    ],
    "WorkOrderStatus": "Completed",
    "WorkOrderCreationDate": "/Date(1685615480613-0000)/",
    "WorkOrderLastUpdatedDate": "/Date(1685615774365+0300)/"
  },
  "ResponseStatus": {
    "ErrorCode": "0"
  },
  "entityID": 22728
}
 

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

HTTP + JSV

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

POST /jsv/reply/WorkOrderDeleteFinishedGoodReceipt HTTP/1.1 
Host: api.megaventory.com 
Content-Type: text/jsv
Content-Length: length

{
	APIKEY: String,
	FinishedGoodReceiptId: 0,
	FinishedGoodDeleteComments: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	mvWorkOrder: 
	{
		WorkOrderId: 0,
		WorkOrderTypeId: 0,
		WorkOrderFinishedGoodTypeId: 0,
		WorkOrderTypeAbbreviation: String,
		WorkOrderTypeDescription: String,
		WorkOrderNo: String,
		WorkOrderFinishedGoodSKU: String,
		WorkOrderStartDate: 0001-01-01,
		WorkOrderDueDate: 0001-01-01,
		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: 0001-01-01,
						WorkOrderBOMRowAllocatedDateTimeFormatted: String,
						WorkOrderBOMRowAllocatedSerialNumbers: 
						[
							String
						],
						WorkOrderBOMRowAllocatedBatchNumbers: 
						[
							{
								BatchNumberName: String,
								ExpiryDate: 0001-01-01,
								AssignedQTYInDetail: 0
							}
						]
					}
				]
			}
		],
		WorkOrderStatus: Pending,
		WorkOrderCreationDate: 0001-01-01,
		WorkOrderLastUpdatedDate: 0001-01-01
	},
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String
			}
		]
	},
	entityID: 0,
	InternalErrorCode: String
}