OOpal Hub
OPAL HUB API

Kurumsal API Dokümantasyonu

Adres API, Opal Deep Search ve İptal Link servislerini tek X-API-Key veya Bearer anahtarıyla kullanın.

Base URLhttps://oplhub.cc/api/v1

Kimlik doğrulama

Tüm korumalı endpointlerde ortak Opal Hub API anahtarını gönderin.

X-API-Key: oh_xxxxxxxxxxxxxxxxx

veya

Authorization: Bearer oh_xxxxxxxxxxxxxxxxx

Global WS anahtarı

Opal Work Station kurulumları için yönetici panelinden üretilen oh_ws_... anahtarı bütün Opal Hub servislerine erişir. Anahtar paket limitlerinden etkilenmez; kullanım hareketleri güvenlik ve ölçüm amacıyla kaydedilir.

Authorization: Bearer oh_ws_xxxxxxxxxxxxxxxxx

Adres API · Opal Deep Search · İptal Link · Alıcı Linki

Mevcut WS entegrasyonlarında servis adresini https://oplhub.cc/api/v1 olarak ve API anahtarını Global WS anahtarı olarak değiştirmeniz yeterlidir.

Adres hiyerarşisi

GET/api/v1/provinces
GET/api/v1/districts?province_id=42
GET/api/v1/neighborhoods?district_id=1827
GET/api/v1/streets?neighborhood_id=50627&q=Fazıl&limit=20

Genel autocomplete

GET/api/v1/search?q=Fazıl&province_id=42&district_id=1827&limit=20
{
  "success": true,
  "data": [
    {
      "id": 203300,
      "street_name": "FAZIL ÇELEBİ",
      "neighborhood_name": "KÖYCEĞİZ",
      "district_name": "MERAM",
      "province_name": "KONYA",
      "latitude": 37.8767730,
      "longitude": 32.4286211
    }
  ]
}

Opal Deep Search

POST/api/v1/geocode
{
  "street_id": 203300,
  "deep_search": true,
  "persist_result": true
}

Yerel kayıtta koordinat yoksa Opal Deep Search çalışır. Doğrulanan koordinat ana sokak kaydına yazılır ve sonraki sorgularda source: local döner.

POST/api/v1/links/request
{
  "product": "OPAL_WS",
  "license_key": "WS-LICENSE",
  "company_reference": "42",
  "company_name": "Örnek Firma",
  "primary_domain": "ornekfirma.com",
  "domain_variants": ["ornekfirma.com", "www.ornekfirma.com"],
  "target_url": "https://ornekfirma.com/iletisim-tercihleri",
  "callback_url": "https://ornekfirma.com/api/consent/callback"
}
{
  "ok": true,
  "link_id": 15,
  "short_code": "A7kP2xQ",
  "short_url": "https://oplhub.cc/A7kP2xQ",
  "status": "active"
}
POST/api/v1/recipient-links/request
{
  "link_id": 15,
  "customer_reference": "CUSTOMER-9281",
  "target_url": "https://ornekfirma.com/iletisim-tercihleri?t=secure-token",
  "expires_at_utc": "2027-12-31 23:59:59"
}

Link kontrolü ve durum

POST/api/v1/links/verify
POST/api/v1/links/activate
POST/api/v1/links/deactivate
{ "link_id": 15 }

Kullanım özeti

GET/api/v1/usage

Adres API, Opal Deep Search, İptal Link ve Alıcı Linki sayaçlarını tek yanıtta döndürür.

Yaygın hata kodları

KodAnlamı
unauthorizedAPI anahtarı geçersiz veya eksik.
service_not_in_planAnahtarın veya paketin ilgili servise yetkisi yok.
daily_service_limit_exceededGünlük servis limiti doldu.
target_domain_not_allowedHedef URL izinli firma domainiyle eşleşmiyor.
DEEP_SEARCH_NOT_ALLOWEDOpal Deep Search pakette kapalı.