MUDAR Connect API
A JSON REST API for channel managers and property systems. A hotel connected to you takes its rates and availability from you on its MUDAR website and on the MUDAR marketplace, and you receive every booking made in MUDAR.
Base URL: https://connect.aldardasawi.om/api/v1 · Currency is always OMR · Dates are YYYY-MM-DD in Asia/Muscat.
Authentication
OAuth 2.0 client credentials: exchange your keys for a token valid for one hour, then send it with every request.
curl -X POST https://connect.aldardasawi.om/api/v1/oauth/token \
-H 'Content-Type: application/json' \
-d '{"grant_type":"client_credentials","client_id":"mdr_sbx_…","client_secret":"…"}'
{"access_token":"3f9c…","token_type":"Bearer","expires_in":3600,"environment":"sandbox"}
curl https://connect.aldardasawi.om/api/v1/properties -H 'Authorization: Bearer 3f9c…'
Environments
| Environment | Keys | Properties |
|---|---|---|
sandbox | mdr_sbx_… — after your application is approved | Test properties you create (up to 3); hidden from guests, no WhatsApp sent |
production | mdr_live_… — after certification | Hotels that approved your connection request in their MUDAR dashboard |
Errors & limits
HTTP 422
{"error":{"code":"invalid_rate","message":"items[0].rate must be a positive amount in OMR (up to 3 decimals)."},"request_id":"8a1c2f0e9b7d"}
400invalid_json ·401unauthorized / invalid_token ·403sandbox_only / partner_suspended ·404not_found / property_not_found ·409conflict ·422validation ·429rate_limited ·500server_error- Limit: 600 requests per minute per partner, with X-RateLimit-Limit/Remaining/Reset headers. Send date ranges and up to 1000 items per request.
- Availability and rates from today up to 500 days ahead. Every response has a request_id to quote when contacting us.
Pricing model
- A room type maps to MUDAR sellable rooms (inventory). A rate plan belongs to one room type. Rates are per room per night, before the hotel taxes and service charge.
- A stay is sellable when every night has a rate and no stop_sell, availability ≥ 1 every night, and arrival (closed_to_arrival, min_stay, max_stay) and departure (closed_to_departure) restrictions pass. Guests see the cheapest valid plan.
- Effective availability is the lower of your allotment and MUDAR free rooms, so a late update never causes an overbooking. A night without a rate or allotment is not sellable.
Verifying webhooks
Each event is POSTed with X-Mudar-Signature: t=
// PHP
[$t, $v1] = sscanf($_SERVER['HTTP_X_MUDAR_SIGNATURE'], 't=%d,v1=%s');
$body = file_get_contents('php://input');
$ok = hash_equals(hash_hmac('sha256', $t . '.' . $body, $secret), $v1) && abs(time() - $t) < 300;
// Node.js
const [t, v1] = sig.match(/t=(\d+),v1=([a-f0-9]+)/).slice(1);
const ok = crypto.timingSafeEqual(Buffer.from(crypto.createHmac('sha256', secret).update(`${t}.${rawBody}`).digest('hex')), Buffer.from(v1));
Events: booking.created, booking.modified, booking.cancelled. The feed (GET /bookings/feed) is the source of truth: acknowledge what you stored with POST /bookings/feed/ack. Bookings that came from other channels (iCal/OTA) are not sent back to you.
Certification
Your dashboard has a checklist computed from your sandbox calls:
- Obtain an access token
- Create a room type
- Create a rate plan
- Push availability
- Push rates and restrictions
- Read back ARI
- Receive and acknowledge booking.created
- Receive and acknowledge booking.modified
- Receive and acknowledge booking.cancelled
- Confirm a booking with your number
- Deliver a webhook to your endpoint
Use POST /sandbox/properties/{pid}/bookings, then modify and cancel, to generate all three events.
Properties
List the properties you can manage in this environment.
{
"data": [
{
"id": 42,
"code": "al-bahr-hotel",
"name": "Al Bahr Hotel",
"status": "open",
"currency": "OMR"
}
]
} Property details.
Open or close the property for online sales.
{
"status": "closed"
} Ask a hotel to connect to you (production). The hotel approves it in MUDAR.
{
"property_code": "al-bahr-hotel"
} {
"data": {
"property_id": 42,
"status": "pending"
}
} Your connection requests and their status.
Products
List room types.
Create a room type. MUDAR creates the sellable rooms (inventory) or maps mudar_room_type.
{
"code": "DBL",
"name_en": "Deluxe Double",
"name_ar": "غرفة مزدوجة ديلوكس",
"max_occupancy": 2,
"inventory": 10
} {
"data": {
"code": "DBL",
"name_en": "Deluxe Double",
"max_occupancy": 2,
"inventory": 10,
"sellable_rooms": 10,
"status": "active"
}
} Update a room type (names, occupancy, inventory, status).
{
"inventory": 12,
"status": "active"
} List rate plans.
Create a rate plan for a room type.
{
"code": "DBL-BAR",
"room_type_code": "DBL",
"name_en": "Best available rate",
"refundable": true,
"meal_plan": "RO"
} Update a rate plan.
{
"status": "inactive"
} Availability & rates
Set rooms available to sell per room type and date range (0 = closed).
{
"items": [
{
"room_type_code": "DBL",
"date_from": "2027-01-10",
"date_to": "2027-01-31",
"available": 5
}
]
} {
"data": {
"updated_days": 22
}
} Set nightly rates (OMR) and restrictions per rate plan and date range. Omitted fields are unchanged.
{
"items": [
{
"rate_plan_code": "DBL-BAR",
"date_from": "2027-01-10",
"date_to": "2027-01-31",
"rate": 45.5,
"min_stay": 2,
"closed_to_arrival": false,
"stop_sell": false
}
]
} {
"data": {
"updated_days": 22
}
} Read stored availability, rates and restrictions (max 92 days): ?from=YYYY-MM-DD&to=YYYY-MM-DD
Bookings
Unacknowledged booking events (created / modified / cancelled), oldest first. ?limit=50
{
"data": [
{
"event_id": 981,
"event_type": "booking.created",
"property_id": 42,
"booking": {
"id": 5531,
"status": "confirmed",
"room_type_code": "DBL",
"check_in": "2027-01-12",
"check_out": "2027-01-14",
"guest": {
"name": "Sara Al Harthy"
},
"amounts": {
"currency": "OMR",
"total": 96.3
}
}
}
]
} Acknowledge events you have stored, so they leave the feed.
{
"event_ids": [
981
]
} {
"data": {
"acknowledged": 1
}
} Bookings by arrival date: ?from=YYYY-MM-DD&to=YYYY-MM-DD
One booking.
Store your confirmation number on the booking.
{
"confirmation_number": "CM-77812"
} Webhooks
Your webhook URL and signing secret for this environment.
Set the https URL that receives booking events (signed with X-Mudar-Signature).
{
"url": "https://cm.example.com/mudar/webhook"
} Send a signed ping event now and return the result.
{
"data": {
"delivered": true,
"http_status": 200
}
} Reviews
Guest reviews (verified stays only). ?limit=50
Publish the hotel reply to a review.
{
"text": "Thank you for staying with us!"
} Promotions
Automatic offers and promo codes.
Create an offer (kind=offer) or a promo code (kind=code). Discount applies to the room total.
{
"kind": "offer",
"name_en": "Stay 3, save 15%",
"name_ar": "أقم 3 ليالٍ ووفّر 15%",
"discount_type": "percent",
"discount_value": 15,
"min_nights": 3,
"room_type_codes": [
"DBL"
],
"stay_from": "2027-02-01",
"stay_to": "2027-03-31",
"book_until": "2027-03-15",
"active": true
} Update a promotion.
{
"active": false
} Delete a promotion (used ones are deactivated).
Images
Property gallery images.
Add an image from an https URL (JPEG/PNG/WebP, max 8 MB).
{
"url": "https://cdn.example.com/hotel/pool.jpg",
"caption": "Pool"
} Delete an image.
Messages
WhatsApp messages exchanged with the guest of a booking.
Send a WhatsApp message to the guest from the hotel number (simulated in sandbox).
{
"text": "Your room is ready. Welcome!"
} Sandbox
Create a test property (sandbox credentials, max 3).
{
"name": "My test hotel"
} Delete a test property and all its data.
Simulate a guest booking through the real booking engine (uses your rates and availability).
{
"room_type_code": "DBL",
"check_in": "2027-01-12",
"check_out": "2027-01-14",
"guest_name": "Test Guest",
"adults": 2
} Simulate a date change by the guest.
{
"check_in": "2027-01-13",
"check_out": "2027-01-15"
} Simulate a cancellation.