Fetch Restaurant Detail Info
Example code is provided for both JavaScript , along with a response schema.
Route Schema (URL)
https://api.pewds.vercel.app/foodpanda/restaurant/{id}?type={type}path Parameters.
| Parameter | Type | Description | Required? | Default |
|---|---|---|---|---|
| id | string | ID of selected Restaurant. | Yes | N/A |
Query Parameters.
| Parameter | Type | Description | Required? | Default |
|---|---|---|---|---|
| type | string | Available types (2): "delivery" "pickup" | No | N/A |
Request Samples
import axios from "axios";
// Example request using no paramters
const url = "https://api.pewds.vercel.app/foodpanda/restaurant/s4jr?type=pickup";
const data = async () => {
try {
const { data } = await axios.get(url);
return data;
} catch (err) {
throw new Error(err.message);
}
};
console.log(data);Response Schema
MIME Type: application/json
[
{
"total": string,
"items": [
{
},
{
}
]
}
]