title: Dynamics 365 Web API - Create Multiple Child Records JSON?
body: <p>We have an entity called Question and that has multiple responses, i.e., there is a 1:N relationship between Question and Response entities. </p>
  
  <p>We have an existing Question record. What we need to be able to achieve is to update the Question record and at the same time, add multiple Response record all related to the same question (i.e., the new_QuestionId field on the Response table should be populated as part of Response creation). </p>
  
  <p>My logic was to </p>
  
  <ol>
  <li>Update the Question record (i.e., one PATCH operation). </li>
  <li>Have a looping structure and within the loop, create Response records related to the Question record. </li>
  </ol>
  
  <p><strong>Sample Code</strong></p>
  
  <p>So, here I have given a sample where we are creating one response record which is related to the Question (with record Id <code>4B5461DB-7061-E711-8124-E0071B66C0A1</code>). </p>
  
  <pre><code>POST [Organization URI]/api/data/v8.2/new_responses HTTP/1.1 
  Content-Type: application/json; charset=utf-8 
  OData-MaxVersion: 4.0 
  OData-Version: 4.0 
  Accept: application/json
  {   
      "new_questionTitle": "This is the question from my console app",  
      "new_score": 100,   
      "new_nativelanguage": "This is in native language",   
      "new_englishtranslation": "This is in english",   
      "new_questionid@odata.bind": "/new_questions(4B5461DB-7061-E711-8124-E0071B66C0A1)",   
      "new_name": "This is the primary attribute" 
  }
  </code></pre>
  
  <p>My question is what would be the JSON if I want to be able to create multiple responses, all relating to the same Question Id of <code>4B5461DB-7061-E711-8124-E0071B66C0A1</code></p>
  
  <p>We are on Dynamics 365 online. </p>