Skip to content
jradi3 edited this page Jul 18, 2012 · 9 revisions

Products

Method Auth? URL
GET false /product/

get all products

in case of success

http 200 code
{"sold":"","showPrice":"true","currency":"BRL","categorias":"{}","valorEsperado":"99","descricao":"some text","nome":"title of product","idEstado":"1","idPessoa":"6","id":"89"}

in case of any credential error

http 400 code
{"message":"invalid params"}

</td> 
GET false /product?cateogry=:category
get all products given a category
GET false /product/:garage
get all garage's products
POST false /product

Save a new product

Dictionary structure :
*idUser,
*token,
*product:params {*idPessoa, valorEsperado, descricao, *nome, *idEstado, *idUser, categories, newPhotos, currency}
(
)obligatory

in case of any credential error

http 401 code
{"message":"you must send a valid token"}
{"message":"you dont have permission"}

any other error

http 400 code
{"message":"invalid params"}

in case of success

http 200 code

PUT false /product/:id

in case of any credential error

http 401 code
{"message":"you dont have permission"}

any other error

http 400 code
{"message":"invalid params"}

DELETE false /product/:id

remove some product

http 401 code
{"message":"you dont have permission"}

any other error

http 400 code
{"message":"invalid params"}

Clone this wiki locally