Stock

Get Products

GET /stock
Parameter Default Description
from empty

From which offset you want to retrive products.

to 1000

Upto how many products do you want to load

search empty

Search a term in the products.

sort id

Sort by: name, date or update.

order d

Order by: d for descending, a for ascending

id empty

An id, will find your product in the query no matter if it is inside the filter or not.

Return:
Returns array of stock items in JSON format.

Create Product

POST /stock
Parameter Default Description
fields mandatory

Product values in an key value pair and in JSON format.
Eg. {“Name”:”Kapil”,Phone”:”903943434″}

Return:
id and abid(activityboardid) in JSON format. 0 if failed.

Update Product

PUT /stock/details/:id
Parameter Default Description
id mandatory

Product ID

fields mandatory

Product values in an key value pair and in JSON format.
Eg. {“Name”:”Kapil”,”Phone”:”903943434″}

Note: This should include not only changed fields but also all the unchanged fields too.

Return:
Doesn't return anything.

Delete Product

DELETE /stock/:id
Parameter Default Description
id mandatory

Product ID

Return:
Doesn't return anything.