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

# Wiki bundles

> Export and import an OmniCommerce Wiki as an Open Knowledge Format v0.3 bundle.

The Wiki exchanges active General pages as [Open Knowledge Format (OKF) v0.3](https://github.com/open-knowledge-format/open-knowledge-format/blob/main/SPEC.md) bundles. Each concept is a UTF-8 Markdown file with YAML frontmatter. A bundle can also contain indexes, a change log, and text or binary assets.

## Example bundle

```text theme={null}
index.md
policies/returns.md
assets/returns-checklist.pdf
```

The root `index.md` can declare `okf_version: "0.3"` and link to the pages in the bundle. Here is `policies/returns.md`.

```markdown theme={null}
---
type: Policy
title: Returns
description: When a customer can request a return.
tags: [returns, support]
generated:
  by: "human:policy-owner"
  at: "2026-11-10T03:00:00Z"
verified:
  - by: "human:policy-reviewer"
    at: "2026-11-12T03:00:00Z"
x-merchant-owner: customer-support
---

# Returns

See the [returns checklist](../assets/returns-checklist.pdf).
```

Import preserves the original files, including the `verified` records and extension fields. After a Wiki edit, export updates the fields for the edited content and keeps the earlier verification history. OmniCommerce uses its own records for Wiki approvals.

Open a Wiki page or select its node in the Wiki graph to see its OKF type, tags, and sources. Expand **OKF frontmatter (YAML)** to read the complete metadata for the current revision.

In the editor, edit the YAML frontmatter and body together in **OKF Markdown**. Saving creates a revision and queues search and graph indexing.

An OKF concept is identified by its path within the bundle. OmniCommerce keeps Wiki aliases and catalog associations as application data. The SKOS glossary includes Wiki aliases.

## Export and import

| Operation | Endpoint | Required scope |
| - | - | - |
| Export | `GET /api/v1/wiki/export` | `documents:read` |
| Import | `POST /api/v1/wiki/import` | `documents:write` |

The export response contains `data.files` and a separate `data.skos` glossary. Every file has a bundle-relative `path`. UTF-8 documents and text assets use `markdown`. Binary assets use `base64`.

Submit `data.files` as the import request's `files` array. Bundle links resolve to pages in the destination organization. The importer reports created, updated, unchanged, and failed concepts. Re-importing the same bundle into the same organization leaves the matching pages unchanged.

```bash theme={null}
omni wiki export-pages --organization-id "$SOURCE_ORGANIZATION_ID" --format json > wiki-export.json
jq --arg organizationId "$DESTINATION_ORGANIZATION_ID" \
  '{organizationId: $organizationId, files: .data.files}' wiki-export.json > wiki-import.json
omni wiki import-pages --json - < wiki-import.json
```


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