title: TFS rest API- Create Work Item
body: <p>I am trying to create a work item using the <code>Microsoft.TeamFoundationService.Client</code> api but everytime I try to create the work item it fails with the error</p>
  
  <blockquote>
    <p>New work item updates must specify Area and Iteration node ids.</p>
  </blockquote>
  
  <p>So far I have the following:</p>
  
  <pre><code>var connection = new VssConnection(baseUrl, vssBasicCredential);
  var witClient = connection.GetClient&lt;WorkItemTrackingHttpClient&gt;();
  
  var patchDocument = new JsonPatchDocument();
  patchDocument.Add(new JsonPatchOperation
  {
    Operation = Operation.Add,
    Path = "/Fields/System.Title",
    Value = title
  });
  
  ...
  var newlyCreatedUserStory = witClient.CreateWorkItemAsync(patchDocument,
                                                            testProject.Id,
                                                            "User Story").Result;
  </code></pre>
  
  <p>It is at this point the exception is thrown.  I have tried to add in the values for Area and Interation node as well:</p>
  
  <pre><code>        patchDocument.Add(new JsonPatchOperation
          {
              Operation = Operation.Add,
              Path = "/Fields/System.AreaId",
              Value = parentWorkItem.Fields["System.AreaId"].ToString()
          });
          patchDocument.Add(new JsonPatchOperation
          {
              Operation = Operation.Add,
              Path = "/Fields/System.AreaPath",
              Value = parentWorkItem.Fields["System.AreaPath"].ToString()
          });
          patchDocument.Add(new JsonPatchOperation
          {
              Operation = Operation.Add,
              Path = "/Fields/System.TeamProject",
              Value = parentWorkItem.Fields["System.TeamProject"].ToString()
          });
          patchDocument.Add(new JsonPatchOperation
          {
              Operation = Operation.Add,
              Path = "/Fields/System.NodeName",
              Value = parentWorkItem.Fields["System.NodeName"].ToString()
          });
          patchDocument.Add(new JsonPatchOperation
          {
              Operation = Operation.Add,
              Path = "/Fields/System.AreaLevel1",
              Value = parentWorkItem.Fields["System.AreaLevel1"].ToString()
          });
          patchDocument.Add(new JsonPatchOperation
          {
              Operation = Operation.Add,
              Path = "/Fields/System.IterationId",
              Value = parentWorkItem.Fields["System.IterationId"].ToString()
          });
          patchDocument.Add(new JsonPatchOperation
          {
              Operation = Operation.Add,
              Path = "/Fields/System.IterationPath",
              Value = parentWorkItem.Fields["System.IterationPath"].ToString()
          });
          patchDocument.Add(new JsonPatchOperation
          {
              Operation = Operation.Add,
              Path = "/Fields/System.IterationLevel1",
              Value = parentWorkItem.Fields["System.IterationLevel1"].ToString()
          });
  </code></pre>
  
  <p>Any ideas?  Thanks in advance.</p>