Skip to main content
Components are the building blocks of a store’s homepage. Store owners configure them in the dashboard. Component types include banners, product lists, features, reviews, and custom content.

GET /components

Get all homepage components for the store, sorted by display order.

Authentication

None required.

Example Request

curl "https://front.rmz.gg/api/components"

Response

Success (200)

{
  "success": true,
  "data": [
    {
      "id": 1,
      "type": "banner",
      "name": "Main Banner",
      "data": {
        "type": "carousel",
        "images": [
          {
            "id": 1,
            "url": "https://...",
            "full_link": "https://...",
            "alt_text": "Summer Sale",
            "link_url": "/categories/summer-deals",
            "sort_order": 0
          }
        ],
        "settings": {}
      },
      "sort_order": 1,
      "settings": {}
    },
    {
      "id": 2,
      "type": "product-list",
      "name": "Best Sellers",
      "data": {
        "title": "Best Sellers",
        "products": [
          {
            "id": 101,
            "name": "Premium Game Key",
            "slug": "premium-game-key",
            "price": 199.99,
            "image": { "url": "https://..." }
          }
        ],
        "view_all_link": "/categories/games",
        "settings": {},
        "options": {}
      },
      "sort_order": 2,
      "settings": {}
    },
    {
      "id": 3,
      "type": "feature",
      "name": "Store Features",
      "data": {
        "features": [
          { "title": "Instant Delivery", "description": "Digital products delivered instantly", "icon": "bolt" }
        ],
        "settings": {}
      },
      "sort_order": 3,
      "settings": {}
    },
    {
      "id": 4,
      "type": "reviews",
      "name": "Customer Reviews",
      "data": {
        "reviews": [
          {
            "id": 1,
            "rating": 5,
            "comment": "Great store!",
            "reviewer": { "name": "Ahmed Ali" },
            "created_at": "2024-06-15"
          }
        ],
        "settings": {}
      },
      "sort_order": 4,
      "settings": {}
    }
  ]
}

Component Types

TypeDescription
bannerImage banner (single or carousel). Contains images array with URLs and links.
product-listCurated product list. Supports best sellers, latest, category-based, and manually selected products.
featureStore feature highlights with title, description, and optional icon.
reviewsCustomer reviews section showing published store reviews.
customCustom content block with arbitrary HTML content.

GET /components/

Get a specific component by ID.

Authentication

None required.

Path Parameters

ParameterTypeDescription
idintegerComponent ID

Example Request

curl "https://front.rmz.gg/api/components/2"

Response

Success (200)

{
  "success": true,
  "data": {
    "id": 2,
    "type": "best_sellers",
    "name": "Best Sellers",
    "data": {
      "title": "Best Sellers",
      "products": [...],
      "view_all_link": "/categories/games",
      "settings": {},
      "options": {}
    },
    "sort_order": 2,
    "settings": {}
  }
}
The type field in the single-component response returns the raw component type (e.g., best_sellers, moving_group, latest) rather than the mapped type used in the list endpoint (product-list, banner, etc.).

Error Responses

StatusDescription
404Component not found

GET /components//products

Get paginated products for a product-list component.

Authentication

None required.

Path Parameters

ParameterTypeDescription
idintegerComponent ID (must be a product-list type)

Query Parameters

ParameterTypeRequiredDescription
per_pageintegerNoProducts per page (1-50). Default: 12

Example Request

curl "https://front.rmz.gg/api/components/2/products?per_page=12"

Response

Success (200)

{
  "success": true,
  "data": [
    {
      "id": 101,
      "name": "Premium Game Key",
      "slug": "premium-game-key",
      "type": "code",
      "price": 199.99,
      "image": { "url": "https://..." },
      "categories": []
    }
  ],
  "pagination": {
    "current_page": 1,
    "last_page": 2,
    "per_page": 12,
    "total": 20,
    "from": 1,
    "to": 12,
    "has_more_pages": true,
    "next_page_url": "...",
    "prev_page_url": null
  }
}

Error Responses

StatusDescription
400Component is not a product-list type
404Component not found