AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

Ads
1.8K members online now
1.8K members online now
For questions related to Google Shopping and Merchant Center. Learn to optimize your Shopping ads
Guide Me
star_border
Reply

Unrecognized attribute: tax

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

For the XML feed I am getting a warning message unrecognized attribute <tax>. If I remove the attribute <tax> then I get an error message saying that the attribute is required.

 

The XML is like this

 

<tax><country>US</country><rate>0.00</rate><ship>false</ship></tax>

1 Expert replyverified_user

Re: Unrecognized attribute: tax

[ Edited ]
Top Contributor
# 2
Top Contributor

tax may be either set in the account or
as an individual override within the feed.

if tax is identical for all items submitted
then, one simple option would be to --
(1) configure tax settings within the account;
(2) remove tax from the submitted data;
(3) resubmit the data (feed).

similarly, with shipping, shipping must be exactly accurate or an
overestimate -- and may be set in the account or sent in the feed.

any tax or shipping values submitted for an item,

will override related account-settings, for that item.

otherwise, tax and shipping are separately submitted attributes;

tax's tax_ship sub-attribute indicates tax-on-shipping, or not --

tax, for a .xml feed file:
<g:tax>
<g:country>US</g:country>
<g:rate>0.00</g:rate>
<g:tax_ship>n</g:tax_ship>
</g:tax>

tax, for a .txt tab-delimited feed file:
US::0.00:n

see also
https://support.google.com/merchants/answer/6069284
https://support.google.com/merchants/answer/160162
https://support.google.com/merchants/answer/188494#tax
https://support.google.com/merchants/answer/188494#shipping

 

Re: Unrecognized attribute: tax

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭
sorry, to be more exact I am using "Content API v2 (XML)". This page says how to format the tax attribute in the same way as I have done so https://support.google.com/merchants/answer/188494 and I get the message that this attribute is unrecognized and when I remove the attribute it says there is an error in the feed. This does not make any sense. the example from the page shows the below for "Content API v2 (XML)" but it doesn't seem to work as specified.

<tax>
<country>US</country>
<region>MA</region>
<rate>5.00</rate>
<ship>true</ship>
</tax>

Re: Unrecognized attribute: tax

[ Edited ]
Top Contributor
# 4
Top Contributor

tax may be removed from submitted data (only) if
the tax settings have been properly configured for
the corresponding target-country, in the account.

 

perhaps importantly, none of the api fomats may be used with a feed-file --
that is not allowed; only the google-content-api-for-shopping may be used
with either content-api-xml or content-api-json formatted data.

 

google only allows feed (file) data to be submitted using either
a .txt text-tab-delimited format or .xml google-xml-feed format --
content-api formats cannot be used with any registered data-feed.

 

the feed (file) formats and the content-api formats are *not* interchangeable.

 

with respect to google's content-api-for-shopping,
the unrecognized-attribute or unknown-field-name
messages usually indicate a mismatch between
the message-body requirements and the content
being submitted, or a content-type mismatch, or
some combination.

 

by default, api-data must be json, inserted with a json application content-type;
e.g.
"taxes": [ {
"country": "US",
"rate": 0.00,
"taxShip": false
} ],

 

otherwise, api-data may be xml, inserted with an xml application content-type;
e.g.
<tax>
<country>US</country>
<rate>0.00</rate>
<ship>false</ship>
</tax>

 

both the above examples were used in live api-inserts via the api --

neither of the above examples are allowed to be used in a feed-file.

 

typically, one of the content-api client-libraries should be used --
each client-library may have specific parameter requirements to
handle specific data-formats and corresponding content-types.

 

regardless, a best-practice with respect to the
api is to use a dry-run before inserting live data.

 

otherwise, the entire message-body and response would likely be needed --
with any exact code and content-api client-library and version being used --
e.g. java, .net, php, python, etc., posted here within the public forum.

 

otherwise, the official content-api-forum may be consulted for support.

 

otherwise, if the data is for a registered products-feed file then,

only text-tab-delimited or google-xml feed formats are allowed --
content-api formats cannot be used with any registered feed file.

 

see also

https://support.google.com/merchants/answer/160567

https://support.google.com/merchants#topic=3404777

https://support.google.com/merchants/#topic=3404777