BudgetService NON_MULTIPLE_OF_MINIMUM_CURRENCY_UNIT

24 views
Skip to first unread message

maks.m...@avana.asia

unread,
Mar 6, 2019, 5:11:51 PM3/6/19
to AdWords API and Google Ads API Forum
Hi Support Team,

I am having an issue with BudgetService mutate. Details are as below:

1. I am using PHP 64 bit.
2. For conversion I am using number_format($amount, 0, '.', '')
3. Our account currency is IDR.

Below SOAP request XML:

<?xml version="1.0" encoding="UTF-8"?>
    <SOAP-ENV:Header>
        <ns1:RequestHeader>
            <ns1:clientCustomerId>6966754895</ns1:clientCustomerId>
            <ns1:developerToken>REDACTED</ns1:developerToken>
            <ns1:userAgent>unknown (AwApi-PHP, googleads-php-lib/36.0.0, PHP/7.2.15-1+ubuntu16.04.1+deb.sury.org+1)</ns1:userAgent>
            <ns1:validateOnly>false</ns1:validateOnly>
            <ns1:partialFailure>false</ns1:partialFailure>
        </ns1:RequestHeader>
    </SOAP-ENV:Header>
    <SOAP-ENV:Body>
        <ns1:mutate>
            <ns1:operations>
                <ns1:operator>ADD</ns1:operator>
                <ns1:operand>
                    <ns1:name>All Products Campaign 2019-03-06 07:20:32 #5c7f7394d3314</ns1:name>
                    <ns1:amount>
                        <ns1:microAmount>34595100000</ns1:microAmount>
                    </ns1:amount>
                    <ns1:deliveryMethod>STANDARD</ns1:deliveryMethod>
                    <ns1:isExplicitlyShared>false</ns1:isExplicitlyShared>
                </ns1:operand>
            </ns1:operations>
        </ns1:mutate>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

I have been trying different fixes I found in Internet but nothing helped.

Thanks in advance,
Maks

googleadsapi...@google.com

unread,
Mar 6, 2019, 10:27:16 PM3/6/19
to AdWords API and Google Ads API Forum
Hi Maks,

The error NON_MULTIPLE_OF_MINIMUM_CURRENCY_UNIT is encountered when a money amount was not a multiple of a minimum unit. After some investigation, this appears to be an issue with the SOAP toolkit and the client library. For 64 bit machine we need to use number_float for converting the amount back to string and then pass it under setAmount function. You could refer to this GitHub post for more details. Let me know if this solves your problem.

Regards,
Dannison
AdWords API Team


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

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/fd8298ca-5891-4282-a832-6314bf07d80e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Maksat Mamytov

unread,
Mar 7, 2019, 8:35:52 AM3/7/19
to googleadsapi...@google.com, AdWords API and Google Ads API Forum, Adam Ohren, Saikat Bose
Hi Dannison,

I tried the approach from the link you shared but I am still getting the same error message. My code is like below:

$micro = $amount * 1000000;

return floatval(number_format($micro, 0, '.', ''));
Is there any other reasons it may fail?
Thanks,
Maks


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...@googlegroups.com.

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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

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...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages