> 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/slot-suspenders.md).

# Slot Suspenders

Administrative endpoints for **slot suspenders** — the rules that suspend (block) scheduled delivery slots for a combination of retail stores and time ranges. When delivery slots are generated for the storefront, every active suspender is evaluated; a slot is suspended when the suspender's retail-store rule matches the slot's store **and** its time rule matches the slot's time.

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

### Core Capabilities

**1. Listing & Filtering**

* Retrieve a paginated list of suspenders, newest first.
* Filter by description (case-insensitive partial match) and by active state.

**2. Suspender Lifecycle Management**

* Create a suspender, fully or partially update it, and delete it permanently.

### Rule Configuration

A suspender combines two rules, each given as a `{ "rule": ..., "params": ... }` object. The `rule` selects the strategy; the shape of `params` depends on the selected rule.

#### Retail Store Rules (`retail_store_config`)

| Rule                 | Params                                                                                            | Effect                                                                                                                               |
| -------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| `retail_store`       | `retail_stores` (non-empty list of store ERP codes), `exclude` (boolean, default `false`)         | Matches slots whose store ERP code is in the list. With `exclude: true` the match is inverted (every store **except** those listed). |
| `retail_store_group` | `retail_store_groups` (non-empty list of store group slugs), `exclude` (boolean, default `false`) | Matches slots whose store belongs to one of the listed groups. `exclude: true` inverts the match.                                    |
| `any_retail_store`   | none (`{}`)                                                                                       | Matches every store.                                                                                                                 |

#### Time Rules (`time_config`)

| Rule                 | Params                                                                                                                   | Effect                                                                                                                                         |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| `date_time_range`    | `ranges` (non-empty list of `[start, end]` pairs of timezone-aware ISO-8601 datetimes)                                   | Matches slots whose time overlaps any of the ranges. Each `start` must be strictly before its `end`, and both must carry timezone information. |
| `day_and_time_range` | `days` (non-empty list of ISO dates `YYYY-MM-DD`), `ranges` (non-empty list of `[start, end]` pairs of `HH:MM:SS` times) | Matches slots on any of the given days whose time overlaps any of the time ranges.                                                             |
| `any_time`           | none (`{}`)                                                                                                              | Matches every time.                                                                                                                            |

### Dynamic Settings & Environment Variables

No dynamic settings (`dj_dynamic_settings`) are read by the slot suspender endpoints themselves. The slot module registers three settings — `SLOT_DAYS_COUNT`, `DEFERRED_SLOT_DAYS_COUNT` and `DEFERRED_SLOT_IGNORED_DAYS` — but they govern the separate delivery-slot **generation** flow (how many days of slots are produced and which days are skipped), not the creation or management of the suspenders documented here.

**Environment variables:** The endpoints are gated by whether the slot module is installed (`omnishop.slots` in `INSTALLED_APPS`); no other environment variable is read by them. The three slot-generation settings above fall back to same-named Django settings when their dynamic value is unset, but that fallback applies to slot generation, not to these endpoints.


---

# 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/slot-suspenders.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.
