question

bw12 avatar image
bw12 asked Alan answered

Trouble updating tax rates assigned to items via REST API

Currently attempting to update tax rate assignments to individual items by POSTing to this endpoint /v3/merchants/{mid}/items/{itemId}?expand=taxRates

I’ve been able to update product’s cost, prices, etc using this enpoint, but am unable to adjust tax rates. I’m passing the correct access code and Content-Type header (application/json) along with the request, and have write privileges. I’m guessing that there is something wrong with the json content here, or that I am posting to the wrong endpoint to edit tax rates.

Below is a sample of the POSTed json, where ‘CNRG5BS49PX6Y’ is the taxId associated with the ‘Home’ category, and ‘ZWK696X4EJY8C’ is an existing product with no tax rate assigned. Curious how to solve this problem, as I’ve taken a look at the API reference and this seems like it should work - thanks in advance to anybody with any guidance!

{ "price": "1050", "taxRates": [ { "isDefault": false, "rate": "1025000", "name": "Home", "id": "CNRG5BS49PX6Y", "items": [ { "id": "ZWK696X4EJY8C" } ] } ] }

1 comment
10 |2000

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

gerardo avatar image gerardo commented ·

Did anyone provide resolution to this issue?

0 Likes 0 ·

1 Answer

Alan avatar image
Alan answered
You need to use the object association APIs for associating items with each other https://docs.clover.com/build/web-api/#object-associations
10 |2000

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