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
Details
This endpoint should follow the pattern of GET /api/v0/vendors/:id
If a valid vendor id is passed in, a JSON object is sent back with a top-level data key that points to the vendor resource with that id, and all attributes for that vendor.
If an invalid vendor id is passed in, a 404 status as well as a descriptive error message should be sent back in the response.
Details
This endpoint should follow the pattern of GET /api/v0/vendors/:id
If a valid vendor id is passed in, a JSON object is sent back with a top-level data key that points to the vendor resource with that id, and all attributes for that vendor.
If an invalid vendor id is passed in, a 404 status as well as a descriptive error message should be sent back in the response.
Example #1 😁
Request:
GET /api/v0/vendors/55297
Content-Type: application/json
Accept: application/json
Response: status: 200
{
"data": {
"id": "55297",
"type": "vendor",
"attributes": {
"name": "Orange County Olive Oil",
"description": "Handcrafted olive oil made from locally grown olives",
"contact_name": "Syble Hamill",
"contact_phone": "1-276-593-3530",
"credit_accepted": false
}
}
}
Request:
Response: status: 404
{
"errors": [
{
"detail": "Couldn't find Vendor with 'id'=123123123123"
}
]
}
The text was updated successfully, but these errors were encountered: