question

andymeer avatar image
andymeer asked Bryanne Vega answered

Updating Stock

Hi All

I am a UK SQL developer and I have a client who has 24 clover POS tills in 24 stores; each of the 24 stores has over 800 items within the store with more items being added all the time.

The problem for them is that it is taking many many man hours per day to keep the stocks updated through the online manager; so they have asked me to take a look.

My idea is that I download the items form each store and check against a local SQL table which items need more stock sending to the store; I then produce a picking list for the guys to get the items. This first part is just about finished; I am getting the current stock level for the stores using; I am using this method (even though It does say not to if it is feasible not to) because this code does not leave the local server I just call the

https://api.eu.clover.com/v3/merchants/???????????/item_stocks/xxxxxxxxxxxxx?access_token=???????-xxxx-xxxxx-xxxxx-???????????

This is working well and within 5mins of making the call to my program I have a picking list ready for the user; so what I need to do now is upload the stock adjustments back to the store sadly this is where my JSON etc knowledge lets me down !! so I would really like to know if there is an equivalent upload to the way I am downloading the products and if there is would somebody be kind enough be kind enough to give me the syntax of how I might do this; and if not would somebody give me an example of how I might accomplish this task

Kind Regards

Andy Meer

10 |2000

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

1 Answer

Bryanne Vega avatar image
Bryanne Vega answered

Post a JSON object like this:

{
  "item": {
    "id": ""
  },
  "quantity": 0,
  "stockCount": "long"
}

To: https://api.clover.com:443/v3/merchants/(merchant id)/item_stocks/(item id)

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