How can I append a tag to an order via REST API

JohnCosmekLabs
Tourist
3 0 2

Hello!

Is there a way to just append a tag to an order using the REST API? The example here seems to imply that you can only set all tags, unfortunately this implies that:

  1. To simply append a tag, you must read the current tags, and write it all back with your new tag included
  2. If two API clients were to perform the above operation at the same, it would lead to a race condition and most likely data loss.

Is there a recommended way to simply append a tag to an order?

Thanks

Replies 3 (3)
JoeL68
Shopify Partner
12 1 1

Hi JohnCosmekLabs,

 

Did you find out if this can be done & if so how to do it? I have the exact same question and I am not finding much info about this.

 

Regards,

Joe

JohnCosmekLabs
Tourist
3 0 2

Unfortunately not, its complete silence. We may have to end up doing something hacky on our end. FWIW I still have not solved this, my old code is still kicking around and it still has a race condition in it

JoeL68
Shopify Partner
12 1 1

It looks like I am going to have to handle it as you describe it in #1. It doesn't appear to be possible any other way. It would be nice if their meta fields would be included in the customer record when retrieved via the API but it is not. 

Good luck.