question

jysung100 avatar image
jysung100 asked David Marginian Deactivated edited

Adding an item to inventory and associating existing tax fails in production

I am trying to add new item and attach taxes to it.

1. `v3/merchants/mId/items`

2. and then `v3/merchants/mId/tax_rate_items` with the new item ID and tax ID.

This all work in sandbox but in production, it seems to sometimes fail to attach tax to an item even though API calls succeed without any warning or error.


There seems to be no documentation around `tax_rate_items` API, is there another more reliable way to attach taxes?



InventoryTaxes
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

David Marginian avatar image
David Marginian Deactivated answered jysung100 edited

Are you certain you are getting a 200 back from the API? Is it possible you are getting rate-limited (API returning a 429) - https://docs.clover.com/docs/api-usage-rate-limits. What is your app id/name? Can you provide the details of specific request that didn't work so that we can look into this? Please provide the details as a private comment - https://community.clover.com/articles/10851/introducing-private-comments.html.

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

David Marginian avatar image
David Marginian Deactivated answered David Marginian Deactivated edited

The calls appear to be working correctly. The tax rate and item are properly associated.

The API isn't going to return all of the items to you (since there are a lot of items associated with that rate). The default limit is set to return 100 items. If you want all the items you need to make several requests and filter/paginate - https://docs.clover.com/docs/paginating-elements and https://docs.clover.com/docs/applying-filters. If you just want to make sure a single item is associated with a single rate then filter based on the item's id.

That being said it looks like you have an app that is intended for multiple merchants (ButterBuy) and you are using merchant tokens. This IS A VIOLATION of our terms. You need to have a Clover App and go through our approval process - https://docs.clover.com/docs/developer-app-approval.

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community