title: CRM WebApi batch request
body: <p>With this guide: <a href="https://msdn.microsoft.com/en-us/library/mt607719.aspx" rel="noreferrer">https://msdn.microsoft.com/en-us/library/mt607719.aspx</a>, I'm trying to create a batch request to delete all quotedetails on a quote.
  I'm using jquery's ajax to do the request:</p>
  
  <pre><code>$.ajax(
  {
      method: 'POST',
      url: 'http://crm/api/data/v8.0/$batch',
      headers: {
          'Content-Type': 'multipart/mixed;boundary=batch_' + batchId,
          'Accept': 'application/json'
      },
      data: payload
  });
  </code></pre>
  
  <p>And this is the payload:</p>
  
  <pre><code>–batch_SuL11egVC7
  Content-Type:multipart/mixed;boundary=changeset_Sj74vxbGYr
  
  –changeset_Sj74vxbGYr
  Content-Type:application/http
  Content-Transfer-Encoding:binary
  Content-ID:1
  
  DELETE crm/.../quotedetails(cc9b9ba8-4570-e611-80ba-0050568a6c2d) HTTP/1.1
  Content-Type: application/json;type=entry
  –changeset_Sj74vxbGYr
  Content-Type:application/http
  Content-Transfer-Encoding:binary
  Content-ID:2
  
  DELETE crm/.../quotedetails(cd9b9ba8-4570-e611-80ba-0050568a6c2d) HTTP/1.1
  Content-Type: application/json;type=entry
  –changeset_Sj74vxbGYr--
  
  -batch_SuL11egVC7--
  </code></pre>
  
  <p>I'm not getting an error, but the quotedetails aren't deleted.
  This is the response:</p>
  
  <pre><code>--batchresponse_a3304387-0e91-4097-b9f8-a207da3aa845--
  </code></pre>
  
  <p>I've also found this example and I'm trying to replicate it with Postman: <a href="https://stackoverflow.com/questions/36750981/batch-request-dynamics-crm">Batch request - Dynamics CRM</a></p>
  
  <p>Headers:</p>
  
  <pre><code>Content-Type:multipart/mixed;boundary=batch_123456
  Accept:application/json
  Odata-MaxVersion:4.0
  Odata-Version:4.0
  </code></pre>
  
  <p>Body:</p>
  
  <pre><code>–-batch_123456
  Content-Type:multipart/mixed;boundary=changeset_123457
  
  –-changeset_123457
  Content-Type:application/http
  Content-Transfer-Encoding:binary
  Content-ID:1
  
  POST http://onpremisesurl/api/data/v8.0/accounts HTTP/1.1
  Content-Type:application/json;type=entry
  
  {name: 'batch acount 1'}
  –-changeset_123457
  Content-Type:application/http
  Content-Transfer-Encoding:binary
  Content-ID:2
  
  POST http://onpremisesurl/api/data/v8.0/accounts HTTP/1.1
  Content-Type:application/json;type=entry
  
  {name: 'batch acount 2'}
  –-changeset_123457--
  --batch_123456--
  </code></pre>
  
  <p>The first one doesn't delete the accounts and the second doesn't create the accounts.</p>
  
  <p>Any clues on what I'm doing wrong?</p>