Gets information on work orders. | Uses your API Key and some Filters in an array format and returns the search results using the given filters. Optionally, you can use the number of the Work Order (mvWorkOrderNo), its status mvWorkOrderStatus (Pending, Cancelled, InProcess, Closed, InProcessPartiallyCompleted or Completed) and ReturnTopNRecords to limit the number of the results to the specified number (omit, or add ReturnTopNRecords = -1 to get all the available results). The ReturnTopNRecords chooses the top records in a ProductId descending order.
A. Return the first work order with Pending status and Medium priority. The result is returned as an mvWorkOrders object.
Value: {
"Filters": [
{
"FieldName": "WorkOrderStatus",
"SearchOperator": "Equals",
"SearchValue": "Pending"
},
{
"AndOr": "And",
"FieldName": "WorkOrderPriority",
"SearchOperator": "Equals",
"SearchValue": "Medium"
}
],
"ReturnTopNRecords": 1
}
Response: {
"mvWorkOrders": [
{
"WorkOrderId": 49429,
"WorkOrderNo": "33",
"WorkOrderFinishedGoodSKU": "prod111",
"WorkOrderStartDate": "/Date(1531774800000-0000)/",
"WorkOrderDueDate": "/Date(-62135596800000-0000)/",
"WorkOrderPriority": "Medium",
"WorkOrderCurrencyCode": "USD",
"WorkOrderInventoryLocationID": 3405,
"WorkOrderComments": "",
"WorkOrderTags": "",
"WorkOrderReferenceNo": "CreatedFromClipboard[26]",
"WorkOrderReferenceApplication": "",
"TopLevelWorkOrderId": 0,
"WorkOrderOrderedQuantity": 1,
"WorkOrderReceivedQuantity": 0,
"WorkOrderTotalMaterialCost": 0,
"WorkOrderTotalLabourCost": 0,
"WorkOrderTotalOverheadCost": 0,
"WorkOrderFinishedGoodUnitCost": 0,
"WorkOrderDetails": [
{
"WorkOrderBOMRowProductSKU": "PROD11",
"WorkOrderBOMRowProductDescription": "PROD11",
"WorkOrderBOMRowOrderedQuantity": 2,
"WorkOrderBOMRowTotalAllocatedQuantity": 0,
"WorkOrderBOMRowProductQuantityUnit": "",
"WorkOrderBOMRowRemarks": "",
"WorkOrderRowAllocatedDetails": []
}
],
"WorkOrderStatus": "Pending",
"WorkOrderCreationDate": "/Date(1531822563533-0000)/",
"WorkOrderLastUpdatedDate": "/Date(1531822563533-0000)/"
}
],
"ResponseStatus": {
"ErrorCode": "0"
}
}
|