ads api batch requests

Send multiple ads api requests at once. See more: https:developers.facebook.comdocsreferenceads-apibatch-requests

 batched request json array
$batched_request = \'[
             {
              \"method\": \"POST\",
              \"name\": \"create_creative\",
              \"relative_url\": \"act_187687683adcreatives\",
              \"attached_files\": \"test1\",
              \"body\": \"title=Test title&body=Test body&link_url=http:www.test12345.com&image_file=test1.jpg\"
             },
             {
              \"method\": \"POST\",
              \"relative_url\": \"act_187687683adgroups\",
              \"body\": \"campaign_id=6004163746239&redownload=1&bid_type=1&max_bid=30&creative={\\\"creative_id\\\":\\\"{result=create_creative:$.id}\\\"}&targeting={\\\"countries\\\":[\\\"US\\\"]}&name=test1\"
             },
             {
              \"method\": \"POST\",
              \"relative_url\": \"act_187687683adgroups\",
              \"body\": \"campaign_id=6004163746239&redownload=1&bid_type=1&max_bid=30&creative={\\\"creative_id\\\":\\\"{result=create_creative:$.id}\\\"}&targeting={\\\"countries\\\":[\\\"GB\\\"]}&name=test2\"
             },
             {
              \"method\": \"POST\",
              \"relative_url\": \"act_187687683adgroups\",
              \"body\": \"campaign_id=6004163746239&redownload=1&bid_type=1&max_bid=30&creative={\\\"creative_id\\\":\\\"{result=create_creative:$.id}\\\"}&targeting={\\\"countries\\\":[\\\"IE\\\"]}&name=test3\"
             }
            ]\'; 

$post_url = \"https:graph.facebook.com\" . \"?batch=\" . urlencode($batched_request) . \"&access_token=\" . $access_token . \"&method=post\"; 

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $post_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$post = curl_exec($ch);
curl_close($ch);
$post_obj = json_decode($post, true);

$this_query=$post_obj[0];