GET /piranyaplatform/rest/v1/ordering/periods is the shared Shop period capability. It accepts program/account/department/time-cycle scope and optional selected_period_id or selected_period_start_date. /on-demand-ordering/periods uses the same resolver for existing clients. Anonymous access follows the program's public-read policy; account scope is authorized server-side.
TimeCyclePeriod owns stable local IDs, time keys, date ranges and coarse IsActive. A GET performs no creation or activation. Shop.Ordering.Periods.Sync is both an administrator action and a recurring six-hour job, sharing OrderingCalendarReconciliationService.
Configure opted-in programs through their ShopProgram.DefaultOrderingTimeCycleId; calendars must be weekly. Reconciliation uses the core ITimeCycleService date/key rules, creates missing upcoming periods, and activates weeks required by the selected weekly source. Native/PCD periods before cutover retain their existing activation; newly created native periods remain inactive for their existing publisher. Existing IDs/ranges and historical/shared activation are preserved. Programs sharing a cycle contribute a union of activation requirements.
Automated creation in the core calendar job, PCD campaign sync and Shop reconciliation locks the owning TimeCycle row. Conflicting or duplicate period identities are rejected rather than repaired silently. Period caches and entity notifications are refreshed after commit.
| Property | Default | Meaning |
|---|---|---|
Shop.Ordering.Periods.ProgramIds |
empty | Comma-separated programs participating in source-aware reconciliation, period reads and fresh quote availability checks. |
Shop.Ordering.Periods.LookaheadWeeks |
12 |
Current Danish week plus upcoming weeks; valid range 1–52. |
Shop.Ordering.Periods.AllowProvisionalWeeks |
false |
Explicit testing policy while authoritative anonymous publication facts are unavailable. |
Source selection uses Shop.Ordering.ProductSource.* for each Danish delivery week. The selected provider contributes calendar facts; provider configuration and publication semantics belong to its owning module. A single-source installation can use the same source key before and after cutover, with the cutover unset.
For an administrator-triggered reconciliation, execute the action Shop.Ordering.Periods.Sync through the Platform action API. Run it after configuring the program/default cycle and source settings; repeat execution preserves identity and does not duplicate periods. The job remains a no-op when no programs are enrolled.
IOrderingPeriodSourceProvider supplies scoped week facts. IsActive does not grant customer ordering permission. Period selections expose is_open_for_ordering, nullable is_source_released, and is_provisional separately.
Providers authorize account-scoped reads and keep source release separate from customer ordering permission. Catalog offer presence is not proof of publication. Failed source reads must remain distinguishable from valid empty calendars. Provider-specific publication and provisional-mode behavior belong to the owning module documentation.
Fresh cart/checkout source quotes validate week and exact delivery-date openness. An open week cannot authorize a closed or absent delivery date. Existing immutable price evidence, payment collection and post-capture handoff remain separate responsibilities.
The OnDemand adapter uses the shared route. Bearer-scoped default period requests expire after one minute; implicit/cookie-auth and explicit-selection reads are fresh. Deploy the backend before the updated PageApp bundle; existing deployed clients continue using the OnDemand route.