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

# Preview Product

> Fetch product details from marketplace URLs

## Endpoint

```http theme={null}
POST /v1/products/preview
```

## Request

```bash theme={null}
curl -X POST https://api.sp3ndpay.shop/v1/products/preview \
  -H "Authorization: Bearer sp3ndpay_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://www.amazon.com/dp/B0CDEMO123"}'
```

## Parameters

| Parameter | Type   | Required |
| --------- | ------ | -------- |
| `url`     | string | Yes      |

## Response

```json theme={null}
{
  "product": {
    "marketplace": "amazon",
    "title": "Wireless Headphones",
    "image_url": "https://cdn.sp3ndpay.shop/products/abc.jpg",
    "product_url": "https://www.amazon.com/dp/B0CDEMO123",
    "currency": "USD",
    "price": 89.99,
    "availability": "in_stock"
  }
}
```

## Supported URLs

**Amazon:**

```txt theme={null}
https://www.amazon.com/dp/B0CDEMO123
https://amzn.to/shortlink
```

**eBay:**

```txt theme={null}
https://www.ebay.com/itm/256000000000
```

## Errors

**Invalid URL:**

```json theme={null}
{
  "error": {
    "code": "invalid_url",
    "message": "Not a valid Amazon or eBay link"
  }
}
```

**Product Unavailable:**

```json theme={null}
{
  "error": {
    "code": "product_unavailable",
    "message": "Product is unavailable or removed"
  }
}
```

<Card title="Create Cart" icon="cart-shopping" href="/api-reference/create-cart">
  Next: Create checkout cart
</Card>
