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

# Shop Products

> Create, read, update, and delete shop products via the Management API

# Shop Products

A shop product links a product to a shop (for example a Shopify product).

**Read permission:** `product:read`\
**Write permission:** `product:write`

## List Shop Products

```bash theme={null}
GET /v1/management/shop-products
```

<ParamField query="page" type="integer" default="0">
  Page number (0-indexed)
</ParamField>

<ParamField query="limit" type="integer" default="50">
  Number of shop products per page
</ParamField>

<ParamField query="shop_uid" type="string">
  Filter to a single shop
</ParamField>

```bash theme={null}
curl -X GET "https://api.rxscale.com/v1/management/shop-products?shop_uid=shop-001" \
  -H "X-API-Key: your-api-key-here"
```

## Create Shop Product

```bash theme={null}
POST /v1/management/shop-products
```

Required: `product_uid`, `shop_uid`. Optional: `external_id`, `external_status`.

```bash theme={null}
curl -X POST "https://api.rxscale.com/v1/management/shop-products" \
  -H "X-API-Key: your-api-key-here" \
  -H "Content-Type: application/json" \
  -d '{
    "product_uid": "prod-abc123",
    "shop_uid": "shop-001",
    "external_id": "shopify-product-456",
    "external_status": "active"
  }'
```

Returns HTTP 201. On create, `external_status` is stored in uppercase. Creating a second shop product for a `product_uid` that is already linked to the same `shop_uid` returns HTTP 409.

One shop product per product, within a shop: if the shop already lists that `product_uid`,
the request is refused with HTTP 409 and nothing is created. The same product may of
course be listed in as many different shops as you like.

## Get / Update / Delete Shop Product

```bash theme={null}
GET    /v1/management/shop-products/{shop_product_uid}
PATCH  /v1/management/shop-products/{shop_product_uid}
DELETE /v1/management/shop-products/{shop_product_uid}
```

Updatable fields: `product_uid`, `external_id`, `external_status`. Delete returns HTTP 204 and also deletes connected shop SKUs.

Relinking to a `product_uid` the shop already lists is refused with HTTP 409. Clearing it
(`"product_uid": null`) is refused with HTTP 400 while shop SKUs under this shop product
still point at the old product's SKUs — unlink or delete those first, so no listing is
left describing a product it no longer names.
