Google Ads API Bulk Mutates Response Order

48 views
Skip to first unread message

Dmitrii Stebliuk

unread,
Aug 6, 2019, 4:34:09 AM8/6/19
to AdWords API and Google Ads API Forum
Hello,

when we send a bulk mutate operations to Google Ads API (https://developers.google.com/google-ads/api/docs/mutating/bulk-mutate), 
can we rely that the order of operations we send is the same as the order of response items we get?


Google Ads API Forum Advisor Prod

unread,
Aug 6, 2019, 12:26:44 PM8/6/19
to dmitrii....@omio.com, adwor...@googlegroups.com
Hello Dmitrii,

The bulk mutate operation may not complete the execution in the same order they were sent. Also, each MutateGoogleAdsRequest accepts a repeated MutateOperation, each of which can include a single operation for one resource type as mentioned here. In case if you are intend to use the resource name from the other operations in the API call which are yet to be created, you can use Temporary name as mentioned here. Please let me know if you have any further questions.

Regards,
Sai Teja, Google Ads API Team

ref:_00D1U1174p._5001UEI0px:ref

Dmitrii Stebliuk

unread,
Aug 7, 2019, 4:28:03 AM8/7/19
to AdWords API and Google Ads API Forum
Hello Sai Teja,

Thank you for your response.

Basically I create many "ads" with one mutate request. Let's say 1000 ads. Each ad has "h1, h2, h3, d1, d2" attributes.
I get a response from Google Ads API as List[MutateAdGroupAdResult] where each item has only `resource_name` and it is the list of 1000 items.
I want to persist the result of the operation List[(resource_name, h1, h2, h3, d1, d2)].
So if you say that there is no order correlation, how can I correlate the 1000 items I sent with the 1000 resource_names I got?

Google Ads API Forum Advisor Prod

unread,
Aug 7, 2019, 11:18:16 AM8/7/19
to dmitrii....@omio.com, adwor...@googlegroups.com
Hello Dimitrii,

Yes you are correct, the response will contain the resource names in the same order as the operations passed to the service. Though the operations will execute asynchronously. Please let me know if you have any further questions.
Reply all
Reply to author
Forward
0 new messages