> ## 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 SKUs

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

# Shop SKUs

A shop SKU links a SKU to a shop (and a shop product). Prices are in **euro cents**.

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

## List Shop SKUs

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

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

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

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

<ParamField query="search" type="string">
  Prefix search on shop variation ID or external shop SKU
</ParamField>

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

## Create Shop SKU

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

Required: `shop_uid`, `shop_product_uid`, `price`. Optional: `sku_uid`, `shop_sku`, `shop_variation_id`, `image_url`, `last_synced_stock`.

```bash theme={null}
curl -X POST "https://api.rxscale.com/v1/management/shop-skus" \
  -H "X-API-Key: your-api-key-here" \
  -H "Content-Type: application/json" \
  -d '{
    "shop_uid": "shop-001",
    "shop_product_uid": "sp-345",
    "sku_uid": "sku-456",
    "shop_sku": "shopify-variant-123",
    "shop_variation_id": "gid://shopify/ProductVariant/123",
    "price": 1299
  }'
```

Returns HTTP 201. `shop_product_uid` must belong to the given `shop_uid`. Creating a second shop SKU for a `sku_uid` or `shop_variation_id` that is already linked to the same `shop_uid` returns HTTP 409.

One shop SKU per SKU and per variation ID, within a shop: if the shop already has a live
shop SKU for that `sku_uid`, or one carrying that `shop_variation_id`, the request is
refused with HTTP 409 and nothing is created. A second mapping would not add a listing —
it would make the price and the SKU an incoming order resolves to ambiguous. Update the
existing shop SKU instead, or delete it first. Two different shops may of course carry
the same SKU and the same variation ID.

## Get / Update / Delete Shop SKU

```bash theme={null}
GET    /v1/management/shop-skus/{shop_sku_uid}
PATCH  /v1/management/shop-skus/{shop_sku_uid}
DELETE /v1/management/shop-skus/{shop_sku_uid}
```

Updatable fields: `sku_uid`, `shop_sku`, `shop_variation_id`, `price`, `image_url`, `last_synced_stock`. Delete returns HTTP 204.

A `sku_uid` or `shop_variation_id` that another live shop SKU of the same shop already
carries is refused with HTTP 409, for the reason above. Re-sending the shop SKU's own
current values is always accepted.
