Shopify API Error When Updating Order Tags — {"errors":{"order_tags":["is invalid"]}}

Hi everyone,

I’m running into an issue when trying to update order tags via the Shopify Admin API. When I send a request to update the tags on an order, I sometimes get the following error response: {"errors":{"order_tags":["is invalid"]}}.

After some testing, I’ve noticed that this seems to happen when the tags include certain special characters. For example, trying to use the tag Réduction immédiate causes the request to fail. This seems odd because Shopify does allow special characters in tags when editing directly in the admin interface. But via the API, these characters (like accents or non-ASCII letters) appear to break the request. Has anyone else encountered this?

Any insight would be really appreciated!

Thanks in advance.

Hey Daryl,

I haven’t come across this before - digging into this on my side now.

We’re not able to reproduce this - can you post the mutation you’re using?

To replicate, first set the order tag with special characters:

mutation { orderUpdate(input: { id: “gid://shopify/Order/XXXX”, tags: [“Réduction immédiate”] }) { order { id tags } userErrors { field message } } }

Then, try and set it again with one or more special characters changed:

mutation { orderUpdate(input: { id: “gid://shopify/Order/XXXX”, tags: [“Réduction immediate”] }) { order { id tags } userErrors { field message } } }

This will give you a 422 response. Expected behaviour would be to update the order tag, regardless of the previous tag.

Thanks - looking into this now!

Hi again @daryl

So it does seem that there’s an issue on our side where the special characters are being wrongly identified as being the same as the non-special ones, so a duplication error is produced. Thanks for flagging this - I’ll update here when we’ve shipped a fix.

1 Like