MUDAR Connect

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

EnvironmentKeysProperties
sandboxmdr_sbx_… — after your application is approvedTest properties you create (up to 3); hidden from guests, no WhatsApp sent
productionmdr_live_… — after certificationHotels 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"}
  • 400 invalid_json · 401 unauthorized / invalid_token · 403 sandbox_only / partner_suspended · 404 not_found / property_not_found · 409 conflict · 422 validation · 429 rate_limited · 500 server_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=,v1=, an HMAC-SHA256 of "t.body" with your signing secret. Reject it if the signature differs or t is older than 5 minutes, and answer 2xx within 10 seconds.

// 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

GET/properties

List the properties you can manage in this environment.

Response
{
    "data": [
        {
            "id": 42,
            "code": "al-bahr-hotel",
            "name": "Al Bahr Hotel",
            "status": "open",
            "currency": "OMR"
        }
    ]
}
GET/properties/{pid}

Property details.

PATCH/properties/{pid}

Open or close the property for online sales.

Request
{
    "status": "closed"
}
POST/connections/requests

Ask a hotel to connect to you (production). The hotel approves it in MUDAR.

Request
{
    "property_code": "al-bahr-hotel"
}
Response
{
    "data": {
        "property_id": 42,
        "status": "pending"
    }
}
GET/connections

Your connection requests and their status.

Products

GET/properties/{pid}/room-types

List room types.

POST/properties/{pid}/room-types

Create a room type. MUDAR creates the sellable rooms (inventory) or maps mudar_room_type.

Request
{
    "code": "DBL",
    "name_en": "Deluxe Double",
    "name_ar": "غرفة مزدوجة ديلوكس",
    "max_occupancy": 2,
    "inventory": 10
}
Response
{
    "data": {
        "code": "DBL",
        "name_en": "Deluxe Double",
        "max_occupancy": 2,
        "inventory": 10,
        "sellable_rooms": 10,
        "status": "active"
    }
}
PUT/properties/{pid}/room-types/{code}

Update a room type (names, occupancy, inventory, status).

Request
{
    "inventory": 12,
    "status": "active"
}
GET/properties/{pid}/rate-plans

List rate plans.

POST/properties/{pid}/rate-plans

Create a rate plan for a room type.

Request
{
    "code": "DBL-BAR",
    "room_type_code": "DBL",
    "name_en": "Best available rate",
    "refundable": true,
    "meal_plan": "RO"
}
PUT/properties/{pid}/rate-plans/{code}

Update a rate plan.

Request
{
    "status": "inactive"
}

Availability & rates

POST/properties/{pid}/availability

Set rooms available to sell per room type and date range (0 = closed).

Request
{
    "items": [
        {
            "room_type_code": "DBL",
            "date_from": "2027-01-10",
            "date_to": "2027-01-31",
            "available": 5
        }
    ]
}
Response
{
    "data": {
        "updated_days": 22
    }
}
POST/properties/{pid}/rates

Set nightly rates (OMR) and restrictions per rate plan and date range. Omitted fields are unchanged.

Request
{
    "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
        }
    ]
}
Response
{
    "data": {
        "updated_days": 22
    }
}
GET/properties/{pid}/ari

Read stored availability, rates and restrictions (max 92 days): ?from=YYYY-MM-DD&to=YYYY-MM-DD

Bookings

GET/bookings/feed

Unacknowledged booking events (created / modified / cancelled), oldest first. ?limit=50

Response
{
    "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
                }
            }
        }
    ]
}
POST/bookings/feed/ack

Acknowledge events you have stored, so they leave the feed.

Request
{
    "event_ids": [
        981
    ]
}
Response
{
    "data": {
        "acknowledged": 1
    }
}
GET/properties/{pid}/bookings

Bookings by arrival date: ?from=YYYY-MM-DD&to=YYYY-MM-DD

GET/bookings/{id}

One booking.

POST/bookings/{id}/confirm

Store your confirmation number on the booking.

Request
{
    "confirmation_number": "CM-77812"
}

Webhooks

GET/webhook

Your webhook URL and signing secret for this environment.

PUT/webhook

Set the https URL that receives booking events (signed with X-Mudar-Signature).

Request
{
    "url": "https://cm.example.com/mudar/webhook"
}
POST/webhook/test

Send a signed ping event now and return the result.

Response
{
    "data": {
        "delivered": true,
        "http_status": 200
    }
}

Reviews

GET/properties/{pid}/reviews

Guest reviews (verified stays only). ?limit=50

POST/reviews/{id}/reply

Publish the hotel reply to a review.

Request
{
    "text": "Thank you for staying with us!"
}

Promotions

GET/properties/{pid}/promotions

Automatic offers and promo codes.

POST/properties/{pid}/promotions

Create an offer (kind=offer) or a promo code (kind=code). Discount applies to the room total.

Request
{
    "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
}
PUT/properties/{pid}/promotions/{id}

Update a promotion.

Request
{
    "active": false
}
DELETE/promotions/{id}

Delete a promotion (used ones are deactivated).

Images

GET/properties/{pid}/images

Property gallery images.

POST/properties/{pid}/images

Add an image from an https URL (JPEG/PNG/WebP, max 8 MB).

Request
{
    "url": "https://cdn.example.com/hotel/pool.jpg",
    "caption": "Pool"
}
DELETE/images/{id}

Delete an image.

Messages

GET/bookings/{id}/messages

WhatsApp messages exchanged with the guest of a booking.

POST/bookings/{id}/messages

Send a WhatsApp message to the guest from the hotel number (simulated in sandbox).

Request
{
    "text": "Your room is ready. Welcome!"
}

Sandbox

POST/sandbox/properties

Create a test property (sandbox credentials, max 3).

Request
{
    "name": "My test hotel"
}
DELETE/sandbox/properties/{pid}

Delete a test property and all its data.

POST/sandbox/properties/{pid}/bookings

Simulate a guest booking through the real booking engine (uses your rates and availability).

Request
{
    "room_type_code": "DBL",
    "check_in": "2027-01-12",
    "check_out": "2027-01-14",
    "guest_name": "Test Guest",
    "adults": 2
}
POST/sandbox/bookings/{id}/modify

Simulate a date change by the guest.

Request
{
    "check_in": "2027-01-13",
    "check_out": "2027-01-15"
}
POST/sandbox/bookings/{id}/cancel

Simulate a cancellation.