OperatorError when trying to delete a draft

5 views
Skip to first unread message

Sreeram Jagannathan

unread,
May 13, 2019, 5:40:41 PM5/13/19
to AdWords API and Google Ads API Forum
Hello,

I am getting an OPERATOR_NOT_SUPPORTED error when trying to delete a draft from API (see the screenshot). 

draft = draft_service.get(selector)['entries']

draft_operation = {'operator': 'REMOVE', 'operand': draft}

draft_delete = draft_service.mutate(draft_operation)['value'][0]

I was able to verify the contents of the draft and draft_operation. It looks fine.

Could somebody please guide me through this.

Thanks,
Sreeram


draftDeletion_error.PNG

googleadsapi...@google.com

unread,
May 14, 2019, 1:50:32 AM5/14/19
to adwor...@googlegroups.com
Hi Sreeram,

You can set the DraftStatus to ARCHIVED instead, by using the DraftService.mutate() method and the SET operator. Setting the status to ARCHIVED will automatically mark the draft campaign as REMOVED as stated in this guide. Let me know if this helps.

Thanks and regards,
Peter
Google Ads API Team

Was your question answered? Please rate your experience with us by taking a short survey.
If not -- reply to this email and tell us what else we can do to help.

Take Survey

Also find us on our blog and discussion group:
http://googleadsdeveloper.blogspot.com/search/label/adwords_api
https://developers.google.com/adwords/api/community/

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
 
You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwor...@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
---
You received this message because you are subscribed to the Google Groups "AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/d1fec4e4-acd5-49a9-b52f-07907d82e81a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages