Skip to main content

Store

Retrieve your store’s profile information and aggregate statistics.

Get Store Information

GET/store
Returns the authenticated store’s profile data.

Authentication

Headers

HeaderValueRequired
AuthorizationBearer YOUR_API_TOKENYes
Acceptapplication/jsonRecommended

Example Request

curl -X GET "https://merchant-api.rmz.gg/shawarma/store" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json"

Success Response

Returns the full store object with all fields except is_risky and is_restricted (which are hidden). Below is an abbreviated example — the actual response includes all store fields.
{
  "message": null,
  "data": {
    "id": 1,
    "subdomain": "my-store",
    "name": "My Store",
    "balance": "0.00",
    "description": "Store description",
    "logo": "stores/logo.png",
    "favicon": null,
    "theme": 1,
    "color": "#5400db",
    "activities": [],
    "social": {},
    "settings": {},
    "is_maintenance": false,
    "maintenance_message": null,
    "plan_id": 2,
    "plan_expires_at": "2025-12-31T00:00:00.000000Z",
    "is_kyc_verified": true,
    "is_beta_tester": false,
    "customization": {},
    "ratio": "4.500",
    "ratio_synced_at": null,
    "ratio_based_on": 50,
    "user_id": 1,
    "deleted_at": null,
    "created_at": "2024-01-01T00:00:00.000000Z",
    "updated_at": "2024-01-15T00:00:00.000000Z",
    "human_format": {
      "expiry_date_human": "منذ 6 أشهر"
    }
  },
  "api": "rmz.shawarma",
  "timestamp": 1699999999
}
The response includes the complete store model. Additional fields may be present depending on store configuration. The fields is_risky and is_restricted are always hidden from the response.

Error Responses

CodeDescription
401Unauthorized — invalid or missing token

Get Store Statistics

GET/store/statics
Returns aggregate statistics for the authenticated store. Results are cached for 3 minutes.

Authentication

Headers

HeaderValueRequired
AuthorizationBearer YOUR_API_TOKENYes
Acceptapplication/jsonRecommended

Example Request

curl -X GET "https://merchant-api.rmz.gg/shawarma/store/statics" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Success Response

{
  "message": null,
  "data": {
    "sales_total": 125750.50,
    "sales_count": 342,
    "customers_count": 156,
    "products_count": 23,
    "categories_count": 5,
    "subscribers_count": 45,
    "pages_count": 3,
    "coupons_count": 8,
    "duration": "lifetime"
  },
  "api": "rmz.shawarma",
  "timestamp": 1699999999
}

Response Fields

FieldTypeDescription
sales_totalfloatTotal revenue (excluding pending, cancelled, refunded orders)
sales_countintegerTotal number of completed orders
customers_countintegerTotal registered customers
products_countintegerTotal products in store
categories_countintegerTotal categories
subscribers_countintegerTotal active subscriptions
pages_countintegerTotal custom pages
coupons_countintegerTotal coupon codes
durationstringAlways "lifetime" — indicates statistics cover all time
Statistics are cached for 3 minutes. Frequent polling will return the same data until the cache expires.

Error Responses

CodeDescription
401Unauthorized — invalid or missing token