Is it possible to update the stock count of an inventory item? Can't find a decent example of how to do this.
Yes it is possible to update the stock count. I don't know if you are trying to do this using the web REST API or the android SDK. With the web REST API take a look at /v3/merchants/{mId}/item_stocks/{itemId}
in the docs https://www.clover.com/api_docs#!/inv... . For Android look at InventoryConnector#updateItemStock
at https://github.com/clover/clover-andr... .
With the REST API here is an example of the JSON you would use, for some reason it is not documentated correctly on the website:
{
"elements": [
{
"item" : { "id" : "YKRTKCK2WY83Y" },
"stockCount" : 7
},
{
"item" : { "id" : "NAK8TWEX1G8YT" },
"stockCount" : 8
}
]
}
Is there a cURL example I can use...I have been trying to get the following to work (based of https://docs.clover.com/build/web-app...) : url -s -X POST "https://api.clover.com/v3/merchants/[merchat id]/item_stocks/[item id]" --header "Authorization: Bearer [access token]" --data "{"item": {"id": "[item id]"},"quantity": 50}" | python -mjson.tool
Keep getting: { "message": "Unable to read Form request data. Did you mean to use the application/json content type?" }
2 People are following this question.