OPERATION_NOT_PERMITTED_FOR_CAMPAIGN_TYPE removing adgroup

2020-04-25 Thread Artem Baltser
Hello, Im trying to remove adgroup from api in SEARCH campaign

if (addedAdGroups != null) {
try {
List operations = new ArrayList<>(1);

for (AdGroup adGroup : addedAdGroups) {
adGroup.setStatus(AdGroupStatus.REMOVED);

AdGroupOperation operation = new AdGroupOperation();
operation.setOperand(adGroup);
operation.setOperator(Operator.SET);

operations.add(operation);
}

adGroupService.mutate(operations.toArray(new AdGroupOperation[0]));
} catch (ApiException e2) {
throw new AdwordsFailureException(e2, currentAdwordsAccount);
}
}


Is It possible to remove adgroup? Im able to remove adgroup manually from 
ads interface

Also If this option cannot be handled at all please could you tell me how 
to Implement transactional logic when some adwords operation fails with 
exception? Thanks

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/2c440eff-3dee-46c4-ba86-c344c0475cad%40googlegroups.com.


Re: Getting INVALID_PRODUCT_PARTITION_HIERARCHY when updating partition

2019-09-24 Thread artem baltser
I can't remove excluded partition. Im 
getting AdGroupCriterionError{apiErrorType=AdGroupCriterionError, 
errorString=AdGroupCriterionError.CAMPAIGN_TYPE_NOT_COMPATIBLE_WITH_PARTIAL_FAILURE,
 
fieldPath=operations[0].operand, 
fieldPathElements=[FieldPathElement{field=operations, index=0}, 
FieldPathElement{field=operand}], 
reason=CAMPAIGN_TYPE_NOT_COMPATIBLE_WITH_PARTIAL_FAILURE, trigger=SHOPPING}

On Tuesday, 24 September 2019 09:03:51 UTC+3, adsapiforumadvisor wrote:
>
> Hi Artem,
>
> If a partition tree has already been created as biddable, you would not be 
> able to directly convert it or any of its subdivisions/units to be 
> excluded. You will first need to REMOVE the BiddableAdGroupCriterion 
> 
>  
> and afterwards ADD a new NegativeAdGroupCriterion 
> 
>  
> then associate your ProductPartition 
> ,
>  
> all this using the AdGroupCriterionService 
> 
> .
>
> I hope this has been helpful.
>
> Thanks and regards,
> Peter
> Google Ads API Team
>
>
> ref:_00D1U1174p._5001UHHjTF:ref

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/c8668d75-7a55-47fb-b185-ee44f7a59dbf%40googlegroups.com.


Re: Getting INVALID_PRODUCT_PARTITION_HIERARCHY when updating partition

2019-09-24 Thread artem baltser
Hi, actually It happens when I get operations from tree: remove & add, but 
It's in a single mutation request. I guess It should be divided by 2 
separated api requests? 

On Tuesday, 24 September 2019 09:03:51 UTC+3, adsapiforumadvisor wrote:
>
> Hi Artem,
>
> If a partition tree has already been created as biddable, you would not be 
> able to directly convert it or any of its subdivisions/units to be 
> excluded. You will first need to REMOVE the BiddableAdGroupCriterion 
> 
>  
> and afterwards ADD a new NegativeAdGroupCriterion 
> 
>  
> then associate your ProductPartition 
> ,
>  
> all this using the AdGroupCriterionService 
> 
> .
>
> I hope this has been helpful.
>
> Thanks and regards,
> Peter
> Google Ads API Team
>
>
> ref:_00D1U1174p._5001UHHjTF:ref

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/962ec9eb-8ad9-4f4a-bacc-24a93f387a8c%40googlegroups.com.


Getting INVALID_PRODUCT_PARTITION_HIERARCHY when updating partition

2019-09-23 Thread artem baltser
Hi. Im trying to update product group with java api( product partition 
tree) so It creates 2 operations for one partition. For example, product 
'X' is excluded couple hours ago. Im setting this as 'biddable'.
Mutation returns  INVALID_PRODUCT_PARTITION_HIERARCHY error. I can't figure 
out  what's wrong

Code:

​ 
ProductPartitionNode rootNode = partitionTree.getRoot(); 
ProductPartitionNode productNode = rootNode.getChild(new ProductOfferId(null
, itemId));

/* if (productNode.isBiddableUnit())
productNode.setBid((long) (maxCPC * MICROS_PER_DOLLAR));
*/
Iterable children = productNode.getChildren();
if (children.iterator().hasNext()) {
log.info("Product Node Type '" + itemId + "' cannot be changed because has 
child nodes.");
continue;
}

if(productNode.isSubdivision()){
log.info("Product Node Type '" + itemId + "' cannot be changed because its 
subdivision.");
continue;
}

switch (productGroupType) {
case EXCLUDED:
if (productNode.getParent() == null) {
log.info("Product Node Type '" + itemId + "' cannot be changed to excluded 
because has not parent node.");
break;
}
productNode.asExcludedUnit();
break;
case BIDDABLE:
productNode.asBiddableUnit();
productNode.setBid((long) (maxCPC * MICROS_PER_DOLLAR));
break out ;
}


-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/84eed383-7358-4669-b541-bdbf6cb37456%40googlegroups.com.


Re: How to update product group bid via api

2019-08-13 Thread artem baltser
Im using java and google ads api client

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/054fd938-7711-4f6a-ba9f-eb85c20d8783%40googlegroups.com.


How to update product group bid via api

2019-08-13 Thread artem baltser
How to update product group/product bidding via api with 'Item ID' known? I 
can't understand and find the way to easily make It. 

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/56670820-af96-4096-bcd1-6cdc31e76ab2%40googlegroups.com.


Re: AdWordsServices ClassDefNotFound error

2016-03-15 Thread Artem Baltser
I resolved problem by adding some updated libraries:
AdWords 2.11.0(all 3 libs)
Joda-time 2.8.2
Guava 19.0
Guava-gwt 19.0
Guice 4.0(all 3 libs)
Opencsv 1.8
Commons-configuration 1.10
Commons-lang 2.6
Commons-collections 3.2.2
Commons-beanutils 1.9.2
Also a removed all unused libs from war/web-inf/lib




-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@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 Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@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/a689e864-b930-44a4-bcc5-050acd8ca182%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: AdWordsServices ClassDefNotFound error

2016-03-14 Thread Artem Baltser
I was wrong, all libs exist in logs
I guess you didn't work with appengine, may be the error is about that...I 
have one project, it has adwords 2.4.0 and still works...

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@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 Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@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/1b80c766-4636-4288-83af-fb345ca7e931%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: AdWordsServices ClassDefNotFound error

2016-03-14 Thread Artem Baltser
I guess you've not been working with appengine

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@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 Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@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/9f8e172e-84af-4eef-aaf6-217ba96cc644%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: AdWordsServices ClassDefNotFound error

2016-03-10 Thread Artem Baltser
I tried logging and found out that my classpath is not full...at least 
AdWords libs don't exist ... What I need to do?Why it happens?

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@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 Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@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/c5de13e9-7ae1-4c0c-b44d-d95f7af435f2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: AdWordsServices ClassDefNotFound error

2016-03-10 Thread Artem Baltser
I tried logging and found out that my classpath is not full...at least 
AdWords libs doesn't exist ... What I need to do?Why it happens?

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@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 Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@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/55297612-cd7b-4147-8e29-eae9968b11ec%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: AdWordsServices ClassDefNotFound error

2016-03-09 Thread Artem Baltser
There are many changes...Actually, I guess frontend changes like in tables 
and so on.. do not cause such errors...only client side...But there was 
added AdWords API requests...it works without requests

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@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 Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@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/69fc2a62-24a1-4b7c-948d-ff17bf0b61de%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.