توثيق Rumh API

Endpoints واضحة لأي مطور يربط مع متجره

توثيق عملي فيه المسارات، نوع الطلب، طريقة التوثيق، الباراميترز المطلوبة والاختيارية، وشكل الرد المتوقع. الصفحة دي معمولة عشان التكامل يبقى مفهوم من أول دقيقة.

curl -X POST "https://rumh.net/api/tenant/v1/login" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -d '{ "username": "customer@example.com", "password": "secret123" }' { "users": { "id": 15, "email": "customer@example.com" }, "token": "1|ACCESS_TOKEN" }
Base Tenant URL: https://rumh.net/api/tenant/v1 Central URL: https://rumh.net/api/v1 Auth: Sanctum Bearer Token

Authentication

تسجيل العملاء، الدخول، OTP، واسترجاع كلمة المرور.

إنشاء حساب عميل جديد وإرجاع Sanctum token.

Parameter In Type Required Description Example
full_name body string Required اسم العميل الكامل. Ahmed Zakaria
email body email Required بريد فريد داخل المتجر. customer@example.com
username body string Required اسم مستخدم فريد. ahmed_store
password body string Required كلمة مرور لا تقل عن 6 أحرف. secret123
country_id body integer Required معرف الدولة. 1
state_id body integer Required معرف المحافظة/المنطقة. 10
city_id body integer Optional معرف المدينة. 24
terms_conditions body boolean Required الموافقة على الشروط. 1

Response

201/200 returns users + token; 422 returns validation_errors.

cURL

curl -X POST "https://rumh.net/api/tenant/v1/register" \
  -H "Accept: application/json"

تسجيل دخول بالبريد أو اسم المستخدم وإرجاع token.

Parameter In Type Required Description Example
username body string Required Email أو username. customer@example.com
password body string Required كلمة المرور. secret123

Response

200 returns users + token; 422 invalid credentials.

cURL

curl -X POST "https://rumh.net/api/tenant/v1/login" \
  -H "Accept: application/json"

تسجيل/دخول اجتماعي باستخدام بيانات Google/Facebook.

Parameter In Type Required Description Example
email body email Required بريد الحساب الاجتماعي. customer@example.com
displayName body string Optional اسم العرض. Ahmed Zakaria
isGoogle body integer Optional 1 Google أو 0 Facebook. 1
id body string Optional معرف الحساب لدى المزود. google-user-id

Response

200 returns users + token.

cURL

curl -X POST "https://rumh.net/api/tenant/v1/social/login" \
  -H "Accept: application/json"

إرسال كود تحقق لبريد عميل موجود.

Parameter In Type Required Description Example
email body email Required البريد المطلوب إرسال الكود له. customer@example.com

Response

200 returns email + otp in local/mobile API response; 422 on mail/user errors.

cURL

curl -X POST "https://rumh.net/api/tenant/v1/send-otp-in-mail" \
  -H "Accept: application/json"

تحديث حالة تحقق البريد.

Parameter In Type Required Description Example
user_id body integer Required معرف المستخدم. 15
email_verified body integer Required 0 أو 1. 1

Response

200 message; 422 validation_errors.

cURL

curl -X POST "https://rumh.net/api/tenant/v1/otp-success" \
  -H "Accept: application/json"

تعيين كلمة مرور جديدة بالبريد.

Parameter In Type Required Description Example
email body email Required بريد العميل. customer@example.com
password body string Required كلمة المرور الجديدة. newSecret123

Response

200 success; 422 Email Not Found.

cURL

curl -X POST "https://rumh.net/api/tenant/v1/reset-password" \
  -H "Accept: application/json"

Catalog & Storefront

المنتجات، التصنيفات، البحث، الحملات، الفلاتر، والصفحات العامة.

قائمة منتجات المتجر مع فلاتر البحث والفرز.

Parameter In Type Required Description Example
q query string Optional كلمة البحث. hoodie
category query integer|string Optional تصنيف المنتج حسب دعم الثيم/الخدمة. 3
pr_min query number Optional أقل سعر. 10
pr_max query number Optional أعلى سعر. 500
sort query string Optional ترتيب النتائج إن كان مدعومًا. latest

Response

Paginated product resource with meta/links where available.

cURL

curl -X GET "https://rumh.net/api/tenant/v1/product" \
  -H "Accept: application/json"

تفاصيل منتج واحد مع الصور، التقييمات، المخزون، الخصائص، والمنتجات المشابهة.

Parameter In Type Required Description Example
id path integer Required معرف المنتج. 101

Response

200 product payload; 404 no product found.

cURL

curl -X GET "https://rumh.net/api/tenant/v1/product/{id}" \
  -H "Accept: application/json"

إرجاع أقل وأعلى سعر في المتجر.

لا يحتاج هذا الطلب إلى parameters.

Response

200 {min_price,max_price}.

cURL

curl -X GET "https://rumh.net/api/tenant/v1/product/price-range" \
  -H "Accept: application/json"

بحث سريع للـ autocomplete.

Parameter In Type Required Description Example
q query string Required نص البحث. shirt
limit query integer Optional عدد النتائج. 10

Response

200 {success,count,data}.

cURL

curl -X GET "https://rumh.net/api/tenant/v1/quick-search" \
  -H "Accept: application/json"

كل التصنيفات المنشورة التي تحتوي منتجات.

لا يحتاج هذا الطلب إلى parameters.

Response

200 {categories,success}.

cURL

curl -X GET "https://rumh.net/api/tenant/v1/category" \
  -H "Accept: application/json"

بيانات تصنيف واحد.

Parameter In Type Required Description Example
id path integer Required معرف التصنيف. 5

Response

200 {category,success}; 422 invalid id.

cURL

curl -X GET "https://rumh.net/api/tenant/v1/category/{id}" \
  -H "Accept: application/json"

التصنيفات الفرعية التابعة لتصنيف.

Parameter In Type Required Description Example
category_id path integer Required معرف التصنيف. 5

Response

200 list response.

cURL

curl -X GET "https://rumh.net/api/tenant/v1/subcategory/{category_id}" \
  -H "Accept: application/json"

التصنيفات الداخلية التابعة لتصنيف فرعي.

Parameter In Type Required Description Example
sub_category path integer Required معرف التصنيف الفرعي. 12

Response

200 list response.

cURL

curl -X GET "https://rumh.net/api/tenant/v1/child-category/{sub_category}" \
  -H "Accept: application/json"

تصنيفات ومعها منتجاتها للواجهات السريعة.

لا يحتاج هذا الطلب إلى parameters.

Response

200 {success,data}.

cURL

curl -X GET "https://rumh.net/api/tenant/v1/categories-with-products" \
  -H "Accept: application/json"

منتجات مميزة بعدد اختياري.

Parameter In Type Required Description Example
limit path integer Optional عدد النتائج. 8

Response

Product resource collection.

cURL

curl -X GET "https://rumh.net/api/tenant/v1/featured/product/{limit?}" \
  -H "Accept: application/json"

أحدث المنتجات.

Parameter In Type Required Description Example
limit path integer Optional عدد النتائج. 8

Response

Product resource collection.

cURL

curl -X GET "https://rumh.net/api/tenant/v1/recent/product/{limit?}" \
  -H "Accept: application/json"

الحملات النشطة.

لا يحتاج هذا الطلب إلى parameters.

Response

200 campaign list.

cURL

curl -X GET "https://rumh.net/api/tenant/v1/campaign" \
  -H "Accept: application/json"

منتجات حملة محددة أو كل الحملات.

Parameter In Type Required Description Example
id path integer Optional معرف الحملة. 2

Response

Product resource collection.

cURL

curl -X GET "https://rumh.net/api/tenant/v1/campaign/product/{id?}" \
  -H "Accept: application/json"

عروض اليوم.

Parameter In Type Required Description Example
limit path integer Optional عدد النتائج. 10

Response

Product resource collection.

cURL

curl -X GET "https://rumh.net/api/tenant/v1/deals/product/{limit?}" \
  -H "Accept: application/json"

إضافة تقييم على منتج بواسطة عميل مسجل.

Parameter In Type Required Description Example
id body integer Required معرف المنتج. 101
rating body integer Required التقييم من 1 إلى 5. 5
comment body string Required نص التقييم. Great product

Response

200 {success,data}; 422 if not logged in or already rated.

cURL

curl -X POST "https://rumh.net/api/tenant/v1/product-review" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Checkout, Payments & Shipping

الكوبونات، تكلفة الشحن والضريبة، إنشاء الطلب، وتحديث حالة الدفع.

قائمة طرق الدفع المفعلة داخل المتجر.

Parameter In Type Required Description Example
x-api-key header string Required API key الخاص بالتطبيق. {{x_api_key}}

Response

200 payment gateway resource collection; 401 unauthenticated.

cURL

curl -X GET "https://rumh.net/api/tenant/v1/payment-gateway-list" \
  -H "Accept: application/json"

حساب قيمة الخصم لكوبون على سلة معينة.

Parameter In Type Required Description Example
coupon body string Required كود الكوبون. WELCOME10
total_amount body number Required إجمالي السلة قبل الخصم. 250
ids body array|string Required معرفات المنتجات حسب خدمة checkout. [101,102]

Response

200 {discounted_price}; 422 validation_errors.

cURL

curl -X POST "https://rumh.net/api/tenant/v1/coupon" \
  -H "Accept: application/json"

حساب خيارات الشحن والضريبة حسب عنوان العميل ومنتجات السلة.

Parameter In Type Required Description Example
country body integer Required معرف الدولة. 1
state body integer Optional معرف المنطقة/المحافظة. 10
city body integer|string Optional معرف/اسم المدينة. 24
product_ids body json array Required قائمة معرفات المنتجات JSON. [101,102]

Response

200 {tax,shipping_options,default_shipping_options,product_tax_info}.

cURL

curl -X POST "https://rumh.net/api/tenant/v1/shipping-charge" \
  -H "Accept: application/json"

إنشاء طلب من cart JSON مع بيانات العميل وطريقة الدفع.

Parameter In Type Required Description Example
cart body json Required محتوى السلة. [{"id":101,"qty":1}]
name body string Required اسم العميل عند عدم وجود token. Ahmed Zakaria
phone body string Required رقم الهاتف. +201000000000
email body email Required البريد. customer@example.com
country body integer Required معرف الدولة. 1
state body integer Required معرف المنطقة. 10
city body integer|string Optional المدينة. 24
address body string Required العنوان. Riyadh, Olaya
payment_gateway body string Required طريقة الدفع عند عدم استخدام COD. manual_payment
manual_trasaction_id body string Optional إجباري مع manual_payment. TXN-10001
cash_on_delivery body string Optional on لتفعيل الدفع عند الاستلام. on
shipping_method body integer|string Optional طريقة الشحن المختارة. 3
used_coupon body string Optional كود كوبون مستخدم. WELCOME10

Response

200 {order_id,order_details}; validation errors on missing required fields.

cURL

curl -X POST "https://rumh.net/api/tenant/v1/checkout" \
  -H "Accept: application/json"

تحديث حالة الدفع لطلب pending.

Parameter In Type Required Description Example
order_id body integer Required معرف الطلب. 1001
status body integer|boolean Required 1 نجاح، غير ذلك يبقى pending. 1

Response

200 {success,msg}.

cURL

curl -X POST "https://rumh.net/api/tenant/v1/update-payment" \
  -H "Accept: application/json"

Webhook استقبال ردود EdfaPay من خارج session.

Parameter In Type Required Description Example
order_id path integer|string Optional معرف الطلب إن أرسله gateway. 1001

Response

200/redirect حسب نتيجة معالجة بوابة الدفع.

cURL

curl -X POST|GET "https://rumh.net/api/v1/payments/edfapay/webhook/{order_id?}" \
  -H "Accept: application/json"

Customer Account

ملف العميل، العناوين، الطلبات، السلة، المفضلة، والتذاكر.

بيانات العميل الحالي وعناوينه.

لا يحتاج هذا الطلب إلى parameters.

Response

200 {user_details}.

cURL

curl -X GET "https://rumh.net/api/tenant/v1/user/profile" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

تحديث بيانات العميل وصورة الحساب.

Parameter In Type Required Description Example
full_name body string Required اسم العميل. Ahmed Zakaria
email body email Required البريد. customer@example.com
country_id body integer Required الدولة. 1
state_id body integer Required المنطقة. 10
city_id body integer Optional المدينة. 24
mobile body string Optional رقم الهاتف. 1000000000
file form-data file Optional صورة الحساب.

Response

200 {success:true}; 422 validation_errors.

cURL

curl -X POST "https://rumh.net/api/tenant/v1/user/update-profile" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

تغيير كلمة مرور العميل الحالي.

Parameter In Type Required Description Example
current_password body string Required كلمة المرور الحالية. secret123
new_password body string Required كلمة المرور الجديدة. newSecret123

Response

200 current_password/new_password; 422 if current password is wrong.

cURL

curl -X POST "https://rumh.net/api/tenant/v1/user/change-password" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

كل عناوين شحن العميل.

لا يحتاج هذا الطلب إلى parameters.

Response

200 {data:[...]}.

cURL

curl -X GET "https://rumh.net/api/tenant/v1/user/all-shipping-address" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

إضافة عنوان شحن جديد.

Parameter In Type Required Description Example
shipping_address_name body string Optional اسم العنوان. Home
full_name body string Required اسم المستلم. Ahmed Zakaria
address body string Required العنوان التفصيلي. Olaya Street
country_id body integer Required الدولة. 1
state_id body integer Required المنطقة. 10
city_id body integer Optional المدينة. 24
postal_code body string Optional الكود البريدي. 12345
phone body string Required الهاتف. +201000000000
email body email Required البريد. customer@example.com

Response

200 service response; 422 validation failed.

cURL

curl -X POST "https://rumh.net/api/tenant/v1/user/add-shipping-address" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

قائمة طلبات العميل.

لا يحتاج هذا الطلب إلى parameters.

Response

Paginated orders.

cURL

curl -X GET "https://rumh.net/api/tenant/v1/user/order" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

تفاصيل طلب عميل.

Parameter In Type Required Description Example
order_id path integer Required معرف الطلب. 1001

Response

200 {data: order_details}.

cURL

curl -X GET "https://rumh.net/api/tenant/v1/user/order/{order_id}" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

إلغاء طلب العميل حسب قواعد المتجر.

Parameter In Type Required Description Example
order_id body integer Required معرف الطلب. 1001

Response

200 success/message or 422 according to order state.

cURL

curl -X POST "https://rumh.net/api/tenant/v1/user/order/cancel" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

عرض المفضلة.

لا يحتاج هذا الطلب إلى parameters.

Response

200 wishlist payload.

cURL

curl -X GET "https://rumh.net/api/tenant/v1/user/wishlist" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

إضافة/إزالة منتج من المفضلة.

Parameter In Type Required Description Example
product_id body integer Required معرف المنتج. 101

Response

200 success/message.

cURL

curl -X POST "https://rumh.net/api/tenant/v1/user/wishlist/toggle" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

عرض السلة.

لا يحتاج هذا الطلب إلى parameters.

Response

200 cart payload.

cURL

curl -X GET "https://rumh.net/api/tenant/v1/user/cart" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

إضافة منتج للسلة.

Parameter In Type Required Description Example
product_id body integer Required معرف المنتج. 101
quantity body integer Optional الكمية. 1

Response

200 success/message.

cURL

curl -X POST "https://rumh.net/api/tenant/v1/user/cart/add" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

تذاكر دعم العميل.

لا يحتاج هذا الطلب إلى parameters.

Response

Paginated tickets.

cURL

curl -X GET "https://rumh.net/api/tenant/v1/user/ticket" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

فتح تذكرة دعم.

Parameter In Type Required Description Example
title body string Required عنوان التذكرة. Payment issue
subject body string Required الموضوع. Checkout
priority body string Required الأولوية. high
description body string Required وصف المشكلة. I need help with my order
departments body string Required قسم الدعم. support

Response

200 {msg,ticket}; 422 validation_errors.

cURL

curl -X POST "https://rumh.net/api/tenant/v1/user/ticket/create" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Localization, Content & Settings

الدول والمدن، اللغة والترجمات، المدونة، السلايدر، والصفحات القانونية.

قائمة الدول المتاحة.

لا يحتاج هذا الطلب إلى parameters.

Response

200 country list.

cURL

curl -X GET "https://rumh.net/api/tenant/v1/country" \
  -H "Accept: application/json"

المناطق/المحافظات حسب الدولة.

Parameter In Type Required Description Example
country_id path integer Required معرف الدولة. 1

Response

200 state list.

cURL

curl -X GET "https://rumh.net/api/tenant/v1/state/{country_id}" \
  -H "Accept: application/json"

المدن حسب المنطقة.

Parameter In Type Required Description Example
state_id path integer Required معرف المنطقة. 10

Response

200 city list.

cURL

curl -X GET "https://rumh.net/api/tenant/v1/city/{state_id}" \
  -H "Accept: application/json"

اللغات المفعلة.

لا يحتاج هذا الطلب إلى parameters.

Response

200 languages list.

cURL

curl -X GET "https://rumh.net/api/tenant/v1/languages" \
  -H "Accept: application/json"

قاموس ترجمة لغة معينة.

Parameter In Type Required Description Example
lang path string Optional كود اللغة. ar

Response

200 translation dictionary.

cURL

curl -X GET "https://rumh.net/api/tenant/v1/translations/{lang?}" \
  -H "Accept: application/json"

ترجمة نص من قاموس النظام.

Parameter In Type Required Description Example
string body string Required النص المطلوب ترجمته. Cart

Response

200 translated string payload.

cURL

curl -X POST "https://rumh.net/api/tenant/v1/translate-string" \
  -H "Accept: application/json"

مقالات المدونة.

لا يحتاج هذا الطلب إلى parameters.

Response

200 blog list.

cURL

curl -X GET "https://rumh.net/api/tenant/v1/blog" \
  -H "Accept: application/json"

تصنيفات المدونة.

لا يحتاج هذا الطلب إلى parameters.

Response

200 categories list.

cURL

curl -X GET "https://rumh.net/api/tenant/v1/blog/categories" \
  -H "Accept: application/json"

تفاصيل مقال بالمعرف أو slug.

Parameter In Type Required Description Example
id_or_slug path integer|string Required معرف أو slug المقال. how-to-sell

Response

200 blog detail; 404 when missing.

cURL

curl -X GET "https://rumh.net/api/tenant/v1/blog/{id_or_slug}" \
  -H "Accept: application/json"

إضافة تعليق على مقال.

Parameter In Type Required Description Example
blog_id body integer Required معرف المقال. 4
comment body string Required نص التعليق. Great article

Response

200/422 according to controller validation.

cURL

curl -X POST "https://rumh.net/api/tenant/v1/blog/comment" \
  -H "Accept: application/json"

صور السلايدر للواجهات والموبايل.

لا يحتاج هذا الطلب إلى parameters.

Response

200 slider list.

cURL

curl -X GET "https://rumh.net/api/tenant/v1/mobile-slider" \
  -H "Accept: application/json"

صفحة الشروط والأحكام.

لا يحتاج هذا الطلب إلى parameters.

Response

200 page content.

cURL

curl -X GET "https://rumh.net/api/tenant/v1/terms-and-condition-page" \
  -H "Accept: application/json"

صفحة سياسة الخصوصية.

لا يحتاج هذا الطلب إلى parameters.

Response

200 page content.

cURL

curl -X GET "https://rumh.net/api/tenant/v1/privacy-policy-page" \
  -H "Accept: application/json"

External Integrations

Endpoints خاصة بربط منصات خارجية أو خدمات خلفية.

قراءة فواتير Odoo من التكامل الخلفي.

لا يحتاج هذا الطلب إلى parameters.

Response

200 invoice list.

cURL

curl -X GET "https://rumh.net/api/v1/odoo/invoices" \
  -H "Accept: application/json"

استقبال/مزامنة طلب من WooCommerce integration module.

Parameter In Type Required Description Example
order body object Required Payload الطلب القادم من WooCommerce. {"id":123}

Response

200/422 according to WooCommerce controller validation.

cURL

curl -X POST "https://rumh.net/api/nazmart-woocommerce/orders" \
  -H "Accept: application/json"