Moobi Channel API v1
Satu REST API untuk ketersediaan, harga, dan booking OTA. PMS hanya berbicara dengan Moobi Channel; konektivitas OTA disediakan oleh Channex, dan di extranet OTA penyedia koneksinya tercatat sebagai "Channex".
Mulai
- Daftar di portal partner, verifikasi email, lalu buat kredensial sandbox.
- Minta token, daftarkan webhook, buat properti / tipe kamar / rate plan (isi
external_refdengan ID milik PMS). - Kirim ARI 365 hari, buat channel, petakan, aktifkan.
- Uji booking baru / ubah / batal di sandbox, ack setiap revisi, lalu ajukan akses live di portal.
Alamat dasar: https://www.channel.moobihotel.id/v1
Autentikasi
OAuth 2.0 client credentials. Token berlaku 1 jam; minta token baru saat kedaluwarsa (401 invalid_token).
curl -X POST https://www.channel.moobihotel.id/v1/oauth/token \
-H 'Content-Type: application/json' \
-d '{"grant_type":"client_credentials","client_id":"mc_test_...","client_secret":"mcs_..."}'
{"access_token":"mct_test_...","token_type":"Bearer","expires_in":3600,"scope":"properties:read ...","environment":"sandbox"}Kirim di setiap permintaan: Authorization: Bearer <token>. Scope: properties:read properties:write ari:read ari:write channels:read channels:write bookings:read bookings:write webhooks:write. Daftar IP yang diizinkan bisa dipasang per kredensial di portal.
Konvensi
- JSON UTF-8, nama kolom snake_case. Tanggal
YYYY-MM-DDmenurut zona waktu properti; waktu ISO 8601 UTC. - Nominal berupa string desimal (
"750000.00") dengan kode mata uang ISO 4217 milik properti. - ID berawalan:
prop_,rt_,rp_,ch_,bk_,rev_,tsk_,wh_. - Idempotency-Key (UUID) wajib untuk setiap POST yang membuat sesuatu dan setiap penulisan ARI. Disimpan 24 jam: kunci + isi sama = jawaban pertama diulang (header
Idempotent-Replayed: true); kunci sama isi beda = 409. - Paginasi kursor:
?limit=50&after=<next_cursor>(maks. 200). Jawaban{"data":[...],"next_cursor":null|"..."}. - Batas 600 permintaan/menit per partner; header
RateLimit-Limit,RateLimit-Remaining,RateLimit-Reset, danRetry-Aftersaat 429. - Versi di path (
/v1). Kolom baru bisa ditambahkan kapan saja: abaikan kolom yang tidak dikenal. - Error:
application/problem+json(RFC 9457) dengancode,detail,errors[]per kolom, danrequest_id.
Properti, tipe kamar, rate plan
POST https://www.channel.moobihotel.id/v1/properties
Idempotency-Key: 3f0c...
{"name":"Hotel Contoh","currency":"IDR","timezone":"Asia/Jakarta","country":"ID","city":"Denpasar","external_ref":"PMS-HOTEL-17"}
POST https://www.channel.moobihotel.id/v1/properties/prop_.../room_types
{"name":"Deluxe","count_of_rooms":10,"occupancy":{"adults":2,"children":1,"default":2},"external_ref":"RT-1"}
POST https://www.channel.moobihotel.id/v1/properties/prop_.../rate_plans
{"room_type_id":"rt_...","meal_plan":"room_only","sell_mode":"per_room"}
-> name otomatis "Deluxe - Room Only"meal_plan: room_only, breakfast, half_board, full_board, all_inclusive. sell_mode: per_room atau per_person. Nama rate plan unik per properti.
ARI: ketersediaan, harga, restriksi
Jawaban 202 berisi task; nilai dikirim ke OTA lewat antrean yang menggabungkan nilai (batas Channex per properti tidak terlampaui). Hanya kolom yang dikirim yang berubah; untuk tanggal dan kolom yang sama, nilai terakhir menang. Rentang maks. 365 hari ke depan, tanggal lampau ditolak, maks. 1.000 nilai per permintaan. Bila ada satu nilai salah, seluruh permintaan ditolak 422 dan tidak ada yang disimpan.
POST https://www.channel.moobihotel.id/v1/properties/prop_.../availability
{"values":[{"room_type_id":"rt_...","date_from":"2027-01-01","date_to":"2027-03-31","availability":7}]}
POST https://www.channel.moobihotel.id/v1/properties/prop_.../restrictions
{"values":[
{"rate_plan_id":"rp_...","date_from":"2027-01-01","date_to":"2027-03-31","rate":"750000.00","min_stay_arrival":2},
{"rate_plan_id":"rp_...","date_from":"2027-02-14","date_to":"2027-02-14","stop_sell":true},
{"rate_plan_id":"rp_pp...","date_from":"2027-01-01","date_to":"2027-01-31","days":["fr","sa"],
"rates":[{"occupancy":1,"rate":"500000"},{"occupancy":2,"rate":"700000"}]}]}
GET https://www.channel.moobihotel.id/v1/tasks/tsk_... -> {"status":"sent","values":...,"failed":0,"errors":[]}Kolom restriksi: rate (atau rates untuk per_person), min_stay_arrival, min_stay_through, max_stay, closed_to_arrival, closed_to_departure, stop_sell, days (opsional: mo tu we th fr sa su).
Channel OTA & mapping
Status: pending_ota_approval → mapping_required → ready → active; juga error dan inactive. Channel menjadi ready bila setiap kamar OTA punya minimal satu rate yang dipetakan dan semua pasangan yang dipetakan masih ada di OTA.
POST https://www.channel.moobihotel.id/v1/properties/prop_.../channels
{"ota":"booking_com","ota_property_id":"1234567"}
GET https://www.channel.moobihotel.id/v1/properties/prop_.../channels/ch_.../ota_rooms
PUT https://www.channel.moobihotel.id/v1/properties/prop_.../channels/ch_.../mappings
{"mappings":[
{"ota_room_id":"111","ota_rate_id":"9001","rate_plan_id":"rp_...","occupancy":2},
{"ota_room_id":"222","ota_rate_id":"9101","rate_plan_id":"rp_..."}]}
POST https://www.channel.moobihotel.id/v1/properties/prop_.../channels/ch_.../activateMapping ditolak bila kosong, ada kamar/rate OTA yang dipetakan dua kali, atau rate plan milik properti lain. Sebelum menulis ke OTA, mapping lama disimpan; bila verifikasi gagal, mapping lama dipulihkan (502 mapping_not_applied). Tidak ingin membangun layar mapping sendiri? Pakai POST .../connect_sessions dan buka url yang diberikan (30 menit).
Booking
Setiap booking baru, perubahan, atau pembatalan dari OTA menjadi satu revisi. Ambil dari feed, simpan, lalu ack. Revisi tanpa ack tetap muncul di feed, jadi tidak ada booking yang hilang walau webhook gagal; revisi yang belum di-ack 30 menit memicu email peringatan.
GET https://www.channel.moobihotel.id/v1/bookings/feed?property_id=prop_...
{"data":[{"id":"rev_...","booking_id":"bk_...","property_id":"prop_...","revision_number":1,"status":"new",
"ota":"booking_com","ota_reservation_code":"4012345678","arrival_date":"2027-01-10","departure_date":"2027-01-12",
"currency":"IDR","amount":"1500000.00","payment_collect":"ota",
"customer":{"name":"Budi","surname":"Santoso","email":"...","phone":"...","country":"ID"},
"rooms":[{"room_type_id":"rt_...","rate_plan_id":"rp_...","checkin_date":"2027-01-10","checkout_date":"2027-01-12",
"occupancy":{"adults":2,"children":0,"infants":0},"amount":"1500000.00",
"days":[{"date":"2027-01-10","rate":"750000.00"},{"date":"2027-01-11","rate":"750000.00"}]}],
"notes":"","acked":false,"received_at":"..."}],"next_cursor":null}
POST https://www.channel.moobihotel.id/v1/bookings/revisions/rev_.../ack
{"pms_reservation_id":"RES-99812"}status: new, modified, cancelled. payment_collect: ota (OTA menagih tamu) atau property (hotel menagih). Data kartu kredit tidak diteruskan. Pembatalan/perubahan hanya dari sisi OTA. Dengan auto_reduce_availability: true pada properti, ketersediaan langsung dikurangi saat booking masuk (dan dikembalikan saat batal).
Webhook
Event: booking.created, booking.modified, booking.cancelled, channel.status_changed, channel.mapping_invalid, ari_task.failed (dan webhook.test). Isi berupa ringkasan; data lengkap diambil dari API. Kiriman gagal (bukan 2xx) diulang dengan jeda makin panjang selama 24 jam.
Moobi-Signature: t=1767225600,v1=5f2b... (HMAC-SHA256 dari "<t>.<body mentah>" dengan secret endpoint)
Moobi-Event-Id: evt_...
Moobi-Event-Type: booking.created
{"id":"evt_...","type":"booking.created","created_at":"...","livemode":false,
"data":{"booking_id":"bk_...","revision_id":"rev_...","property_id":"prop_...","status":"new",...}}// PHP: verifikasi tanda tangan
$body = file_get_contents('php://input');
preg_match('/t=(\d+),v1=([0-9a-f]+)/', $_SERVER['HTTP_MOOBI_SIGNATURE'] ?? '', $m);
$ok = $m && abs(time() - (int)$m[1]) <= 300
&& hash_equals(hash_hmac('sha256', $m[1] . '.' . $body, $secret), $m[2]);
if (!$ok) { http_response_code(400); exit; }
Sandbox & live
Alamat sama; jenis kredensial yang menentukan. mc_test_ memakai database sandbox terpisah dan OTA simulasi / Channex staging. mc_live_ memakai produksi dan baru bisa dibuat setelah pengajuan live disetujui. Syarat lolos: revisi baru, ubah, dan batal di sandbox sudah di-ack; webhook booking diterima endpoint Anda; ARI minimal 365 nilai terkirim tanpa error.
POST https://www.channel.moobihotel.id/v1/sandbox/bookings
{"property_id":"prop_...","room_type_id":"rt_...","rate_plan_id":"rp_...","arrival_date":"2027-01-10","departure_date":"2027-01-12","rooms":1}
POST https://www.channel.moobihotel.id/v1/sandbox/bookings
{"property_id":"prop_...","status":"modified","booking_id":"bk_...","departure_date":"2027-01-13"}
POST https://www.channel.moobihotel.id/v1/sandbox/bookings
{"property_id":"prop_...","status":"cancelled","booking_id":"bk_..."}
Semua endpoint
Token
| Metode | Path | Scope | Keterangan |
|---|---|---|---|
| POST | /oauth/token | - | Tukar client_id + client_secret dengan token 1 jam (client credentials) |
Properti, tipe kamar, rate plan
| Metode | Path | Scope | Keterangan |
|---|---|---|---|
| POST | /properties | properties:write | Daftarkan hotel (Idempotency-Key wajib) |
| GET | /properties | properties:read | Daftar hotel; filter status, external_ref |
| GET | /properties/{property_id} | properties:read | Detail hotel |
| PATCH | /properties/{property_id} | properties:write | Ubah nama, kontak, auto_reduce_availability |
| POST | /properties/{property_id}/deactivate | properties:write | Putus semua channel, hentikan ARI |
| POST | /properties/{property_id}/room_types | properties:write | Tambah tipe kamar |
| GET | /properties/{property_id}/room_types | properties:read | Daftar tipe kamar |
| PATCH / DELETE | /properties/{property_id}/room_types/{room_type_id} | properties:write | Ubah / hapus (ditolak bila masih dipetakan) |
| POST | /properties/{property_id}/rate_plans | properties:write | Tambah rate plan; nama otomatis "<Tipe kamar> - <Paket>" |
| GET | /properties/{property_id}/rate_plans | properties:read | Daftar; filter room_type_id |
| PATCH / DELETE | /properties/{property_id}/rate_plans/{rate_plan_id} | properties:write | Ubah / hapus (ditolak bila masih dipetakan) |
ARI
| Metode | Path | Scope | Keterangan |
|---|---|---|---|
| POST | /properties/{property_id}/availability | ari:write | Ketersediaan per tipe kamar per rentang tanggal; jawab 202 + task |
| POST | /properties/{property_id}/restrictions | ari:write | Harga & restriksi per rate plan; jawab 202 + task |
| GET | /properties/{property_id}/availability | ari:read | Nilai tersimpan; date_from, date_to, room_type_id |
| GET | /properties/{property_id}/restrictions | ari:read | Nilai tersimpan; date_from, date_to, rate_plan_id |
| GET | /tasks/{task_id} | ari:read | queued / sent / partial / failed + error per nilai |
| POST | /properties/{property_id}/full_sync | ari:write | Kirim ulang 365 hari; maks. 1x per jam |
Channel OTA & mapping
| Metode | Path | Scope | Keterangan |
|---|---|---|---|
| GET | /channels/catalog | channels:read | OTA yang tersedia + langkah di extranet |
| POST | /properties/{property_id}/channels | channels:write | Buat koneksi: ota, ota_property_id |
| GET | /properties/{property_id}/channels | channels:read | Daftar koneksi & status |
| GET | /properties/{property_id}/channels/{channel_id} | channels:read | Detail; ?refresh=true untuk cek ulang ke OTA |
| GET | /properties/{property_id}/channels/{channel_id}/ota_rooms | channels:read | Kamar & rate di OTA, untuk dipetakan |
| GET / PUT | /properties/{property_id}/channels/{channel_id}/mappings | channels:read / write | Baca / simpan seluruh mapping sekaligus |
| POST | /properties/{property_id}/channels/{channel_id}/activate | channels:write | Mulai kirim ARI & terima booking (status harus ready) |
| POST | /properties/{property_id}/channels/{channel_id}/deactivate | channels:write | Hentikan koneksi |
| POST | /properties/{property_id}/connect_sessions | channels:write | Tautan 30 menit ke halaman koneksi ber-merek Moobi |
Booking
| Metode | Path | Scope | Keterangan |
|---|---|---|---|
| GET | /bookings/feed | bookings:read | Revisi belum di-ack, urut waktu; filter property_id |
| POST | /bookings/revisions/{revision_id}/ack | bookings:write | Tandai revisi masuk PMS; pms_reservation_id opsional |
| GET | /bookings/{booking_id} | bookings:read | Keadaan terakhir booking |
| GET | /bookings/{booking_id}/revisions | bookings:read | Riwayat revisi |
| GET | /properties/{property_id}/bookings | bookings:read | Cari: arrival_from, arrival_to, ota, status |
Webhook
| Metode | Path | Scope | Keterangan |
|---|---|---|---|
| POST / GET | /webhooks | webhooks:write | Daftarkan (secret tampil sekali) / daftar endpoint |
| DELETE | /webhooks/{webhook_id} | webhooks:write | Hapus endpoint |
| POST | /webhooks/{webhook_id}/test | webhooks:write | Kirim event uji |
Sandbox (kredensial mc_test_ saja)
| Metode | Path | Scope | Keterangan |
|---|---|---|---|
| POST | /sandbox/bookings | bookings:read | Buat revisi uji: status new / modified / cancelled |
| POST | /sandbox/reset | properties:write | Kosongkan data sandbox Anda |
Kode error
Status 502/503 aman diulang. Error lain perlu perbaikan permintaan dulu.
| HTTP | code |
|---|---|
| 400 | invalid_json |
| 400 | invalid_limit |
| 400 | invalid_cursor |
| 400 | invalid_date |
| 400 | invalid_date_range |
| 400 | date_range_too_long |
| 400 | idempotency_key_required |
| 400 | invalid_idempotency_key |
| 400 | unsupported_grant_type |
| 400 | invalid_scope |
| 401 | missing_token |
| 401 | invalid_token |
| 401 | invalid_client |
| 403 | insufficient_scope |
| 403 | ip_not_allowed |
| 403 | property_forbidden |
| 403 | partner_suspended |
| 403 | live_not_approved |
| 403 | sandbox_only |
| 404 | route_not_found |
| 404 | property_not_found |
| 404 | room_type_not_found |
| 404 | rate_plan_not_found |
| 404 | channel_not_found |
| 404 | task_not_found |
| 404 | booking_not_found |
| 404 | revision_not_found |
| 404 | webhook_not_found |
| 405 | method_not_allowed |
| 409 | idempotency_conflict |
| 409 | idempotency_in_progress |
| 409 | duplicate_external_ref |
| 409 | currency_locked |
| 409 | property_inactive |
| 409 | room_type_mapped |
| 409 | rate_plan_mapped |
| 409 | channel_exists |
| 409 | channel_inactive |
| 409 | channel_not_ready |
| 409 | pending_ota_approval |
| 422 | validation_failed |
| 422 | nothing_to_update |
| 422 | too_many_values |
| 422 | no_dates |
| 422 | mapping_empty |
| 429 | rate_limited |
| 429 | full_sync_limited |
| 500 | internal_error |
| 502 | channex_error |
| 502 | ota_unavailable |
| 502 | mapping_not_applied |
| 503 | channex_not_configured |
| 503 | sandbox_unavailable |
| 503 | database_unavailable |
Moobi Channel API v1 · 1.0.0 (2026-12-04)