# Product Parts Guide

This guide covers everything you need to know about working with product parts through the Renesas Web Data API. Product parts represent the orderable components in the Renesas catalog, including microcontrollers, analog ICs, power management ICs, and more.

## Overview

The Product Parts API provides access to detailed information about electronic components, including:

- Technical specifications and parametric attributes
- Pricing and availability information
- Package details and dimensions
- Regulatory compliance data
- Lifecycle status and alternatives


## Base Endpoints

- **GET** `/product-parts` - Retrieve a list of product parts with filtering and pagination
- **GET** `/product-parts/{id}` - Get detailed information about a specific product part


## Retrieving Product Parts

### Basic Request

Get a list of product parts with default pagination:

```bash
curl -H "x-api-key: YOUR_API_KEY" \
  "https://api.renesas.com/web-data/v1/product-parts"
```

### Pagination

Control the number of results and implement pagination:

```bash
curl -H "x-api-key: YOUR_API_KEY" \
  "https://api.renesas.com/web-data/v1/product-parts?limit=50&offset=2"
```

**Parameters:**

- `limit`: Number of results (1-100, default: 10)
- `offset`: Page number for pagination (default: 0)


The response includes pagination information:

```json
{
  "data": [...],
  "pagination": {
    "offset": 2,
    "limit": 50,
    "total": 8973,
    "has_more": true
  }
}
```

## Filtering Options

### By Part Number

**Exact part number:**

```bash
curl -H "x-api-key: YOUR_API_KEY" \
  "https://api.renesas.com/web-data/v1/product-parts?part_number=R5F571MGCDFB"
```

**Part number prefix:**

```bash
curl -H "x-api-key: YOUR_API_KEY" \
  "https://api.renesas.com/web-data/v1/product-parts?part_number_prefix=R5F52"
```

### By Status

Filter parts by their lifecycle status:

```bash
curl -H "x-api-key: YOUR_API_KEY" \
  "https://api.renesas.com/web-data/v1/product-parts?part_status=Active"
```

**Available statuses:**

- `Active` - Currently available for new designs
- `Preview` - Pre-production or preview status
- `NRND` - Not Recommended for New Designs
- `Obsolete` - No longer manufactured


### By Product Family

```bash
curl -H "x-api-key: YOUR_API_KEY" \
  "https://api.renesas.com/web-data/v1/product-parts?product_family=RX"
```

### By Generic Product ID

Find all variants of a specific product:

```bash
curl -H "x-api-key: YOUR_API_KEY" \
  "https://api.renesas.com/web-data/v1/product-parts?generic_product_id=RX71M"
```

## Sorting

Sort results by various fields:

```bash
curl -H "x-api-key: YOUR_API_KEY" \
  "https://api.renesas.com/web-data/v1/product-parts?order=part_number&orderDirection=asc"
```

**Sort options:**

- `last_updated` - Last update date (default)
- `part_number` - Alphabetical by part number
- `part_status` - By lifecycle status
- `1ku_price` - By 1K unit pricing
- `stock` - By availability


**Multiple sorting:**

```bash
curl -H "x-api-key: YOUR_API_KEY" \
  "https://api.renesas.com/web-data/v1/product-parts?order=part_status,1ku_price&orderDirection=desc,asc"
```

## Response Structure

### Product Part Object

```json
{
  "orderableId": "R5F571MGCDFB#10",
  "productCategory": "Microcontrollers & Microprocessors",
  "firstProductSubcategory": "RX 32-Bit Performance/Efficiency MCUs",
  "genericId": "RX71M",
  "genericTitle": "High Performance Real-time Engine 32-bit Microcontrollers",
  "genericUrl": "https://www.renesas.com/en/products/rx71m",
  "productFamily": "RX",
  "1kuPrice": 13.43121,
  "status": "Active",
  "type": "LFQFP",
  "description": "32-bit microcontroller capable of up to 240 MHz operation",
  "class": "IC",
  "leadCount": 144,
  "dimensions": {
    "length": 20.0,
    "width": 20.0,
    "thickness": 1.7,
    "pitch": 0.5
  },
  "peakReflowTemperature": "260°C",
  "leadFree": true,
  "partAvailability": true
}
```

### Key Fields Explained

**Identification:**

- `orderableId`: Unique part number for ordering (includes package/variant suffix)
- `genericId`: Base product identifier (family identifier)
- `productFamily`: Product line (RX, RA, RZ, etc.)


**Categorization:**

- `productCategory`: High-level category
- `firstProductSubcategory`: More specific subcategory
- `status`: Lifecycle status


**Physical Properties:**

- `dimensions`: Package dimensions in millimeters
- `leadCount`: Number of pins/leads
- `type`: Package type (LFQFP, BGA, etc.)


**Pricing & Availability:**

- `1kuPrice`: Price per 1000 units in USD
- `partAvailability`: Current availability status
- `sampleable`: Whether samples are available


## Advanced Features

### Parametric Attributes

Each product part includes detailed parametric data:

```json
{
  "parametricAttributes": [
    {
      "productPartAttributeId": "field__bit_length",
      "attributeName": "Bit Length",
      "attributeValues": ["32"],
      "href": "/product-part-attributes/field__bit_length"
    },
    {
      "productPartAttributeId": "field__supply_voltage_v",
      "attributeName": "Supply Voltage",
      "attributeValues": [{"from": "2.7", "to": "3.6"}],
      "href": "/product-part-attributes/field__supply_voltage_v"
    }
  ]
}
```

### Packaging Information

Detailed packaging and handling information:

```json
{
  "packaging": {
    "carrierType": "Tape & Reel",
    "packageCode": "PLQP0144KA-A",
    "pbFreeCategory": "Pb-Free 100% Matte Tin",
    "quantityPerReel": 1000,
    "reelSize": "13 inch",
    "packageUrl": "https://www.renesas.com/en/package/pkg9398",
    "packageDescription": "144-pin low-profile quad flat package"
  }
}
```

### Regulatory Compliance

Environmental and regulatory information:

```json
{
  "regulatory": {
    "htsus": "8542.31.0025",
    "eccn": "3A991.a.2",
    "moistureSensitivityLevel": "3",
    "rohsCompliant": true,
    "chinaRohsCompliant": true,
    "hazardousMaterials": {
      "mercury": false,
      "lead": false,
      "halogen": false
    }
  }
}
```

## Getting Individual Product Parts

Retrieve detailed information about a specific part:

```bash
curl -H "x-api-key: YOUR_API_KEY" \
  "https://api.renesas.com/web-data/v1/product-parts/R5F571MGCDFB#10"
```

## Common Use Cases

### Finding Microcontrollers by Core

```bash
# Find all RX series 32-bit MCUs
curl -H "x-api-key: YOUR_API_KEY" \
  "https://api.renesas.com/web-data/v1/product-parts?product_family=RX&part_status=Active"
```

### Price Range Analysis

```bash
# Get parts sorted by price for budget analysis
curl -H "x-api-key: YOUR_API_KEY" \
  "https://api.renesas.com/web-data/v1/product-parts?order=1ku_price&orderDirection=asc&limit=100"
```

### Package Compatibility

```bash
# Find all parts in a specific package type
curl -H "x-api-key: YOUR_API_KEY" \
  "https://api.renesas.com/web-data/v1/product-parts?generic_product_id=RX71M"
```

### EOL Planning

```bash
# Find parts approaching end-of-life
curl -H "x-api-key: YOUR_API_KEY" \
  "https://api.renesas.com/web-data/v1/product-parts?part_status=NRND"
```

## Error Handling

Handle common error scenarios:

**404 - Part Not Found:**

```json
{
  "error": "Product part with ID 'INVALID123' not found"
}
```

**400 - Invalid Parameters:**

```json
{
  "error": "Invalid part_status value. Must be one of: Active, Preview, NRND, Obsolete"
}
```

## Best Practices

1. **Use Pagination**: Always implement pagination for large result sets
2. **Cache Results**: Cache product data appropriately to reduce API calls
3. **Filter Early**: Use specific filters to reduce response size
4. **Monitor Status**: Track lifecycle status changes for your BOM
5. **Handle Nulls**: Many fields can be null or empty - handle gracefully


## Integration Examples

### Python Example

```python
import requests

def get_parts_by_family(family, api_key, limit=50):
    url = "https://api.renesas.com/web-data/v1/product-parts"
    headers = {"x-api-key": api_key}
    params = {
        "product_family": family,
        "part_status": "Active",
        "limit": limit
    }
    
    response = requests.get(url, headers=headers, params=params)
    if response.status_code == 200:
        return response.json()
    else:
        response.raise_for_status()

# Usage
parts = get_parts_by_family("RX", "your-api-key")
print(f"Found {parts['pagination']['total']} active RX parts")
```

### JavaScript Example

```javascript
async function searchParts(partPrefix, apiKey) {
    const url = new URL('https://api.renesas.com/web-data/v1/product-parts');
    url.searchParams.append('part_number_prefix', partPrefix);
    url.searchParams.append('limit', '25');
    
    const response = await fetch(url, {
        headers: {
            'x-api-key': apiKey
        }
    });
    
    if (!response.ok) {
        throw new Error(`API error: ${response.status}`);
    }
    
    return await response.json();
}
```

## Next Steps

- Learn about [Documents API](/guides/documents) to access datasheets and technical documentation
- Explore [Authentication](/guides/authentication) for API key management
- Check the full API reference for additional parameters and response fields