Skip to main content

List Products

GET/products
Returns a paginated list of products with basic information (ID, name, slug, type, and price).

Authentication

Headers

HeaderValueRequired
AuthorizationBearer YOUR_API_TOKENYes
Acceptapplication/jsonRecommended

Query Parameters

ParameterTypeRequiredDescription
pageintegerNoPage number (default: 1)

Example Request

curl -X GET "https://merchant-api.rmz.gg/shawarma/products?page=1" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Success Response

{
  "message": null,
  "data": {
    "current_page": 1,
    "data": [
      {
        "id": 101,
        "name": "Premium License",
        "slug": "premium-license",
        "type": "code",
        "price": 49.99,
        "actual_price": 49.99,
        "current_stock": 25,
        "is_new": false,
        "is_discounted": false,
        "is_discount_expired": false,
        "show_discount_countdown": false,
        "show_discount_savings": false,
        "discount_savings_amount": 0
      },
      {
        "id": 102,
        "name": "Monthly Subscription",
        "slug": "monthly-subscription",
        "type": "subscription",
        "price": 19.99,
        "actual_price": 19.99,
        "current_stock": 10000,
        "is_new": false,
        "is_discounted": false,
        "is_discount_expired": false,
        "show_discount_countdown": false,
        "show_discount_savings": false,
        "discount_savings_amount": 0
      }
    ],
    "first_page_url": "https://merchant-api.rmz.gg/shawarma/products?page=1",
    "from": 1,
    "next_page_url": "https://merchant-api.rmz.gg/shawarma/products?page=2",
    "path": "https://merchant-api.rmz.gg/shawarma/products",
    "per_page": 15,
    "prev_page_url": null,
    "to": 15
  },
  "api": "rmz.shawarma",
  "timestamp": 1699999999
}
Only the selected fields (id, name, slug, type, price) are returned from the database, but the model’s computed attributes (actual_price, current_stock, is_new, is_discounted, etc.) are always appended. Use the Get Product endpoint for the full product object.

Response Fields

FieldTypeDescription
idintegerProduct ID
namestringProduct name
slugstringURL-friendly product identifier
typestringProduct type: product, code, service, subscription, course, license
pricefloatProduct price
actual_pricefloatComputed selling price (discount price if active, otherwise regular price)
current_stockintegerCurrent available stock
is_newbooleanWhether the product was created in the last 12 hours
is_discountedbooleanWhether an active discount is currently applied
is_discount_expiredbooleanWhether the discount has expired
show_discount_countdownbooleanWhether to show a discount countdown timer
show_discount_savingsbooleanWhether to show discount savings amount
discount_savings_amountfloatAmount saved with discount (0 if no active discount)

Error Responses

CodeDescription
401Unauthorized — invalid or missing token