Home - YoussefMRefaat/timezone GitHub Wiki
All requests' headers are expected to contain
{
"Content-Type" : "application/json",
"Accept" : "application/json"
}
If the request has an authentication token it should be presented in the header as
{ "Authorization" : ":token" }
/api/shop/new
GET
None
None
Code: 200
Content: {"Message":"Watches have been retrieved successfully","Data":[{"id": :id,"name": :name,"description": :description,"image": :image,"price": :price } , {"id": :id,"name": :name,"description": :description,"image": :image,"price": :price} ...]}
None
/api/shop/highest
GET
None
None
Code: 200
Content: {"Message":"Watches have been retrieved successfully","Data":[{"id": :id,"name": :name,"description": :description,"image": :image,"price": :price } , {"id": :id,"name": :name,"description": :description,"image": :image,"price": :price} ...]}
None
/api/shop/lowest
GET
None
None
Code: 200
Content: {"Message":"Watches have been retrieved successfully","Data":[{"id": :id,"name": :name,"description": :description,"image": :image,"price": :price } , {"id": :id,"name": :name,"description": :description,"image": :image,"price": :price} ...]}
None
/api/shop/popular
GET
None
None
Code: 200
Content: {"Message":"Watches have been retrieved successfully","Data":[{"id": :id,"name": :name,"description": :description,"image": :image,"price": :price } , {"id": :id,"name": :name,"description": :description,"image": :image,"price": :price} ...]}
None
/api/shop/:id
GET
id=[integer]
None
Code: 200
Content: {"Message":"Watch has been retrieved successfully", "Data":{ "id": :id,"name": :name,"description": :description,"image": :image,"price": :price,"in_cart: :number}}
in_cart
is the quantity of this watch in the user's cart.0
means the watch isn't in the cart or the user is not authenticated.
Code: 404
Content: { "Message" => "Watch not found" }