# Change a variant's SKU, options, weight, tax class, cost or price floor

`PATCH /shop/variants/{id}` · Rivier · shop

Change a variant's SKU, options, weight, tax class, cost or price floor.

- Scope: shop:admin
- Sdk: shop.variant.update
- Cli: shop variant update

## Parameters

- `id` (path, required), string

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "sku": {
      "type": "string",
      "minLength": 1,
      "maxLength": 80
    },
    "gtin": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 20
        },
        {
          "type": "null"
        }
      ]
    },
    "mpn": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 60
        },
        {
          "type": "null"
        }
      ]
    },
    "options": {
      "type": "object",
      "additionalProperties": {
        "type": "string",
        "maxLength": 80
      }
    },
    "weightG": {
      "type": "integer",
      "minimum": 0,
      "maximum": 1000000
    },
    "taxClass": {
      "type": "string",
      "minLength": 1,
      "maxLength": 40
    },
    "costMinor": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        {
          "type": "null"
        }
      ]
    },
    "priceFloorMinor": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        {
          "type": "null"
        }
      ]
    },
    "position": {
      "type": "integer",
      "minimum": 0,
      "maximum": 10000
    }
  },
  "additionalProperties": false
}
```

## Responses

- `200`: Success
- `400`: The request was malformed
- `401`: No valid credential
- `403`: The credential lacks the scope, origin or address
- `429`: Over the key's rate limit; see Retry-After

## Example

```sh
curl -X PATCH 'https://api.rivier.ai/shop/variants/{id}' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "sku": "string",
  "gtin": "string",
  "mpn": "string",
  "options": {},
  "weightG": 0,
  "taxClass": "string",
  "costMinor": 0,
  "priceFloorMinor": 0
}'
```
