Skip to main content

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

EndpointDescriptioncockpitOS ModelStatusRecommendation
/shopsShop master data (name, logo, category, opening hours)Shop / ShopLocationimported
/center-aktionenCenter news & actionsNewsimported
/servicesCenter services (services provided)Serviceimported
/stellenmarktJob postings of shopsJobimported
/shop-angeboteShop offers / discount campaignsOfferimported
/shop-eventsShop events with dateEventimported
/informationenCenter metadata (social, contact, directions)ShoppingCenter / templateContentimported
/sliderHero slides (images, colors, links)templateContent['mec-template-d'].heroimported
/centersAll MEC center IDs and hostnamesinternal (Center selection)imported
/centerzeitungCenter newspaper editions (PDF + preview image)Newsnewly implementedAs news entry with tag centerzeitung
/centerplanSVG floor plans per levelCenterplan + MapFloornewly implementedAs MapFloor with mapSvg
/center-aktionen-aus-der-nachbarschaftNews from the surroundings (category filter)News⚠️ not implementedRedundant: same structure as /center-aktionen, only with centeraktion_kategorie: "aus_der_nachbarschaft"
/center-aktionen-archivArchived center actions (global DB, ~4000 entries)News⚠️ not implementedVery large dataset; no reliable center filtering; import only makes sense upon explicit request
/shop-aktionenShop-specific actionsOffer or Eventno dataEmpty for center_id=975; structure unknown
/shop-couponsShop couponsOfferno dataEmpty for center_id=975; would fit into Offer
/news_aktionenSuperset of all centeraktion entries (all categories)Newsnot implementedDuplicate content compared to /center-aktionen; response takes >30 s (5769 entries); no added value
/news_aktionen/highlightsHighlights subsetNewsno meaningful dataReturns [0] (numeric array, no content)
/realUnknownno dataEmpty object for center_id=975; purpose unclear
/hotspotUnknown content typeno dataEmpty object for center_id=975; purpose unclear
/logoCenter logo?ShoppingCenter.logono dataEmpty object for center_id=975; logo is already imported via /informationen (bild_video_1)

Newly Implemented Endpoints

/centerzeitungNews

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 FieldcockpitOS FieldNotes
lang.de.titel + lang.de.untertiteltitleCombined: "Centerzeitung – Ausgabe Juli 2022"
lang.de.beschreibungcontentHTML content
stripHtml(beschreibung)excerptMax. 200 characters
gueltigkeitszeitraum_von / modifiedpublishDateUnix timestamp × 1000
vorschaubildimageImported via Bunny CDN
hardcodedtags['centerzeitung']
pdfmetadata.pdfUrlExternal PDF URL
'mec-import'source

Activate import:

POST /api/import/mec
{ "sourceCenterId": 975, "targetCenterId": "...", "options": { "centerzeitung": true } }

/centerplanCenterplan + 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 FieldcockpitOS FieldNotes
ebene (as int)MapFloor.floorNumbere.g. 0 = EG, 1 = OG1, -1 = UG1
ebene_titel / ebene_kurzMapFloor.name
svg (URL)MapFloor.mapImageDirect SVG URL as fallback image
SVG text content (via fetch)MapFloor.mapSvg@db.Text; empty if fetch fails
floorNumber === 0MapFloor.isDefaultEG is default level

Behavior:

  • Creates Centerplan for 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.

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 entries
  • MecCenterplanFloor – Center plan levels

Fetch functions:

  • getMecCenterzeitung(centerId?)Promise<MecCenterzeitung[]>
  • getMecCenterplan(centerId)Promise<MecCenterplanFloor[]>

Nutzungsstatistik: Seitenaufrufe werden anonymisiert erfasst. Im Umami-Dashboard nach diesem Pfad filtern: /en/developer-guide/mec-api-gap-analyse