مرجع واجهة البرمجة

Complete reference for the Rentex REST API. Build integrations and automate your fleet management.

المصادقة

All API requests require a Bearer token in the Authorization header. You can generate an API token from your dashboard settings.

Authorization: Bearer your-api-token-here

Important: Keep your API tokens secure. Do not share them in public repositories or client-side code.

الرابط الأساسي

All API endpoints are relative to the following base URL:

https://api.rentex.com/v1

حدود المعدل

API requests are rate-limited to ensure fair usage and platform stability.

Request Limit

1,000

طلب في الساعة

Rate Limit Response

429

طلبات كثيرة جداً

Rate limit headers are included in every response:

X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 998
X-RateLimit-Reset: 1672531200

نقاط نهاية المركبات

Manage your fleet vehicles including creation, updates, and deletion.

الطريقة نقطة الاتصال الوصف
GET /api/v1/vehicles عرض جميع المركبات
GET /api/v1/vehicles/{id} عرض تفاصيل المركبة
POST /api/v1/vehicles Create vehicle
PUT /api/v1/vehicles/{id} تحديث المركبة
DELETE /api/v1/vehicles/{id} حذف المركبة

طلب نموذجي

curl -X GET https://api.rentex.com/v1/vehicles \
  -H "Authorization: Bearer your-api-token" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json"

استجابة نموذجية

{
  "data": [
    {
      "id": 1,
      "make": "Toyota",
      "model": "Camry",
      "year": 2024,
      "plate_number": "ABC-1234",
      "status": "available",
      "daily_rate": 150.00,
      "currency": "SAR",
      "created_at": "2026-01-15T10:30:00Z"
    }
  ],
  "meta": {
    "current_page": 1,
    "total": 45,
    "per_page": 15
  }
}

نقاط نهاية الحجوزات

Create and manage rental bookings for your fleet.

الطريقة نقطة الاتصال الوصف
GET /api/v1/bookings عرض جميع الحجوزات
POST /api/v1/bookings إنشاء حجز جديد
GET /api/v1/bookings/{id} عرض تفاصيل الحجز
PUT /api/v1/bookings/{id}/status تحديث حالة الحجز

نقاط نهاية العملاء

Manage customer records and profiles.

الطريقة نقطة الاتصال الوصف
GET /api/v1/customers عرض جميع العملاء
POST /api/v1/customers إنشاء عميل جديد
GET /api/v1/customers/{id} عرض تفاصيل العميل

الويب هوكس

Receive real-time notifications when events occur in your Rentex account. Configure webhook URLs in your dashboard settings.

أنواع الأحداث

booking.created

Triggered when a new booking is created

booking.completed

Triggered when a booking is completed

vehicle.maintenance

Triggered when maintenance is scheduled

payment.received

Triggered when a payment is received

Webhook Payload Example

{
  "event": "booking.created",
  "timestamp": "2026-03-15T14:30:00Z",
  "data": {
    "booking_id": 1234,
    "customer_id": 56,
    "vehicle_id": 12,
    "start_date": "2026-03-20",
    "end_date": "2026-03-25"
  }
}

رموز الخطأ

The API uses standard HTTP status codes to indicate the success or failure of requests.

الرمز الحالة الوصف
200 OK Request was successful
201 تم الإنشاء Resource was successfully created
400 طلب غير صالح The request was invalid or malformed
401 غير مصرح Authentication credentials are missing or invalid
403 محظور You do not have permission to access this resource
404 غير موجود The requested resource was not found
429 طلبات كثيرة جداً Rate limit exceeded. Wait before retrying.
500 Internal Server Error An unexpected error occurred on the server

SDKs

Official client libraries to help you integrate with the Rentex API quickly.

PHP
composer require rentex/php-sdk
Python
pip install rentex-sdk
Node.js
npm install @rentex/node-sdk
Go
go get github.com/rentex/go-sdk
تواصل معنا عبر واتساب