Skip to content

API Endpoints

Admin API (Vue SPA backend)

All admin routes are under /fabfacebookpixel/api/ and are protected by PrestaShop's admin authentication. They are consumed exclusively by the Vue SPA dashboard and are not intended as a public API.

SPA entry point

Method Path Description
GET /fabfacebookpixel Renders the Vue SPA shell (SpaController::renderApp)

Context

Method Path Description
GET/POST /fabfacebookpixel/api/context_selection Returns available shops, languages, currencies, countries for the UI context selector

Pixel Settings

Method Path Description
GET/POST /fabfacebookpixel/api/pixel_settings List all pixel configurations for the current shop
POST /fabfacebookpixel/api/pixel_settings/update Create or update a pixel configuration
POST /fabfacebookpixel/api/pixel_settings/delete Delete a pixel configuration

Catalog Settings

Method Path Description
GET/POST /fabfacebookpixel/api/catalog_settings Get catalog settings for the current shop
POST /fabfacebookpixel/api/catalog_settings/update Update catalog settings

Catalog Export

Method Path Description
GET/POST /fabfacebookpixel/api/catalog_export List catalog export configurations
GET/POST /fabfacebookpixel/api/catalog_export/create Create a new export configuration
GET/POST /fabfacebookpixel/api/catalog_export/update Update an export configuration
GET/POST /fabfacebookpixel/api/catalog_export/update_chunks Update chunk settings for an export
GET/POST /fabfacebookpixel/api/catalog_export/delete Delete an export configuration

Category Mapping

Method Path Description
GET/POST /fabfacebookpixel/api/category_mapping List category mappings
POST /fabfacebookpixel/api/category_mapping/update Create or update a category mapping
POST /fabfacebookpixel/api/category_mapping/delete Delete a category mapping
GET/POST /fabfacebookpixel/api/retrieve_external_categories/{provider} Fetch and store Google or Facebook taxonomy from remote source
GET/POST /fabfacebookpixel/api/get_external_categories/{provider} Return stored taxonomy entries (provider: google or facebook)
GET/POST /fabfacebookpixel/api/get_category_tree Return the PS category tree for the UI
GET/POST /fabfacebookpixel/api/get_categories Return a flat category list

Attribute Mapping

Method Path Description
GET/POST /fabfacebookpixel/api/attribute_mapping List attribute mappings
POST /fabfacebookpixel/api/attribute_mapping/update Create or update an attribute mapping
POST /fabfacebookpixel/api/attribute_mapping/delete Delete an attribute mapping

Cache Settings

Method Path Description
GET/POST /fabfacebookpixel/api/cache_settings Get cache settings
POST /fabfacebookpixel/api/cache_settings/update Update cache settings
POST /fabfacebookpixel/api/cache_settings/clear Clear the module cache

Iubenda

Method Path Description
GET/POST /fabfacebookpixel/api/iubenda Get Iubenda settings
POST /fabfacebookpixel/api/iubenda/update Enable or disable Iubenda integration

Debug

Method Path Description
GET/POST /fabfacebookpixel/api/debug Get debug settings and log content
POST /fabfacebookpixel/api/debug/update Enable or disable debug mode
POST /fabfacebookpixel/api/debug/clear Clear the debug log file

Front Controllers

These are publicly accessible endpoints on the storefront.

ConsumerController

URL: /module/fabfacebookpixel/consumer

Handles the browser-side event queue. Called by the frontend JS script.

Action (?action=) Method Description
poll GET Returns the matching pixel ID and all pending JS events for the current guest. Response: { pixel: { pixel_id, external_id }, events: [ { id, event_type, js_event } ] }
confirm GET Marks an event as JS-sent. Params: id_fbp_event. Response: { ok: true }
revoke GET Deletes all pending JS events for the current guest (consent revoked). Response: { ok: true }

CatalogExportController — chunk processing

URL: /module/fabfacebookpixel/catalogexport

Parameter Description
token Required. The export configuration token.
type Optional. full (default), lang, or country. Selects which feed file to stream when complete.

Behaviour:

  • If the export lock is held by another process: HTTP 409 with { error: "Export already in progress." }
  • If the export is still processing chunks: HTTP 200 with JSON progress { status, currentChunk, totalChunks, processedProducts }
  • If the export is complete: streams the requested CSV file as Content-Type: text/csv

CatalogfeedController — download only

URL: /module/fabfacebookpixel/catalogfeed

Parameter Description
token Required. The export configuration token.
type Optional. full (default), lang, or country.

Behaviour:

  • If the output file does not exist (export not yet run): HTTP 404
  • If the file exists: streams the CSV as Content-Type: text/csv