# Make a variant a bundle of other variants

`PUT /shop/bundles` · Rivier · shop

Make a variant a bundle of other variants.

- Scope: shop:admin
- Sdk: shop.bundle.set
- Cli: shop bundle set

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "bundleVariantId": {
      "type": "string",
      "format": "uuid"
    },
    "components": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "variantId": {
            "type": "string",
            "format": "uuid"
          },
          "quantity": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1000
          }
        },
        "required": [
          "variantId",
          "quantity"
        ],
        "additionalProperties": false
      },
      "minItems": 1,
      "maxItems": 30
    }
  },
  "required": [
    "bundleVariantId",
    "components"
  ],
  "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 PUT 'https://api.rivier.ai/shop/bundles' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "bundleVariantId": "string",
  "components": [
    {
      "variantId": "string",
      "quantity": 0
    }
  ]
}'
```
