Megaventory API v2017a

<back to all web services

WorkOrderReceiveFinishedGood

The following routes are available for this service:
POST/WorkOrder/WorkOrderReceiveFinishedGoodReceives quantity of a finished good from a work order.Uses your API Key and receives finished goods from the WorkOrder specified by the WorkOrderId after the necessary materials have already been allocated.

Examples:



A.

Receive a finished good from a Work Order with Id 22728.

Value:

 {
  "WorkOrderId": 22728,
  "ReceiveQuantity":1
}  


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": 2,
    "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/oneway/WorkOrderReceiveFinishedGood HTTP/1.1 
Host: api.megaventory.com 
Content-Type: text/jsv
Content-Length: length

{
	APIKEY: String,
	WorkOrderId: 0,
	FinishedGoodReceiptTypeId: 0,
	FinishedGoodReceiptManualNumber: String,
	FinishedGoodReceiptComments: String,
	FinishedGoodReceiptRemarks: String,
	FinishedGoodReceiptTags: String,
	ReceiveQuantity: 0,
	ReceiveSerialNumbers: 
	[
		String
	],
	ReceiveBatchNumbers: 
	[
		{
			BatchNumberName: String,
			ExpiryDate: 0001-01-01,
			Quantity: 0
		}
	],
	FinishedGoodReceiptCustomDate1: 0001-01-01,
	FinishedGoodReceiptCustomDate2: 0001-01-01
}