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/markets/:id.
If a valid market id is passed in, all market attributes, as well as a vendor_count should be returned.
If an invalid market 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/markets/322458
Content-Type: application/json
Accept: application/json
Response: status: 200
{
"data": {
"id": "322458",
"type": "market",
"attributes": {
"name": "14&U Farmers' Market",
"street": "1400 U Street NW ",
"city": "Washington",
"county": "District of Columbia",
"state": "District of Columbia",
"zip": "20009",
"lat": "38.9169984",
"lon": "-77.0320505",
"vendor_count": 1
}
}
}
Details:
This endpoint should follow the pattern of GET /api/v0/markets/:id.
If a valid market id is passed in, all market attributes, as well as a vendor_count should be returned.
If an invalid market id is passed in, a 404 status as well as a descriptive error message should be sent back in the response.
example 1
Request:
Response: status: 200
{
"data": {
"id": "322458",
"type": "market",
"attributes": {
"name": "14&U Farmers' Market",
"street": "1400 U Street NW ",
"city": "Washington",
"county": "District of Columbia",
"state": "District of Columbia",
"zip": "20009",
"lat": "38.9169984",
"lon": "-77.0320505",
"vendor_count": 1
}
}
}
Example #2 😭
Request:
Response: status: 404
{
"errors": [
{
"detail": "Couldn't find Market with 'id'=123123123123"
}
]
}
The text was updated successfully, but these errors were encountered: