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 .xml suffix or ?format=xml

HTTP + XML

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

POST /xml/oneway/WorkOrderReceiveFinishedGood HTTP/1.1 
Host: api.megaventory.com 
Content-Type: application/xml
Content-Length: length

<WorkOrderReceiveFinishedGood xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Megaventory.APIEndpoints.Operations">
  <APIKEY>String</APIKEY>
  <WorkOrderId>0</WorkOrderId>
  <FinishedGoodReceiptComments>String</FinishedGoodReceiptComments>
  <FinishedGoodReceiptManualNumber>String</FinishedGoodReceiptManualNumber>
  <FinishedGoodReceiptRemarks>String</FinishedGoodReceiptRemarks>
  <FinishedGoodReceiptTags>String</FinishedGoodReceiptTags>
  <FinishedGoodReceiptTypeId>0</FinishedGoodReceiptTypeId>
  <ReceiveQuantity>0</ReceiveQuantity>
  <ReceiveSerialNumbers xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>String</d2p1:string>
  </ReceiveSerialNumbers>
  <ReceiveBatchNumbers xmlns:d2p1="https://api.megaventory.com/types">
    <d2p1:BatchNumber>
      <d2p1:BatchNumberName>String</d2p1:BatchNumberName>
      <d2p1:ExpiryDate>0001-01-01T00:00:00</d2p1:ExpiryDate>
      <d2p1:Quantity>0</d2p1:Quantity>
    </d2p1:BatchNumber>
  </ReceiveBatchNumbers>
  <FinishedGoodReceiptCustomDate1>0001-01-01T00:00:00</FinishedGoodReceiptCustomDate1>
  <FinishedGoodReceiptCustomDate2>0001-01-01T00:00:00</FinishedGoodReceiptCustomDate2>
</WorkOrderReceiveFinishedGood>