You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In an HTTP POST or PUT request, the parameters are not sent along with the URI, but in the request body. Parameters noted for each route below follow this standard.
GET /products/list
Retrieves the list of products.
Parameters
Parameter
Type
Description
page
integer
Selects the page of results to return. Default 1.
count
integer
Specifies how many results per page to return. Default 5.
Response
Status: 200 OK
[
{
"id": 1,
"name": "Camo Onesie",
"slogan": "Blend in to your crowd",
"description": "The So Fatigues will wake you up and fit you in. This high energy camo will have you blending in to even the wildest surroundings.",
"category": "Jackets",
"default_price": "140"
},
{
"id": 2,
"name": "Bright Future Sunglasses",
"slogan": "You've got to wear shades",
"description": "Where you're going you might not need roads, but you definitely need some shades. Give those baby blues a rest and let the future shine bright on these timeless lenses.",
"category": "Accessories",
"default_price": "69"
},
{
"id": 3,
"name": "Morning Joggers",
"slogan": "Make yourself a morning person",
"description": "Whether you're a morning person or not. Whether you're gym bound or not. Everyone looks good in joggers.",
"category": "Pants",
"default_price": "40"
},
// ...
]
Product Information
Returns all product level information for a specified product id.
Required ID of the Product to post the question for
Body Parameters
Parameter
Type
Description
body
text
Text of question being asked
name
text
Username for question asker
email
text
Email address for question asker
Response
Status: 201 CREATED
Add an Answer
Adds an answer for the given question
POST /qa/:question_id/answers
Parameters
Parameter
Type
Description
question_id
integer
Required ID of the question to post the answer for
Body Parameters
Parameter
Type
Description
body
text
Text of question being asked
name
text
Username for question asker
email
text
Email address for question asker
photos
[text]
An array of urls corresponding to images to display
Response
Status: 201 CREATED
Mark Question as Helpful
Updates a question to show it was found helpful.
PUT /qa/question/:question_id/helpful
Parameters
Parameter
Type
Description
question_id
integer
Required ID of the question to update
Response
Status: 204 NO CONTENT
Report Question
Updates a question to show it was reported. Note, this action does not delete the question, but the question will not be returned in the above GET request.
PUT /qa/question/:question_id/report
Parameters
Parameter
Type
Description
question_id
integer
Required ID of the question to update
Response
Status: 204 NO CONTENT
Mark Answer as Helpful
Updates an answer to show it was found helpful.
PUT /qa/answer/:answer_id/helpful
Parameters
Parameter
Type
Description
answer_id
integer
Required ID of the answer to update
Response
Status: 204 NO CONTENT
Report Answer
Updates an answer to show it has been reported. Note, this action does not delete the answer, but the answer will not be returned in the above GET request.