Skip to main content

GET /products

List products with filtering, sorting, and pagination.

Authentication

None required.

Query Parameters

ParameterTypeRequiredDescription
categorystringNoFilter by category slug
searchstringNoSearch in product name and description (max 255 chars)
sortstringNoSort order: price_asc, price_desc, name_asc, name_desc, created_asc, created_desc. Default: newest first
per_pageintegerNoItems per page (1-50). Default: 12
pageintegerNoPage number. Default: 1
featuredbooleanNoFilter featured products only
typestringNoFilter by product type: digital, subscription, course
price_minnumberNoMinimum price filter
price_maxnumberNoMaximum price filter
in_stockbooleanNoFilter to only in-stock products

Example Request

curl "https://front.rmz.gg/api/products?category=electronics&sort=price_asc&per_page=12&page=1"

Response

Success (200)

{
  "success": true,
  "data": [
    {
      "id": 101,
      "name": "Premium Game Key",
      "marketing_title": null,
      "slug": "premium-game-key",
      "description": "Premium game activation key for PC",
      "short_description": "Premium game activation key for PC...",
      "type": "code",
      "status": 1,
      "is_featured": false,
      "is_noticeable": false,
      "is_new": false,
      "is_discounted": false,
      "is_discount_expired": false,
      "show_reviews": true,
      "price": {
        "original": 199.99,
        "actual": 199.99,
        "discount": null,
        "discount_expiry": null,
        "show_discount_countdown": false,
        "show_discount_savings": false,
        "savings_amount": 0,
        "formatted": "199.99 ر.س",
        "formatted_original": "199.99 ر.س",
        "discount_percentage": 0,
        "currency": "SAR"
      },
      "stock": {
        "available": 50,
        "unlimited": false,
        "min_qty": 1,
        "codes_count": 50,
        "is_in_stock": true
      },
      "sales": {
        "badge": null
      },
      "image": {
        "id": 1,
        "url": "https://...",
        "full_link": "https://...",
        "path": "...",
        "filename": "image.webp",
        "alt_text": "Premium Game Key"
      },
      "categories": [
        {
          "id": 1,
          "name": "Games",
          "slug": "games",
          "description": null,
          "image": null,
          "icon": null,
          "is_active": true,
          "sort_order": 0,
          "created_at": "2024-01-01T00:00:00.000000Z",
          "updated_at": "2024-06-15T10:30:00.000000Z"
        }
      ],
      "fields": null,
      "meta": null,
      "metadata": null,
      "tags": null,
      "seo": {
        "meta_title": null,
        "meta_description": null,
        "meta_keywords": null
      },
      "created_at": "2024-06-15T10:30:00.000000Z",
      "updated_at": "2024-06-15T10:30:00.000000Z"
    }
  ],
  "pagination": {
    "current_page": 1,
    "last_page": 5,
    "per_page": 12,
    "total": 60,
    "from": 1,
    "to": 12,
    "has_more_pages": true,
    "next_page_url": "https://front.rmz.gg/api/products?page=2",
    "prev_page_url": null
  }
}

GET /products/search

Search products with advanced filters and relevance scoring.

Authentication

None required.

Query Parameters

ParameterTypeRequiredDescription
qstringYesSearch query (2-255 characters)
categorystringNoFilter by category slug
price_minnumberNoMinimum price filter
price_maxnumberNoMaximum price filter
typestringNoFilter by type: digital, subscription, course
sortstringNoSort order: relevance, price_asc, price_desc, name_asc, name_desc, created_desc. Default: created_desc
per_pageintegerNoItems per page (1-50). Default: 12
When sort=relevance, results are ranked by a relevance score. Name matches score higher than description matches.

Example Request

curl "https://front.rmz.gg/api/products/search?q=game+key&sort=relevance&per_page=12"

Response

Same paginated format as GET /products.

Error Responses

StatusDescription
422Validation error (q is required, min 2 characters)

GET /featured-products

Get featured (highlighted) products.

Authentication

None required.

Query Parameters

ParameterTypeRequiredDescription
limitintegerNoNumber of products to return (1-20). Default: 8

Example Request

curl "https://front.rmz.gg/api/featured-products?limit=8"

Response

Success (200)

Returns the same ProductResource structure as GET /products. See the full response schema above.
{
  "success": true,
  "data": [
    {
      "id": 101,
      "name": "Premium Game Key",
      "marketing_title": null,
      "slug": "premium-game-key",
      "description": "Premium game activation key for PC",
      "short_description": "Premium game activation key for PC...",
      "type": "code",
      "status": 1,
      "is_featured": false,
      "is_noticeable": true,
      "is_new": false,
      "is_discounted": false,
      "is_discount_expired": false,
      "show_reviews": true,
      "price": {
        "original": 199.99,
        "actual": 199.99,
        "discount": null,
        "discount_expiry": null,
        "show_discount_countdown": false,
        "show_discount_savings": false,
        "savings_amount": 0,
        "formatted": "199.99 ر.س",
        "formatted_original": "199.99 ر.س",
        "discount_percentage": 0,
        "currency": "SAR"
      },
      "stock": {
        "available": 50,
        "unlimited": false,
        "min_qty": 1,
        "codes_count": 50,
        "is_in_stock": true
      },
      "sales": {
        "badge": null
      },
      "image": {
        "id": 1,
        "url": "https://...",
        "full_link": "https://...",
        "path": "...",
        "filename": "image.webp",
        "alt_text": "Premium Game Key"
      },
      "categories": [
        {
          "id": 1,
          "name": "Games",
          "slug": "games",
          "description": null,
          "image": null,
          "icon": null,
          "is_active": true,
          "sort_order": 0,
          "created_at": "2024-01-01T00:00:00.000000Z",
          "updated_at": "2024-06-15T10:30:00.000000Z"
        }
      ],
      "fields": null,
      "meta": null,
      "metadata": null,
      "tags": null,
      "seo": {
        "meta_title": null,
        "meta_description": null,
        "meta_keywords": null
      },
      "created_at": "2024-06-15T10:30:00.000000Z",
      "updated_at": "2024-06-15T10:30:00.000000Z"
    }
  ]
}
Featured products are those marked as “noticeable” in the store dashboard. They are returned sorted by newest first.