# مطورون، مطورون، مطورون!

كل ما في Makeplans متاح عبر API: REST و JSON، و webhooks لكل تغيير، وخادم MCP للمساعدين الأذكياء.

[اقرأ توثيق API](https://developer.makeplans.com)

- REST + JSON
- Webhooks
- MCP
- iCal
- CSV

```
$ curl https://youraccount.makeplans.com/api/v1/services/42/slots?from=2026-11-19 \
  -H 'Authorization: Bearer $MAKEPLANS_API_KEY' \
  -H 'User-Agent: MyApp' \
  -H 'Accept: application/json'
[
  {
    "slot": {
      "timestamp": "2026-11-19T10:30:00+01:00",
      "timestamp_end": "2026-11-19T11:30:00+01:00",
      "free": 1,
      "available_resources": [1, 2],
      "maximum_capacity": 2
    }
  },
  {
    "slot": {
      "timestamp": "2026-11-19T13:00:00+01:00",
      "timestamp_end": "2026-11-19T14:00:00+01:00",
      "free": 2,
      "available_resources": [1, 2],
      "maximum_capacity": 2
    }
  }
]$ curl https://youraccount.makeplans.com/api/v1/bookings -X POST \
  -H 'Authorization: Bearer $MAKEPLANS_API_KEY' \
  -H 'User-Agent: MyApp' \
  -H 'Accept: application/json' \
  -d 'booking[service_id]=42' \
  -d 'booking[resource_id]=1' \
  -d 'booking[booked_from]=2026-11-19T10:30:00+01:00' \
  -d 'booking[booked_to]=2026-11-19T11:30:00+01:00'
{
  "booking": {
    "id": 1337,
    "state": "confirmed",
    "service_id": 42,
    "resource_id": 1,
    "booked_from": "2026-11-19T10:30:00+01:00",
    "booked_to": "2026-11-19T11:30:00+01:00"
  }
}
```

```
curl https://youraccount.makeplans.com/api/v1/services/42/slots?from=2026-11-19 \
  -H 'Authorization: Bearer $MAKEPLANS_API_KEY' \
  -H 'User-Agent: MyApp' \
  -H 'Accept: application/json'
```

```
[
  {
    "slot": {
      "timestamp": "2026-11-19T10:30:00+01:00",
      "timestamp_end": "2026-11-19T11:30:00+01:00",
      "free": 1,
      "available_resources": [1, 2],
      "maximum_capacity": 2
    }
  },
  {
    "slot": {
      "timestamp": "2026-11-19T13:00:00+01:00",
      "timestamp_end": "2026-11-19T14:00:00+01:00",
      "free": 2,
      "available_resources": [1, 2],
      "maximum_capacity": 2
    }
  }
]
```

```
# 10:30 is free. Book it.
```

```
curl https://youraccount.makeplans.com/api/v1/bookings -X POST \
  -H 'Authorization: Bearer $MAKEPLANS_API_KEY' \
  -H 'User-Agent: MyApp' \
  -H 'Accept: application/json' \
  -d 'booking[service_id]=42' \
  -d 'booking[resource_id]=1' \
  -d 'booking[booked_from]=2026-11-19T10:30:00+01:00' \
  -d 'booking[booked_to]=2026-11-19T11:30:00+01:00'
```

```
{
  "booking": {
    "id": 1337,
    "state": "confirmed",
    "service_id": 42,
    "resource_id": 1,
    "booked_from": "2026-11-19T10:30:00+01:00",
    "booked_to": "2026-11-19T11:30:00+01:00"
  }
}
```

```
const api = "https://youraccount.makeplans.com/api/v1";
const headers = {
  Authorization: `Bearer ${process.env.MAKEPLANS_API_KEY}`,
  "User-Agent": "MyApp",
  Accept: "application/json",
};

// Find the first free slot
const slots = await fetch(`${api}/services/42/slots?from=2026-11-19`, { headers })
  .then((res) => res.json());
const { slot } = slots.find(({ slot }) => slot.free > 0);

// Book it
const booking = await fetch(`${api}/bookings`, {
  method: "POST",
  headers,
  body: new URLSearchParams({
    "booking[service_id]": "42",
    "booking[resource_id]": String(slot.available_resources[0]),
    "booking[booked_from]": slot.timestamp,
    "booking[booked_to]": slot.timestamp_end,
  }),
}).then((res) => res.json());

console.log(booking);
```

```
{
  "booking": {
    "id": 1337,
    "state": "confirmed",
    "service_id": 42,
    "resource_id": 1,
    "booked_from": "2026-11-19T10:30:00+01:00",
    "booked_to": "2026-11-19T11:30:00+01:00"
  }
}
```

```
require "net/http"
require "json"

API = "https://youraccount.makeplans.com/api/v1"

def makeplans(request)
  request["Authorization"] = "Bearer #{ENV.fetch('MAKEPLANS_API_KEY')}"
  request["User-Agent"] = "MyApp"
  request["Accept"] = "application/json"
  uri = request.uri
  response = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(request) }
  JSON.parse(response.body)
end

# Find the first free slot
slots = makeplans(Net::HTTP::Get.new(URI("#{API}/services/42/slots?from=2026-11-19")))
slot = slots.map { |s| s["slot"] }.find { |s| s["free"] > 0 }

# Book it
post = Net::HTTP::Post.new(URI("#{API}/bookings"))
post.set_form_data(
  "booking[service_id]" => 42,
  "booking[resource_id]" => slot["available_resources"].first,
  "booking[booked_from]" => slot["timestamp"],
  "booking[booked_to]" => slot["timestamp_end"]
)
puts makeplans(post)
```

```
{
  "booking": {
    "id": 1337,
    "state": "confirmed",
    "service_id": 42,
    "resource_id": 1,
    "booked_from": "2026-11-19T10:30:00+01:00",
    "booked_to": "2026-11-19T11:30:00+01:00"
  }
}
```

```
import os
import requests

API = "https://youraccount.makeplans.com/api/v1"
session = requests.Session()
session.headers.update({
    "Authorization": f"Bearer {os.environ['MAKEPLANS_API_KEY']}",
    "User-Agent": "MyApp",
    "Accept": "application/json",
})

# Find the first free slot
slots = session.get(f"{API}/services/42/slots", params={"from": "2026-11-19"}).json()
slot = next(s["slot"] for s in slots if s["slot"]["free"] > 0)

# Book it
booking = session.post(f"{API}/bookings", data={
    "booking[service_id]": 42,
    "booking[resource_id]": slot["available_resources"][0],
    "booking[booked_from]": slot["timestamp"],
    "booking[booked_to]": slot["timestamp_end"],
}).json()
print(booking)
```

```
{
  "booking": {
    "id": 1337,
    "state": "confirmed",
    "service_id": 42,
    "resource_id": 1,
    "booked_from": "2026-11-19T10:30:00+01:00",
    "booked_to": "2026-11-19T11:30:00+01:00"
  }
}
```

## ابدأ العمل خلال دقائق

### احصل على مفتاح API

فعّل API من «الإعدادات» ثم «التكاملات» ثم «API»، وانسخ مفتاحك.

### أرسل طلبك الأول

أرسل المفتاح بصيغة Bearer token. لكل كائن نقطة وصول خاصة به، وكل شيء بصيغة JSON.

### تابع التغييرات

أضف webhook وسنرسل طلب POST إلى خادمك عند تغير الحجوزات أو الفعاليات أو العملاء.

## واجهتان برمجيتان

### API العام

لا يحتاج إلى مفتاح. اعرض الخدمات والأوقات المتاحة وابدأ الحجز مباشرة من موقعك.

`https://youraccount.makeplans.com/`

### API الخاص

وصول كامل إلى حسابك بمفتاح API، للواجهة الخلفية والتكاملات. أبقِ المفتاح خارج أي شيفرة علنية.

`https://youraccount.makeplans.com/api/v1/`

## اربط Makeplans بتطبيقك الداخلي أو بموقعك

جميع المزايا المتوفرة في Makeplans متاحة عبر API. وهي واجهة API مبنية على REST وتستخدم JSON. ويمكننا أيضا إرسال webhooks.

- [Slots](https://developer.makeplans.com/endpoints/slots/)
- [Bookings](https://developer.makeplans.com/endpoints/bookings/)
- [People](https://developer.makeplans.com/endpoints/people/)
- [Services](https://developer.makeplans.com/endpoints/services/)
- [Events](https://developer.makeplans.com/endpoints/events/)
- [Resources](https://developer.makeplans.com/endpoints/resources/)
- [Resource Exception Dates](https://developer.makeplans.com/endpoints/resource-exception-dates/)
- [Providers](https://developer.makeplans.com/endpoints/providers/)
- [Categories](https://developer.makeplans.com/endpoints/categories/)
- [Coupons](https://developer.makeplans.com/endpoints/coupons/)
- [Orders](https://developer.makeplans.com/endpoints/orders/)
- [Gift Cards](https://developer.makeplans.com/endpoints/gift-cards/)
- [Message Templates](https://developer.makeplans.com/endpoints/message-templates/)
- [Webhooks](https://developer.makeplans.com/endpoints/webhooks/)
- [Account](https://developer.makeplans.com/endpoints/account/)
- [Passes](https://developer.makeplans.com/endpoints/passes/)
- [Subscriptions](https://developer.makeplans.com/endpoints/subscriptions/)
- [عرض كل نقاط الوصول](https://developer.makeplans.com/endpoints/)

## اربط مساعدك الذكي (MCP)

يوفر Makeplans خادم MCP ليتمكن المساعدون الأذكياء مثل Claude و ChatGPT من التعامل مع حجوزاتك. اطلب من مساعدك التحقق من الأوقات المتاحة أو البحث عن عميل أو إنشاء الحجوزات وإلغاءها، باستخدام بيانات دخولك إلى Makeplans.

MCP (Model Context Protocol) معيار مفتوح. أي مساعد أو وكيل يدعم MCP يستطيع الاتصال، بلا إضافات مغلقة ولا ارتباط إجباري، تماما كما نبني كل شيء آخر.

### الأدوات المتاحة لمساعدك

- `find_available_slots`
- `list_services`
- `list_events`
- `list_bookings`
- `get_booking`
- `find_customer`
- `create_booking`
- `cancel_booking`

### اربط Claude Code بسطر واحد

```
claude mcp add --transport http makeplans \
  https://youraccount.makeplans.com/api/mcp \
  --header "Authorization: Bearer $MAKEPLANS_API_KEY"
```

اقرأ المزيد عن [مساعد الحجز بالذكاء الاصطناعي](/ar/solutions/ai-booking-assistant/).

احجز للعميلة Anna جلسة تدليك يوم الجمعة الساعة 14:00

سأبحث عن خدمة التدليك وعن بيانات Anna.

M`list_services`

```
→{}←[{"id": 42, "title": "Massage", "interval": 60}]
```

M`find_customer`

```
→{"query": "Anna"}←[{"id": 7, "name": "Anna Nordmann"}]
```

M`find_available_slots`

```
→{"service_id": 42, "from": "2026-11-13"}←[{"timestamp": "2026-11-13T14:00:00+01:00", "free": 1}]
```

M`create_booking`

```
→{"service_id": 42, "person_id": 7, "booked_from": "2026-11-13T14:00:00+01:00"}←{"id": 1338, "state": "confirmed"}
```

تم الحجز: Anna Nordmann، جلسة تدليك يوم الجمعة الساعة 14:00. ستصلها رسالة تأكيد وتذكير.

## Webhooks لكل تغيير

عند إنشاء حجز أو تأكيده أو نقله أو إلغائه، نرسله بطلب POST إلى خادمك موقعا بخوارزمية HMAC SHA-256 لتتأكد أنه صادر منا. ويمكن أن يستقبله Zapier و Make أيضا.

Mmakeplans

{ }your server

Zapier

Make

POST https://example.com/webhooks

```
X-MakePlans-Signature: sha256=5257a869e7ec…{
  "event": "booking.created",
  "idempotency_id": "evt_4810",
  "generated_at": "2026-11-12T02:37:29Z",
  "performed_by": "customer",
  "data": {
    "object": "booking",
    "id": 1337,
    "booking": { "id": 1337, "state": "confirmed" }
  }
}
```

tail -f webhooks.log

```
02:37:29 POST /webhooks **booking.created** _200 OK_signature ✓
```

## تخصيص موقع الحجز القياسي

يمكن تخصيص موقع الحجز القياسي باستخدام ملف CSS خاص. ويمكن كذلك [تخصيص النماذج](https://github.com/makeplans/makeplans-custom-forms) وجميع [الرسائل الصادرة](https://github.com/makeplans/makeplans-custom-messages) باستخدام لغة القوالب Liquid.

custom.css

.booking-site {--accent: #2a8c8f;--background: #f1f8f8;--text: #173f44;--soft: #d9ecec;--radius: 14px;--font: "Avenir Next", sans-serif;}

// انقر على قيمة لتغييرها

 نشاطك التجاري موقع الحجز الخاص بك، بأسلوبك 

**12**** 13 ****14**** 15**

09:0010:3011:0013:0014:3016:00
احجز الآن

### تكاملات جاهزة

يتضمن Makeplans عددا كبيرا من التكاملات الجاهزة. راجع [صفحة التكاملات](/ar/integrations/) لمزيد من المعلومات. وإضافة إلى تكاملاتنا المباشرة، لدينا تكامل مع منصتي الربط [Zapier](/ar/integrations/zapier/) و [Make](/ar/integrations/make/)، مما يتيح لك الربط مع تطبيقات أخرى من دون برمجة.

### تصدير البيانات

نوفر تصدير بيانات الحجوزات والعملاء والفعاليات بصيغة CSV جاهزة للتنزيل بسهولة.

### خلاصات iCalendar

لعرض مواعيد Makeplans في تطبيقات التقويم الأخرى نوفر خلاصة iCalendar يمكن استخدامها في Google Calendar وتطبيق التقويم على macOS و iOS وعلى Android و Outlook وغيرها من تطبيقات التقويم.

## تعمق في التوثيق

- [الدليل](https://developer.makeplans.com/guide/getting-started/)
- [نقاط وصول API](https://developer.makeplans.com/endpoints/)
- [أمثلة](https://developer.makeplans.com/examples/overview/)
- [سجل التغييرات](https://developer.makeplans.com/changelog/)
- [API الشركاء](https://developer.makeplans.com/partner/)

تجد [توثيق API على developer.makeplans.com](https://developer.makeplans.com).
