---
title: "HLR number lookup"
method: GET
path: "/hlr/"
tags: ["HLR"]
---

# HLR number lookup

`GET /hlr/`

## Request

- Base URL: `http://api.smsfusion.com.au`
- URL: `http://api.smsfusion.com.au/hlr/`
- Auth: API key in query parameter `key`

Queue an HLR lookup for a single number with no callback URL. This endpoint is always asynchronous and never returns the lookup result inline. On acceptance it responds 390 with a Location header naming an internal nchan channel (hlr{batchId}) that the result is published to once the lookup completes; the caller must subscribe to that channel to receive it. A number that fails local format validation is rejected inline with 200 instead of being queued

## Query parameters

- `key` string, required
- `num` string
- `cc` string, string

## Response `200`

The number failed local format validation and was rejected without being queued; body is the HLR result shape with status set to invalid

- HLRCallback
  - `id` string: Unique ID for response
  - `batchid` integer: HLR queue batch ID this result belongs to
  - `msisdn` integer: The MSISDN of the number queried
  - `status` 'valid' | 'invalid' | 'unknown': Short status code of the response
  - `country` string: ISO 3166-2 country code
  - `operator` string: The operator attached to the MSISDN
  - `mccmnc` integer: MCC and MNC of MSDISDN
  - `duration` 'perm' | 'temp': If the response code is temporary or permenant
  - `message` string: Full status code of the response
  - `extended` string: Extended explanation of the status code

## Other responses

- `390`: Queued for async lookup. The Location header names the nchan channel (hlr{batchId}) the result will be published to; no body is returned
- `401`: Authentication failed or paramaters not provided
- `429`: Out of credit

---

[API](https://skmtc.dev/smsfusion/apis/sms-fusion-api.md) · [All operations](https://skmtc.dev/smsfusion/apis/sms-fusion-api/llms.txt) · [OpenAPI document](https://skmtc.dev/smsfusion/apis/sms-fusion-api/revisions/a88b2793a6e9?raw)
