> For the complete documentation index, see [llms.txt](https://apidocs.akinon.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://apidocs.akinon.com/commerce-openapis/admin/plugins.md).

# Plugins

Administrative endpoints for **plugins** — the configurable extension points registered by the project. Each plugin is defined in code (a key, a name, a description, a default configuration, and a default active state) and can be given a stored override through a *plugin setting* that carries its own configuration and active flag.

> **Availability:** These endpoints exist only when the plugin module is enabled for the installation (the `omnishop.plugins` application is installed). On installations without the plugin module the `/plugins/` path is not registered and returns `404`.

### Core Capabilities

**1. Discovering Plugins**

* List every registered plugin together with its default configuration and default active state (`GET /plugins/all/`).

**2. Plugin Setting Lifecycle Management**

* Retrieve the stored settings, create a setting for a plugin, and update a setting's configuration and active flag.
* Deletion is not supported; there is no `DELETE` on these endpoints.

### Plugins vs. Plugin Settings

* A **plugin** is defined in code and is immutable through the API. `GET /plugins/all/` returns the registered plugins with the defaults declared in code.
* A **plugin setting** is a stored override for a plugin, addressed by its own `pk`. Creating a setting binds it to a plugin by `key`; the resolved `name` and `description` are always read back from the plugin definition, and `default_config` reports the plugin's default configuration alongside the setting's own `config`.
* A plugin's `key` is unique across settings — a plugin can have at most one stored setting — and the key of an existing setting cannot be changed.

### Configuration Validation

The `config` object of a setting is validated against the configuration serializer declared by the target plugin, so the accepted shape of `config` depends on the plugin identified by `key`. A plugin that declares no configuration accepts an empty object.

### Error Codes

Requests that are well-formed but conflict with a business rule are answered with `406 Not Acceptable` and carry one of the following codes.

| Code                   | Meaning                                                                                                                                                                                 |
| ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `plugin_setting_100_1` | The plugin definition for the setting's key is no longer registered. Surfaces on update; on create an unknown `key` is reported as a `400` validation error on the `key` field instead. |
| `plugin_setting_100_2` | A plugin setting already exists for the given `key` (raised on create).                                                                                                                 |

### Dynamic Settings & Environment Variables

No dynamic settings (`dj_dynamic_settings`) are read by these endpoints; the plugin module does not register any.

**Environment variables:** The endpoints are gated by whether the plugin module is installed (`omnishop.plugins` in `INSTALLED_APPS`); no other environment variable is read by them.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://apidocs.akinon.com/commerce-openapis/admin/plugins.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
