Hi ,
I am creating a batch request with following header and body ::
Header::
POST [Organization URI]/api/data/v9.1/$batch HTTP/1.1
Content-Type: multipart/mixed;boundary=batch_AAA123
Accept: application/json
OData-MaxVersion: 4.0
OData-Version: 4.0
"--batch_AAA123"+"\n"+
"Content-Type: multipart/mixed;boundary=changeset_BBB456"+"\n"+
"--changeset_BBB456"+"\n"+
"Content-Type: application/http"+"\n"+
"Content-Transfer-Encoding:binary"+"\n"+
"Content-ID: 1"+"\n"+
"POST [Organization URI]/api/data/v9.1/tasks HTTP/1.1"+"\n"+
"Content-Type: application/json;type=entry"+"\n"+
"{"
+ "subject"+":"+"Task 1 in batch"+","+
"regardingobjectid_account_task@odata.bind"+":"+
"[Organization URI]/api/data/v9.1/accounts(7df4f60c-d1fe-e811-a96d-000d3af2905b)"+
"}"+"\n"+
"--changeset_BBB456"+"\n"+
"Content-Type: application/http"+"\n"+
"Content-Transfer-Encoding:binary"+"\n"+
"Content-ID: 2"+"\n"+
"POST [Organization URI]/api/data/v9.1/tasks HTTP/1.1"+"\n"+
"Content-Type: application/json;type=entry"+"\n"+
"{"
+ "subject"+":"+
"Task 2 in batch"+","+
"regardingobjectid_account_task@odata.bind"+":"+
"[Organization URI]/api/data/v9.1/accounts(7df4f60c-d1fe-e811-a96d-000d3af2905b)"+
"}"+"\n"+
"--changeset_BBB456--"+"\n"+
"--batch_AAA123"+"\n"+
"Content-Type: application/http"+"\n"+
"Content-Transfer-Encoding:binary"+"\n"+
"GET [Organization URI]/api/data/v9.1/accounts(7df4f60c-d1fe-e811-a96d-000d3af2905b)/Account_Tasks?$select=subject HTTP/1.1"+"\n"+
"Accept: application/json"+"\n"+
"--batch_AAA123--";
In response, I am getting status code 200 and --batchresponse_f6b059f5-56ae-4be6-8101-55632a9be4cd-- but the new task are not creating in crm.
Please help to find out the solution.
Thanks,
Ankit