跳到主要内容
FinCode

Universal lookup

Detect and resolve any identifier type with one endpoint.

本文档适用于 API V1。

Endpoint

The universal lookup detects the identifier type from the input — IBAN, SWIFT/BIC, routing number, sort code, BSB, IFSC or CNAPS — resolves it to the underlying entity, and returns the same result shape as the typed endpoints.

http
GET https://api.ecommica.com/v1/lookup?q={value}

Example request

bash
curl -s "https://api.ecommica.com/v1/lookup?q=ICBKCNBJ" \
  -H "Authorization: Bearer sk_xxx"

Example response

json
{
  "data": {
    "query": "ICBKCNBJ",
    "detected_type": "SWIFT",
    "resolved": true,
    "identifier": {
      "type": "SWIFT",
      "value": "ICBKCNBJ",
      "bank": {
        "id": "inst_icbc",
        "name_en": "Industrial and Commercial Bank of China",
        "country": "CN"
      }
    }
  },
  "meta": { "request_id": "req_4k5m6n7p" }
}

Notes

When the type cannot be detected (detected_type is UNKNOWN), the response lists the closest candidates instead of failing, mirroring the website's universal search.