Skip to content
You are reading the pinned copy of v1.0, which is also the latest release. Read the latest.

Storefront (admin API)

Admin routes of the storefront module. Every route needs a staff session and the permission named on it; send X-Resolve-Locale: false to receive every locale of a translatable field for editing.

Get storefront pages

Responses:

  • 200: Pages retrieved.
  • 401: Unauthorized.
  • 403: Insufficient permissions.

GET /v1/admin/storefront/pages/{pageSlug}/sections

Section titled “GET /v1/admin/storefront/pages/{pageSlug}/sections”

Get page sections (admin)

Parameters:

  • pageSlug in path (string, required).
  • page in query (number, min 1, optional).
  • pageSize in query (number, min 1, max 100, optional).

Responses:

  • 200: Sections retrieved.
  • 401: Unauthorized.
  • 403: Insufficient permissions.

POST /v1/admin/storefront/pages/{pageSlug}/sections

Section titled “POST /v1/admin/storefront/pages/{pageSlug}/sections”

Create section

Parameters:

  • pageSlug in path (string, required).

Request body: CreateSectionAdminDto.

Responses:

  • 201: Section created.
  • 400: Invalid input.
  • 401: Unauthorized.
  • 403: Insufficient permissions.

PATCH /v1/admin/storefront/pages/{pageSlug}/sections/reorder

Section titled “PATCH /v1/admin/storefront/pages/{pageSlug}/sections/reorder”

Reorder sections

Parameters:

  • pageSlug in path (string, required).

Request body: ReorderSectionsAdminDto.

Responses:

  • 204: Sections reordered.
  • 401: Unauthorized.
  • 403: Insufficient permissions.

Public storefront origin and product URL shape

Responses:

  • 200: Config returned.
  • 401: Unauthorized.
  • 403: Insufficient permissions.

Delete section

Parameters:

  • id in path (string, required).

Responses:

  • 204: Section deleted.
  • 401: Unauthorized.
  • 403: Insufficient permissions.
  • 404: Section not found.

Update section

Parameters:

  • id in path (string, required).

Request body: UpdateSectionAdminDto.

Responses:

  • 200: Section updated.
  • 400: Invalid input.
  • 401: Unauthorized.
  • 403: Insufficient permissions.
  • 404: Section not found.

PATCH /v1/admin/storefront/sections/{id}/visibility

Section titled “PATCH /v1/admin/storefront/sections/{id}/visibility”

Toggle section visibility

Parameters:

  • id in path (string, required).

Request body: ToggleVisibilityAdminDto.

Responses:

  • 200: Visibility toggled.
  • 400: Invalid input.
  • 401: Unauthorized.
  • 403: Insufficient permissions.
  • 404: Section not found.
  • pageSlug (string, pattern ^[a-z0-9-/]+$, max length 200, optional).
  • type ("CATEGORY_SHOWCASE", "FEATURED_PRODUCTS", "HERO", "PROMOTIONAL_BANNER", "TRUST_SIGNALS", required).
  • title (TranslatableDto, optional).
  • config (object, required).
  • sortOrder (number, min 0, optional).
  • isVisible (boolean, optional).
  • visibleFrom (string, optional).
  • visibleUntil (string, optional).
  • orderedIds (array of string, required).
  • isVisible (boolean, required).
  • visibleFrom (string, optional).
  • visibleUntil (string, optional).
  • fr (string, optional).
  • en (string, optional).
  • ar (string, optional).
  • default (string, required).
As seen on Open Source Alternatives The Merchant Engine badge