For the complete documentation index, see llms.txt. This page is also available as Markdown.

List products

List a store's products newest first as lean summaries (name, status, thumbnail, variant count and price range).

List products

get

List a store's products newest first as lean summaries (name, status, thumbnail, variant count and price range). Prices are integers in the smallest currency unit and live on variants. Filter by status, free text or a set of product ids. Use include=variants to embed each product's variants with prices and inventory, and include=media to embed its media.

Authorizations
AuthorizationstringRequired

API Token authentication

Path parameters
store_idstringRequired

The ID of the store to list products for.

Example: store_01J8Z5F8W9K8M4A7B3C2D1E0FG
Query parameters
product_idsstring[]Optional

Restrict to these product ids. Doubles as a single-product lookup. Up to 200 ids.

qstringOptional

Free-text search over product title and SKU.

Example: blue shirt
pageintegerOptional

Page number

Example: 1
Responses
200

Success response

application/json
get/api/ecommerce/v1/stores/{store_id}/products
GET /api/ecommerce/v1/stores/{store_id}/products HTTP/1.1
Host: developers.hostinger.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "data": [
    {
      "id": "prod_01J8Z5F8W9K8M4A7B3C2D1E0FG",
      "title": "Blue T-Shirt",
      "status": "published",
      "thumbnail": "https://cdn.example.com/prod/thumb.jpg",
      "type": "physical",
      "variant_count": 3,
      "price_range": {
        "min": 1999,
        "max": 2499,
        "currency_code": "usd"
      },
      "variants": [
        {
          "id": "variant_01J8Z5F8W9K8M4A7B3C2D1E0FG",
          "title": "Medium",
          "sku": "TSHIRT-BLU-M",
          "options": [
            {
              "name": "Size",
              "value": "M"
            }
          ],
          "prices": [
            {
              "amount": 1999,
              "sale_amount": null,
              "currency_code": "usd"
            }
          ],
          "inventory_quantity": 42,
          "manage_inventory": true
        }
      ],
      "media": [
        {
          "url": "https://cdn.example.com/prod/1.jpg",
          "type": "image",
          "is_thumbnail": true
        }
      ]
    }
  ],
  "meta": {
    "current_page": 1,
    "per_page": 15,
    "total": 100
  }
}

Last updated

Was this helpful?