Method ITGetWorkOrders

Type: FusionOSServices.Controllers.IntelliTimeController

Summary

This service returns the list of all Work orders from Finance Enterprise.

Example

GET https://fusion.superion.com/FusionOSServices/v0/ONESolution/IntelliTime/WorkOrders

Sample Code

using System.Net;
using Newtonsoft.Json.Linq;

public void MethodName(parms){

    string uri = "https://fusion.superion.com/FusionOSServices/v0/ONESolution/IntelliTime/WorkOrders";

	// append an WoorkOrder Number id if desired.
    uri += "/E00001"

    using (WebClient wc = new WebClient())
    {
        wc.Headers.Add("Content-Type", "application/json");
        // Replace "ID" with supplied AppID
        wc.Headers.Set("X-APPID", "ID");
        // Replace "KEY" with supplied AppKey
        wc.Headers.Set("X-APPKEY", "KEY");

        while (uri != null)
        {
            string result = wc.DownloadString(uri);

            var response = JObject.Parse(result);

            var workOrders = (JContainer)response["RequestResponse"]["DATA"]["WODEF"];

            foreach (var workOrder in workOrders )
            {
                // Your code goes here
                string woNo = (string)workOrder["WONO"];
                string description = (string)workOrder["DESCS"];

            }
            // responses with more then 1000 positions are broken up into multiple requests
            uri = (string)response["RequestResponse"]["NextUri"];
        }
    }
}

Sample Responses


                        
              {
              "RequestResponse": {
                "Count": "2",
                "DATA": {
            		"WODEF":  [
            	       {
                      "DESCS": "CB Test Task 1",
                      "GR": "GL",
                      "STAT": "AC",
                      "WONO": "-1591"
                    },
                    {
                      "DESCS": "QA METER CHECK",
                      "GR": "GL",
                      "STAT": "AC",
                      "WONO": "-1592"
                    }
            	     ]
                 } 
               }
              }