Toggle Sidebar
Get Products by User ID
Retrieve all products associated with a specific user by providing their unique user ID. This endpoint returns the price and details of each product created or owned by the user. Useful for displaying user-specific items or managing inventory tied to a user's account.
Requirements
userIdis required.
Usage
Request
- Method:
GET - Path:
/users/{userId}/products
Path Parameters
| Name | Type | Required | Example | Description |
|--------|--------|----------|---------|-------------|
| userId | string | Yes | 3fa85f64-5717-4562-b3fc-2c963f66afa6 | Unique user ID (UUID). |
Example
curl -X GET "https://api.example.com/users/3fa85f64-5717-4562-b3fc-2c963f66afa6/products"
Response
200 OK
Returns a standard API envelope where the products list is returned directly in data (array).
Example:
{
"status": true,
"path": "string",
"statusCode": 0,
"message": "string",
"data": [
{
"is_onsale": true,
"id": "string",
"title": "string",
"slug": "string",
"thumbnail_image": "string",
"price": 0,
"avg_rating": "string",
"total_reviews": 0,
"total_sales": 0,
"global_ranking": 0,
"genre_ranking": 0,
"is_wishlist": true,
"is_featured": true,
"mrp": 0,
"creator": {
"full_name": "string",
"user_name": "string",
"email": "user@example.com",
"profile_image": "string",
"is_online": true,
"level": "string"
}
}
]
}
Notes
- Unlike other list endpoints, the product list is returned directly as an array in
data(notdata.data). avg_ratingis returned as a string in this response.- The
creatorobject contains basic seller/author information for each product.