API: products and stock
Products are the business's: one name, one price, sold at the shops that sell them. Stock is each shop's.
Read products
GET /api/developer/v1/products?shop=ADY001&search=rice&after=0&limit=50
The key needs Products and prices · Read. Each product has id, sku, name, nameLocal (its name in the business's second language, or empty), category, price, mrp, taxRate, hsn, stock at that shop, reorderLevel and onSale. Pages of up to 200: pass the answer's nextAfter as after for the next page; it is null on the last.
GET /api/developer/v1/products/812?shop=ADY001
Change a price
PATCH /api/developer/v1/products/812
{ "shop": "ADY001", "price": 345, "mrp": 360 }
The key needs Products and prices · Change prices. A price is the same at every shop that sells the product, so the key must be given every one of them. A price above the MRP is refused. Nothing but the price and MRP can be changed here.
Read stock
GET /api/developer/v1/stock?shop=ADY001
The key needs Stock · Read. Each line has productId, sku, stock, reorderLevel and low.
Set counts
POST /api/developer/v1/stock/counts
{ "shop": "ADY001", "counts": [{ "productId": 812, "count": 41 }], "note": "Website sync" }
The key needs Stock · Set counts. Each product is set to its count, as a stocktake would, and the change is kept under the key's name. Up to 500 at once; all or none.