Get Products - Venddor API

← Back to API Documentation
GET {{baseUrl}}/Products/{product_id}

This endpoint retrieves a list of products or a specific product's details.

Path Parameters

Parameter Type Description
product_id string ID of the product to retrieve (optional). If not provided, a list of products will be returned.

Query Parameters

Parameter Type Required Description
items_per_page number No Number of items to return per page. Default: 20.
page number No Page number to retrieve. Default: 1.

Request Headers

Header Value Description
Authorization Basic Auth Base64 encoded username:password combination

Example Request

GET {{baseUrl}}/Products/973732?items_per_page=10&page=1

Response

The endpoint returns either a list of products or detailed information about a specific product.

Example Response (Single Product)

{
  "product_id": "973732",
  "product": "Disney Kids Shoes",
  "product_code": "7891404130314",
  "amount": 230,
  "price": "89.90",
  "status": "A",
  "description": "Comfortable shoes for kids with Disney characters design",
  "weight": "180",
  "brand": "Disney",
  "category_ids": [
    "1384",
    "1792"
  ],
  "main_category": "1384",
  "images": [
    {
      "image_id": "3877",
      "image_path": "https://example.com/images/product1.jpg"
    }
  ],
  "features": {
    "16": "94",
    "14": "95",
    "20": "Kids",
    "18": "Disney",
    "9": "36.6cm",
    "8": "23.6cm",
    "19": "31.7cm",
    "4": "0.41kg",
    "7": "PVC"
  }
}

Example Response (Product List)

{
  "products": [
    {
      "product_id": "973732",
      "product": "Disney Kids Shoes",
      "product_code": "7891404130314",
      "amount": 230,
      "price": "89.90",
      "status": "A"
    },
    {
      "product_id": "973733",
      "product": "Marvel Kids Shoes",
      "product_code": "7891404130315",
      "amount": 180,
      "price": "94.90",
      "status": "A"
    }
  ],
  "pagination": {
    "total": 42,
    "per_page": 10,
    "current_page": 1,
    "last_page": 5
  }
}

Product Status Codes

Status Code Description
A Active - Product is active and visible for purchase
D Disabled - Product is deactivated and not visible
H Hidden - Product is accessible only via direct link
Tip: When retrieving a list of products, you can use pagination parameters to manage the response size and improve performance, especially when dealing with a large number of products.