> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stateset.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Product

> Retrieve a single product by ID with full details including variants and inventory

### Path Parameters

<ParamField path="id" type="string" required>
  The unique identifier of the product to retrieve
</ParamField>

### Query Parameters

<ParamField query="include_inventory" type="boolean">
  Include real-time inventory data (default: true)
</ParamField>

<ParamField query="include_variants" type="boolean">
  Include all product variants (default: true)
</ParamField>

<ParamField query="warehouse_id" type="string">
  Filter inventory data by specific warehouse
</ParamField>

### Response

<ResponseField name="id" type="string">
  Unique product identifier
</ResponseField>

<ResponseField name="object" type="string">
  Always "product"
</ResponseField>

<ResponseField name="created_at" type="string">
  ISO 8601 timestamp of creation
</ResponseField>

<ResponseField name="updated_at" type="string">
  ISO 8601 timestamp of last update
</ResponseField>

<ResponseField name="name" type="string">
  Product name
</ResponseField>

<ResponseField name="sku" type="string">
  Product SKU
</ResponseField>

<ResponseField name="description" type="string">
  Product description
</ResponseField>

<ResponseField name="category" type="string">
  Product category
</ResponseField>

<ResponseField name="brand" type="string">
  Brand name
</ResponseField>

<ResponseField name="price" type="object">
  Pricing information including amount, currency, and compare\_at price
</ResponseField>

<ResponseField name="cost" type="object">
  Cost information for margin calculations
</ResponseField>

<ResponseField name="status" type="string">
  Product status: "active", "draft", or "archived"
</ResponseField>

<ResponseField name="inventory" type="object">
  Inventory settings and current levels
</ResponseField>

<ResponseField name="inventory_summary" type="object">
  Aggregated inventory data across all variants and warehouses
</ResponseField>

<ResponseField name="variants" type="array">
  Array of product variants with full details
</ResponseField>

<ResponseField name="images" type="array">
  Product images with URLs and metadata
</ResponseField>

<ResponseField name="dimensions" type="object">
  Product dimensions for shipping calculations
</ResponseField>

<ResponseField name="supplier" type="object">
  Supplier information if configured
</ResponseField>

<ResponseField name="tags" type="array">
  Array of product tags
</ResponseField>

<ResponseField name="metadata" type="object">
  Custom metadata fields
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl --location --request GET 'https://api.stateset.com/v1/products/prod_0901f083-aa1c-43c5-af5c-0a9d2fc64e30' \
  --header 'Authorization: Bearer YOUR_API_KEY'
  ```

  ```graphQL GraphQL theme={null}
  query GetProduct($id: ID!) {
    product(id: $id) {
      id
      name
      sku
      description
      category
      brand
      status
      price {
        amount
        currency
        compare_at
      }
      inventory_summary {
        total_quantity
        available_quantity
        reserved_quantity
      }
      variants {
        id
        sku
        name
        options
        inventory {
          quantity
          available
          reserved
        }
      }
      images {
        url
        alt_text
        position
      }
    }
  }
  ```

  ```javascript Node.js theme={null}
  const product = await stateset.products.retrieve(
    'prod_0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
    {
      include_inventory: true,
      include_variants: true
    }
  );
  ```

  ```python Python theme={null}
  product = stateset.products.retrieve(
      'prod_0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
      include_inventory=True,
      include_variants=True
  )
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "id": "prod_0901f083-aa1c-43c5-af5c-0a9d2fc64e30",
    "object": "product",
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-15T14:22:00Z",
    "name": "Wireless Bluetooth Headphones",
    "sku": "WBH-001",
    "description": "Premium noise-cancelling wireless headphones with 30-hour battery life",
    "category": "Electronics",
    "brand": "AudioTech",
    "status": "active",
    "price": {
      "amount": 14999,
      "currency": "USD",
      "compare_at": 19999
    },
    "cost": {
      "amount": 7500,
      "currency": "USD"
    },
    "inventory": {
      "track_inventory": true,
      "low_stock_threshold": 20,
      "allow_backorder": false
    },
    "inventory_summary": {
      "total_quantity": 150,
      "available_quantity": 145,
      "reserved_quantity": 5,
      "by_warehouse": {
        "wh_001": {
          "available": 145,
          "reserved": 5
        }
      }
    },
    "dimensions": {
      "weight": 0.5,
      "length": 8,
      "width": 7,
      "height": 3
    },
    "variants": [
      {
        "id": "var_1234567890",
        "sku": "WBH-001-BLK",
        "name": "Wireless Bluetooth Headphones - Black",
        "options": {
          "color": "Black"
        },
        "price": null,
        "inventory": {
          "quantity": 100,
          "available": 97,
          "reserved": 3
        },
        "barcode": null
      },
      {
        "id": "var_0987654321",
        "sku": "WBH-001-WHT",
        "name": "Wireless Bluetooth Headphones - White",
        "options": {
          "color": "White"
        },
        "price": null,
        "inventory": {
          "quantity": 50,
          "available": 48,
          "reserved": 2
        },
        "barcode": null
      }
    ],
    "images": [
      {
        "id": "img_abc123",
        "url": "https://example.com/images/headphones-main.jpg",
        "alt_text": "Wireless Bluetooth Headphones",
        "position": 1,
        "variant_ids": []
      }
    ],
    "supplier": null,
    "tags": ["electronics", "audio", "wireless", "bluetooth"],
    "metadata": {}
  }
  ```

  ```json Error Response (404 Not Found) theme={null}
  {
    "error": {
      "code": "RESOURCE_NOT_FOUND",
      "message": "Product not found",
      "details": {
        "resource": "product",
        "id": "prod_abc123"
      },
      "request_id": "req_abc123def456"
    }
  }
  ```

  ```json Error Response (401 Unauthorized) theme={null}
  {
    "error": {
      "code": "INVALID_API_KEY",
      "message": "The API key provided is invalid or has been revoked",
      "request_id": "req_abc123def456"
    }
  }
  ```
</ResponseExample>
