> 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/partially-update-a-slot-suspender.md).

# Partially update a slot suspender

Updates a slot suspender field by field. Only the fields present in the request are changed; the others keep their current values. A `retail_store_config` or `time_config` that is included is replaced as a whole and validated against its selected rule.

```json
{"openapi":"3.1.0","info":{"title":"Admin API","version":"1.0.0"},"tags":[{"name":"Slot Suspenders","description":"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.\n\n> **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`.\n\n## Core Capabilities\n\n**1. Listing & Filtering**\n* Retrieve a paginated list of suspenders, newest first.\n* Filter by description (case-insensitive partial match) and by active state.\n\n**2. Suspender Lifecycle Management**\n* Create a suspender, fully or partially update it, and delete it permanently.\n\n## Rule Configuration\n\nA 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.\n\n### Retail Store Rules (`retail_store_config`)\n\n| Rule | Params | Effect |\n|------|--------|--------|\n| `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). |\n| `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. |\n| `any_retail_store` | none (`{}`) | Matches every store. |\n\n### Time Rules (`time_config`)\n\n| Rule | Params | Effect |\n|------|--------|--------|\n| `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. |\n| `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. |\n| `any_time` | none (`{}`) | Matches every time. |\n\n## Dynamic Settings & Environment Variables\n\nNo 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.\n\n**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."}],"servers":[{"description":"Omnitron Remote Proxy (external access — recommended)","url":"https://{omnitron_url}/api/v1/remote/{channel_id}","variables":{"omnitron_url":{"default":"sandbox.akinon.com","description":"Omnitron server URL (e.g., {omnitron.akinon.com})"},"channel_id":{"default":"1","description":"The channel identifier the remote request is routed through"}}},{"description":"Commerce API Server (internal / direct access only)","url":"https://{commerce_url}/api/v1","variables":{"commerce_url":{"default":"sandbox.akinon.com","description":"Internal commerce server URL, reachable only from within the Omnitron network"}}}],"security":[{"tokenAuth":[]}],"components":{"securitySchemes":{"tokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Token credential sent in the Authorization header, in the form: `Token <your-token>`. Requires a staff (admin) account."}},"schemas":{"SlotSuspenderPatchRequest":{"type":"object","description":"The body of a slot suspender partial update request. Only the fields included in the body are changed; every field is optional. A `retail_store_config` or `time_config` that is included is replaced as a whole.","properties":{"description":{"type":"string","maxLength":255,"description":"A human-readable description of the suspender."},"retail_store_config":{"$ref":"#/components/schemas/SlotSuspenderRetailStoreConfig"},"time_config":{"$ref":"#/components/schemas/SlotSuspenderTimeConfig"},"is_active":{"type":"boolean","description":"Whether the suspender is active."}}},"SlotSuspenderRetailStoreConfig":{"type":"object","description":"The retail-store rule of a suspender. The `rule` selects the strategy; the shape of `params` depends on it. See **Retail Store Rules** in the section description.","required":["rule","params"],"properties":{"rule":{"type":"string","enum":["retail_store","retail_store_group","any_retail_store"],"description":"The retail-store matching strategy.\n* `retail_store` — match by store ERP code\n* `retail_store_group` — match by store group slug\n* `any_retail_store` — match every store"},"params":{"type":"object","additionalProperties":true,"description":"Parameters for the selected rule.\n* `retail_store`: `retail_stores` (non-empty list of store ERP codes) and optional `exclude` (boolean, default `false`).\n* `retail_store_group`: `retail_store_groups` (non-empty list of store group slugs) and optional `exclude` (boolean, default `false`).\n* `any_retail_store`: an empty object."}}},"SlotSuspenderTimeConfig":{"type":"object","description":"The time rule of a suspender. The `rule` selects the strategy; the shape of `params` depends on it. See **Time Rules** in the section description.","required":["rule","params"],"properties":{"rule":{"type":"string","enum":["date_time_range","day_and_time_range","any_time"],"description":"The time matching strategy.\n* `date_time_range` — match datetimes overlapping the given ranges\n* `day_and_time_range` — match the given days at the given times\n* `any_time` — match every time"},"params":{"type":"object","additionalProperties":true,"description":"Parameters for the selected rule.\n* `date_time_range`: `ranges`, a non-empty list of `[start, end]` pairs of timezone-aware ISO-8601 datetimes; each `start` must be strictly before its `end`.\n* `day_and_time_range`: `days`, a non-empty list of ISO dates (`YYYY-MM-DD`), and `ranges`, a non-empty list of `[start, end]` pairs of `HH:MM:SS` times.\n* `any_time`: an empty object."}}},"SlotSuspender":{"type":"object","description":"A slot suspender — a rule that blocks delivery slots for a combination of stores and times.","properties":{"pk":{"type":"integer","readOnly":true,"description":"The unique identifier of the slot suspender."},"created_date":{"type":"string","format":"date-time","readOnly":true,"description":"When the suspender was created."},"modified_date":{"type":"string","format":"date-time","readOnly":true,"description":"When the suspender was last modified."},"description":{"type":"string","maxLength":255,"description":"A human-readable description of the suspender."},"retail_store_config":{"$ref":"#/components/schemas/SlotSuspenderRetailStoreConfig"},"time_config":{"$ref":"#/components/schemas/SlotSuspenderTimeConfig"},"is_active":{"type":"boolean","description":"Whether the suspender is active. Only active suspenders are evaluated during slot generation."}}},"ValidationError":{"type":"object","description":"Returned when the request contains invalid or missing data. Errors are grouped by the field they apply to: each key is the name of a field from the request and its value is a list of one or more messages describing what is wrong with that field. Messages that do not belong to any single field are grouped under `non_field_errors`.","properties":{"non_field_errors":{"type":"array","description":"Error messages that apply to the request as a whole rather than to a specific field.","items":{"type":"string"}}},"additionalProperties":{"type":"array","description":"The list of error messages for the field named by the key.","items":{"type":"string"}}},"Error":{"type":"object","description":"An error response.","properties":{"detail":{"type":"string","description":"A human-readable description of the error."}},"additionalProperties":true}},"responses":{"ValidationError":{"description":"The request contains invalid or missing data.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"Unauthorized":{"description":"Authentication credentials were not provided or are invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Forbidden":{"description":"The authenticated user does not have administrator privileges.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"SlotSuspenderNotFound":{"description":"The requested slot suspender does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/slot_suspenders/{id}/":{"patch":{"tags":["Slot Suspenders"],"operationId":"partialUpdateSlotSuspender","summary":"Partially update a slot suspender","description":"Updates a slot suspender field by field. Only the fields present in the request are changed; the others keep their current values. A `retail_store_config` or `time_config` that is included is replaced as a whole and validated against its selected rule.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlotSuspenderPatchRequest"}}}},"responses":{"200":{"description":"The updated slot suspender.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlotSuspender"}}}},"400":{"$ref":"#/components/responses/ValidationError"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/SlotSuspenderNotFound"}}}}}}
```


---

# 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/partially-update-a-slot-suspender.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.
