MEC JSON REST API – Gap Analysis
Base URL: https://mec.mall-cockpit.de/wp-json/mallcockpit/v1
Test Parameter: ?center_id=975 (Lausitz-Center Hoyerswerda)
Status: May 2026
This page documents all known MEC API endpoints, their data structure, and import status in cockpitOS.
Complete Endpoint Overview
| Endpoint | Description | cockpitOS Model | Status | Recommendation |
|---|---|---|---|---|
/shops | Shop master data (name, logo, category, opening hours) | Shop / ShopLocation | ✅ imported | — |
/center-aktionen | Center news & actions | News | ✅ imported | — |
/services | Center services (services provided) | Service | ✅ imported | — |
/stellenmarkt | Job postings of shops | Job | ✅ imported | — |
/shop-angebote | Shop offers / discount campaigns | Offer | ✅ imported | — |
/shop-events | Shop events with date | Event | ✅ imported | — |
/informationen | Center metadata (social, contact, directions) | ShoppingCenter / templateContent | ✅ imported | — |
/slider | Hero slides (images, colors, links) | templateContent['mec-template-d'].hero | ✅ imported | — |
/centers | All MEC center IDs and hostnames | internal (Center selection) | ✅ imported | — |
/centerzeitung | Center newspaper editions (PDF + preview image) | News | ✅ newly implemented | As news entry with tag centerzeitung |
/centerplan | SVG floor plans per level | Centerplan + MapFloor | ✅ newly implemented | As MapFloor with mapSvg |
/center-aktionen-aus-der-nachbarschaft | News from the surroundings (category filter) | News | ⚠️ not implemented | Redundant: same structure as /center-aktionen, only with centeraktion_kategorie: "aus_der_nachbarschaft" |
/center-aktionen-archiv | Archived center actions (global DB, ~4000 entries) | News | ⚠️ not implemented | Very large dataset; no reliable center filtering; import only makes sense upon explicit request |
/shop-aktionen | Shop-specific actions | Offer or Event | ❌ no data | Empty for center_id=975; structure unknown |
/shop-coupons | Shop coupons | Offer | ❌ no data | Empty for center_id=975; would fit into Offer |
/news_aktionen | Superset of all centeraktion entries (all categories) | News | ❌ not implemented | Duplicate content compared to /center-aktionen; response takes >30 s (5769 entries); no added value |
/news_aktionen/highlights | Highlights subset | News | ❌ no meaningful data | Returns [0] (numeric array, no content) |
/real | Unknown | – | ❌ no data | Empty object for center_id=975; purpose unclear |
/hotspot | Unknown content type | – | ❌ no data | Empty object for center_id=975; purpose unclear |
/logo | Center logo? | ShoppingCenter.logo | ❌ no data | Empty object for center_id=975; logo is already imported via /informationen (bild_video_1) |
Newly Implemented Endpoints
/centerzeitung → News
Data structure (example):
{
"id": 58643,
"modified": 1658162528,
"lang": {
"de": {
"titel": "Centerzeitung",
"untertitel": "Ausgabe Juli 2022",
"beschreibung": "<p>Content as HTML...</p>"
}
},
"gueltigkeitszeitraum_von": 1658095200,
"vorschaubild": "https://mec.mall-cockpit.de/wp-content/.../cover.png",
"pdf": "https://mec.mall-cockpit.de/wp-content/.../edition.pdf",
"assigned_center": 1007
}
Mapping to News:
| MEC Field | cockpitOS Field | Notes |
|---|---|---|
lang.de.titel + lang.de.untertitel | title | Combined: "Centerzeitung – Ausgabe Juli 2022" |
lang.de.beschreibung | content | HTML content |
stripHtml(beschreibung) | excerpt | Max. 200 characters |
gueltigkeitszeitraum_von / modified | publishDate | Unix timestamp × 1000 |
vorschaubild | image | Imported via Bunny CDN |
| hardcoded | tags | ['centerzeitung'] |
pdf | metadata.pdfUrl | External PDF URL |
'mec-import' | source |
Activate import:
POST /api/import/mec
{ "sourceCenterId": 975, "targetCenterId": "...", "options": { "centerzeitung": true } }
/centerplan → Centerplan + MapFloor
Data structure (example):
[
{
"modified": "1524557067171",
"ebene": "0",
"ebene_kurz": "EG",
"ebene_titel": "EG",
"versions": "single",
"svg": "https://mec.mall-cockpit.de/wp-content/.../dnd-eg_2023-1.svg"
}
]
Mapping:
| MEC Field | cockpitOS Field | Notes |
|---|---|---|
ebene (as int) | MapFloor.floorNumber | e.g. 0 = EG, 1 = OG1, -1 = UG1 |
ebene_titel / ebene_kurz | MapFloor.name | |
svg (URL) | MapFloor.mapImage | Direct SVG URL as fallback image |
| SVG text content (via fetch) | MapFloor.mapSvg | @db.Text; empty if fetch fails |
floorNumber === 0 | MapFloor.isDefault | EG is default level |
Behavior:
- Creates
Centerplanfor the center if not already present - Skips levels that already exist for
(centerId, floorNumber)(idempotence) - SVG content is loaded from MEC via HTTP fetch and stored in
mapSvg - Errors during SVG fetch are non-blocking (entry is still created)
Activate import:
POST /api/import/mec
{ "sourceCenterId": 975, "targetCenterId": "...", "options": { "centerplan": true } }
Not Implemented Endpoints – Justification
/center-aktionen-aus-der-nachbarschaft
Identical data structure to /center-aktionen (same lang schema, same fields). Difference: centeraktion_kategorie: "aus_der_nachbarschaft". For Center 975, the endpoint yields only 1 entry. As /center-aktionen is already being imported, a separate implementation would lead to duplicates. Recommendation: Pass the centeraktion_kategorie value as a tag during the /center-aktionen import if differentiation is desired.
/center-aktionen-archiv
Delivers ~4000 entries from all centers (response time: ~25 seconds). Structure identical to /center-aktionen. Contains older, archived notices. Recommendation: Implement only on explicit request and with bulk import logic (paged, center-filtered).
/shop-aktionen and /shop-coupons
For center_id=975, both endpoints return {"nothing_found": [...]}. Structurally, they would fit into Offer. Recommendation: Implement only when a center with data is identified; /shop-angebote already covers the offers use case.
/news_aktionen
Superset of all centeraktion entries across all centers (~5769 entries, >30 s response time). Same structure as /center-aktionen. No added value, as all relevant entries are already covered by /center-aktionen with the center_id filter.
/real, /hotspot, /logo
Return empty objects ({}) for center_id=975. Purpose unclear; no meaningful data available.
API Client Types
The TypeScript interfaces can be found in apps/dashboard/src/lib/mec-api-client.ts:
MecCenterzeitung/MecCenterzeitungLang– Center newspaper entriesMecCenterplanFloor– Center plan levels
Fetch functions:
getMecCenterzeitung(centerId?)→Promise<MecCenterzeitung[]>getMecCenterplan(centerId)→Promise<MecCenterplanFloor[]>
Related Documents
- MEC Import (Overview) – Complete documentation of the import workflow
- Public Center Website API Gap Analysis – Gap analysis of the public cockpitOS API
Nutzungsstatistik: Seitenaufrufe werden anonymisiert erfasst. Im Umami-Dashboard nach diesem Pfad filtern: /en/developer-guide/mec-api-gap-analyse