Get product questions and answers
This API method retrieves all questions and answers for a given product ID
https://api.e-food.nl/v2/product-menu/{productId}?cityName={cityName}&storeName={storeName}
GET Request
The request contains the store and city name as identifier, and the product ID for which the extras should be returned.
| Field name | Type | Required | Description |
|---|---|---|---|
CityName |
string | Y | The name of the city |
StoreName |
string | Y | The name of the store |
ProductId |
int | Y | The ID of the product |
Sample request
This sample request fetches all questions and answers for product 12345 in store bar in city foo
https://api.e-food.nl/v2/product-menu/12345?cityName=foo&storeName=bar
Response
The response returns a ProductMenuDto. If no questions are present for the given product ID, an empty collection will be returned inside the ProductMenuDto object.
- The question with sort 0 should be shown first or on top
- The next question - after the user selects an answer - can be determined by the
nextQuestionID in the ProductMenuAnswerDto - A price is optional ProductMenuAnswerDto
Sample response
{
"questions": [
{
"id": 100,
"text": "Hoeveel burgers wilt u?",
"sort": 0,
"answers": [
{
"id": 1,
"text": "1 Burger",
"price": 120,
"nextQuestion": 101,
"linkId": 0,
"linkNo": "FOO1"
},
{
"id": 2,
"text": "2 Burgers",
"price": 180,
"nextQuestion": 101,
"linkId": 22,
"linkNo": "FOO2"
}
],
"answer": null
},
{
"id": 101,
"text": "Wilt u sla op uw burger?",
"sort": 1,
"answers": [
{
"id": 3,
"text": "Sla",
"price": null,
"nextQuestion": 102,
"linkId": 0,
"linkNo": null
},
{
"id": 4,
"text": "Geen sla",
"price": null,
"nextQuestion": 102,
"linkId": 0,
"linkNo": null
}
],
"answer": null
},
{
"id": 102,
"text": "Wilt u tomaat en komkommer?",
"sort": 2,
"answers": [
{
"id": 5,
"text": "Tomaat",
"price": 10,
"nextQuestion": null,
"linkId": 55,
"linkNo": "FOO5"
},
{
"id": 6,
"text": "Komkommer",
"price": 10,
"nextQuestion": null,
"linkId": 66,
"linkNo": "FOO6"
},
{
"id": 7,
"text": "Geen",
"price": null,
"nextQuestion": null,
"linkId": 0,
"linkNo": null
},
{
"id": 8,
"text": "Tomaat& Komkommer",
"price": 30,
"nextQuestion": null,
"linkId": 88,
"linkNo": "FOO8"
}
],
"answer": null
}
]
}