# Adding multiple tags with order\_add\_tags

**URL:** <https://community.shiphero.com/t/adding-multiple-tags-with-order-add-tags/2257>\
**Category:** GraphQL API\
**Created:** [November 30, 2022, 2:09pm UTC](https://community.shiphero.com/t/adding-multiple-tags-with-order-add-tags/2257 "2022-11-30T14:09:43Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![bbarrett](https://avatars.discourse-cdn.com/v4/letter/b/e9a140/32.png) [@bbarrett](https://community.shiphero.com/u/bbarrett)\
**Post date:** [November 30, 2022, 2:09pm UTC](https://community.shiphero.com/t/adding-multiple-tags-with-order-add-tags/2257/1 "2022-11-30T14:09:43Z")

</div>

I am trying to call ‘order\_add\_tags’ to add multiple tags. I am calling ‘order\_add\_tags’ for each tag I want to add. However I am finding that every time its called it does not “add” each tag. Instead it creates one tag the first time its called and then “updates” this tag with every subsequent order\_add\_tags call. So it would appear that I can only create one tag with ‘order\_add\_tags’.

Questions:

1. Is this how the ‘order\_add\_tags’ is designed to work?

2. What is the difference between ‘order\_update\_tags’ and ‘order\_add\_tags’?

3. How do I call ‘order\_add\_tags’ to add multiple tags on the same order?

4. What is the character limit for your tags. Its not documented anywhere.

Thanks

---

<div class="post-metadata">

**Author:** ![sh-agent](https://avatars.discourse-cdn.com/v4/letter/s/e47774/32.png) [@sh-agent](https://community.shiphero.com/u/sh-agent)\
**Post date:** [November 30, 2022, 2:19pm UTC](https://community.shiphero.com/t/adding-multiple-tags-with-order-add-tags/2257/2 "2022-11-30T14:19:43Z")

</div>

Hey @bbarrett,

Thanks for reaching out! Looking into this now.  
Let me know if there’s anything I can do to assist in the meantime.

Best,  
RayanP

---

<div class="post-metadata">

**Author:** ![bbarrett](https://avatars.discourse-cdn.com/v4/letter/b/e9a140/32.png) [@bbarrett](https://community.shiphero.com/u/bbarrett)\
**Post date:** [November 30, 2022, 2:23pm UTC](https://community.shiphero.com/t/adding-multiple-tags-with-order-add-tags/2257/3 "2022-11-30T14:23:59Z")

</div>

Thanks Ryan. I should also mention that when I try to add a second tag to an order in the shiphero app I get this error:  
 ![error](https://us1.discourse-cdn.com/flex020/uploads/shiphero/original/1X/56dab36651854fcfd8f31b08145c4831a84225de.png)

Also tried calling ‘order\_add\_tags’ one time passing in all tags as one comma delimited string. The service handler removed the commas and created it as one big tag. Also truncated it to 256 characters (which is probably the max char limit).

---

<div class="post-metadata">

**Author:** ![sh-agent](https://avatars.discourse-cdn.com/v4/letter/s/e47774/32.png) [@sh-agent](https://community.shiphero.com/u/sh-agent)\
**Post date:** [November 30, 2022, 2:26pm UTC](https://community.shiphero.com/t/adding-multiple-tags-with-order-add-tags/2257/4 "2022-11-30T14:26:18Z")

</div>

Hey @bbarrett,

That’s quite odd, could I snag that order id from that screencap from you as well?

Thanks!

Best,  
RayanP

---

<div class="post-metadata">

**Author:** ![bbarrett](https://avatars.discourse-cdn.com/v4/letter/b/e9a140/32.png) [@bbarrett](https://community.shiphero.com/u/bbarrett)\
**Post date:** [November 30, 2022, 2:29pm UTC](https://community.shiphero.com/t/adding-multiple-tags-with-order-add-tags/2257/5 "2022-11-30T14:29:53Z")

</div>

/orders/details/317427628

---

<div class="post-metadata">

**Author:** ![bbarrett](https://avatars.discourse-cdn.com/v4/letter/b/e9a140/32.png) [@bbarrett](https://community.shiphero.com/u/bbarrett)\
**Post date:** [November 30, 2022, 2:37pm UTC](https://community.shiphero.com/t/adding-multiple-tags-with-order-add-tags/2257/6 "2022-11-30T14:37:36Z")

</div>

This might help with debugging as well…

I tried to use ‘order\_update\_tags’ to append tags. Im not sure if this is how its designed to work, But it did not do anything and returned.

{“data”:{“order\_update\_tags”:{“request\_id”:“63876935178da7c508074ae8”,“complexity”:5,“order”:{“id”:“T3JkZXI6MzE3NDI3NjI4”}}},“extensions”:{“throttling”:{“estimated\_complexity”:5,“cost”:5,“cost\_detail”:{“order\_update\_tags”:{“items\_count”:0,“cost”:5,“total\_cost”:5,“fields”:{}}},“user\_quota”:{“credits\_remaining”:1997,“max\_available”:2002,“increment\_rate”:30}}}}

Maybe you can use the request\_id to look for server exceptions.

---

<div class="post-metadata">

**Author:** ![bbarrett](https://avatars.discourse-cdn.com/v4/letter/b/e9a140/32.png) [@bbarrett](https://community.shiphero.com/u/bbarrett)\
**Post date:** [November 30, 2022, 5:18pm UTC](https://community.shiphero.com/t/adding-multiple-tags-with-order-add-tags/2257/7 "2022-11-30T17:18:13Z")

</div>

I figured out how to call order\_add\_tags to add multiple tags.

The “UpdateTagsInput.tags” is defined as a string in your service definition.

 ![error](https://us1.discourse-cdn.com/flex020/uploads/shiphero/original/1X/5db16934ac3022fd9fe063f2a4f7a5c53d1ddc1e.png)

However, it can really be array of strings. If you set UpdateTagsInput.tags equal to an array of strings, the service will add each array element as a separate tag. This is actually what I would have expected but your service definition is incorrect and led me to try and use this function passing in a string as the Tags (not an array of strings). I would recommend you update the service definition and also tell us what the max char limit for a single tag is (i think its 256).

Thanks.

---

<div class="post-metadata">

**Author:** ![sh-agent](https://avatars.discourse-cdn.com/v4/letter/s/e47774/32.png) [@sh-agent](https://community.shiphero.com/u/sh-agent)\
**Post date:** [November 30, 2022, 9:12pm UTC](https://community.shiphero.com/t/adding-multiple-tags-with-order-add-tags/2257/8 "2022-11-30T21:12:12Z")

</div>

Hey @bbarrett,

Thanks for pointing that out regarding the order\_add\_tags. I’ll be sure to relay that to team so it’s gets looked at. I also believe you are correct regarding the character limit.

Regarding adding tags through the UI, I believe you need to click “Enter” after typing in the tag then save tags under that.

I’ll have an update for you regarding the difference between order\_update\_tags and order\_add\_tags as soon as I can.

Thanks for your patience here!

Best,  
Rayan
