For the complete documentation index, see llms.txt. This page is also available as Markdown.

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.

Last updated

Was this helpful?