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

# Version config

> Read and change a version's general settings, props, theme and messages from the terminal, with a before/after preview and a guard for live versions

These commands edit what the four tabs of a [version page](https://docs.ollie.shop/ollie-shop/configuration/versions.md#the-version-page) edit: **General**, **Props**, **Theme** and **Messages**. They follow the same rules as the Admin, and the checkout picks the change up on its next page load.

```bash theme={"system"}
ollieshop version get     --version-id <uuid>
ollieshop version update  --version-id <uuid> [--name <name>] [--template <name>] [--active true|false] [--default true|false]
ollieshop version patch   --version-id <uuid> --data '<json>'
ollieshop version clone   --version-id <uuid> [--name <name>]

ollieshop props    get|set|unset --version-id <uuid> ...
ollieshop theme    get|set|unset --version-id <uuid> ...
ollieshop messages get|set|unset --version-id <uuid> ...
```

They need a login and permission to edit the store: organization owners and admins can change a version, members can only read it.

## Changing a live version

A change to an **active** version reaches shoppers as soon as it is saved, and so does activating one, so these commands refuse both unless you pass `--live`:

```json theme={"system"}
{"error":{"code":"CONFIRM_LIVE_REQUIRED","message":"Version \"main\" is active: shoppers see this change as soon as it is saved. …"}}
```

The safer path is the one the Admin's **Duplicate** offers: clone the version, edit the copy, then activate it.

```bash theme={"system"}
ollieshop version clone --version-id <live-uuid> --name "main (edit)" -o json
# {"data":{"id":"<copy-uuid>",...}}
ollieshop theme set --version-id <copy-uuid> --data '{"color-primary":"#0061cc"}'
ollieshop version update --version-id <copy-uuid> --active true --live
```

Activating the copy is the step that goes live, so it is the one that takes `--live`. The copy is inactive and not default, and carries the template, theme, props, messages, components and functions of the source.

## Previewing with --dry-run

Every `set`, `unset`, `update` and `patch` accepts `--dry-run`. The API computes the result without writing it and returns what would change:

```bash theme={"system"}
ollieshop theme set --version-id <uuid> --data '{"color-primary":"#111111"}' --dry-run -o json
```

```json theme={"system"}
{"data":{"versionId":"…","dryRun":true,"live":false,"changed":["theme"],
  "before":{"color-primary":"#0061cc","radius-box":"8px"},
  "after":{"color-primary":"#111111","radius-box":"8px"}}}
```

A real run returns the same shape with `"dryRun":false`. `changed` lists the sections whose stored value differs; when it is empty nothing was written. `live` says whether the change reaches shoppers: the version is active, or the patch activates it.

Unlike the dry runs of the [record commands](https://docs.ollie.shop/ollie-shop/cli/resources.md), these call the API, so they need a login.

## General

```bash theme={"system"}
ollieshop version update --version-id <uuid> --name "Black Friday" --template sales
ollieshop version update --version-id <uuid> --data '{"shipping":{"pickup":false}}'
```

| Field | Flag | Notes |
| - | - | - |
| `name` | `--name`, `-n` | |
| `template` | `--template` | `null` clears it |
| `active` | `--active true\|false` | Whether the version can be served |
| `default` | `--default true\|false` | Only one version per store can be the default; the save is refused while another one still is |
| `flags` | `--data` only | [Checkout flags](https://docs.ollie.shop/ollie-shop/configuration/feature-flags.md), merged key by key: the flags you don't send keep their value |
| `shipping` | `--data` only | Delivery, pickup and custom shipping, merged the same way |
| `integrations` | `--data` only | See [Integrations](https://docs.ollie.shop/ollie-shop/configuration/integrations.md), merged the same way |

## Props

```bash theme={"system"}
ollieshop props get   --version-id <uuid> [--keys freeShippingThreshold,banner]
ollieshop props set   --version-id <uuid> --data '{"freeShippingThreshold":199}'
ollieshop props unset --version-id <uuid> --keys banner
```

`set` writes the top-level keys you send and leaves the others as they are; an object value replaces the stored one. `unset` deletes the keys listed. The buckets the General tab owns (`flags`, `shipping`, `integrations`) and a few internal ones cannot be changed here: use `version update` for the first three.

The [`font`](https://docs.ollie.shop/ollie-shop/configuration/font) prop becomes a stylesheet link and a CSS rule on the checkout, so its `href` must be an `https` URL and its `fontFamily` follows the same character rule as theme values.

## Theme

```bash theme={"system"}
ollieshop theme get   --version-id <uuid>
ollieshop theme set   --version-id <uuid> --data '{"color-primary":"#0061cc","radius-box":"8px"}'
ollieshop theme unset --version-id <uuid> --keys radius-box
```

Keys are the [theme tokens](https://docs.ollie.shop/ollie-shop/configuration/theme.md): letters, digits, `-` and `_`. Every value is a string of at most 256 characters and cannot contain `;`, `{`, `}`, `<`, `>` or `\`, since it is written into the checkout's stylesheet as is. Colors, sizes, `rgba(…)`, `var(…)` and quoted font stacks are all fine. `set` merges over the stored tokens; add `--replace` to make the tokens you send the whole theme.

## Messages

```bash theme={"system"}
ollieshop messages get   --version-id <uuid> [--namespace ui]
ollieshop messages set   --version-id <uuid> --data '{"ui":{"pt-br":{"pages_cart_title":"Sacola"}}}'
ollieshop messages unset --version-id <uuid> --keys ui.pages_cart_title,ui.pt-br.pages_cart_title
```

The document has two namespaces, `ui` and `app`, each flat or split by locale as described in [Translations](https://docs.ollie.shop/ollie-shop/configuration/translation.md). `set` deep-merges, so adding a `pt-br` text keeps every other key; `--replace` makes what you send the whole document. `unset` takes dot paths that start with the namespace.

## Several sections at once

`version patch` sends one request with any of the sections, written together:

```bash theme={"system"}
ollieshop version patch --version-id <uuid> --data '{
  "general": {"name": "Black Friday"},
  "theme": {"set": {"color-primary": "#000000"}},
  "messages": {"set": {"ui": {"pages_cart_title": "Your bag"}}},
  "props": {"unset": ["banner"]}
}'
```

Each section takes `set`, `unset` (a list of keys; for messages, a list of paths such as `["ui","pt-br","pages_cart_title"]`) and, for theme and messages, `replace`. Add `"confirmLive": true` or `--live` for an active version. `ollieshop schema version.patch` prints the full shape.

## Errors

Errors carry a `code` next to the message:

| Code | Meaning |
| - | - |
| `CONFIRM_LIVE_REQUIRED` | The version is active, or the patch activates it; pass `--live`, or edit a clone first |
| `RESERVED_PROP_KEY` | `props set`/`unset` named a bucket it cannot change |
| `INVALID_REQUEST` | The input does not match the schema, such as a theme value that contains `;` or a `font` with an `http` stylesheet |
| `FORBIDDEN` | You can read the version but not change it |
| `NOT_FOUND` | The version does not exist or you have no access to its store |
| `CONFLICT` | Another version of the store is already the default |
| `UNAUTHENTICATED` | Run `ollieshop login` again |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.