Fetch Product Info
Example code is provided for both JavaScript , along with a response schema.
Route Schema (URL)
https://api.pewds.vercel.app/daraz/product/:idPath Parameters
| Parameter | Type | Description | Required? | Default |
|---|---|---|---|---|
| id | string | This is the ID of the product that will be returned in the function. Example: "266816450" | Yes | N/A |
Request Samples
import axios from "axios";
const url = "https://api.pewds.vercel.app/daraz/product/223866897";
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
[
{
id: "string",
title: "string",
uploadedAt: "string",
intro: "string",
description: "string",
thumbnail: "string",
url: "string"
}
]