Skip to main content

hlrs

Creates, updates, deletes, gets or lists a hlrs resource.

Overview​

Namehlrs
TypeResource
Idovh.sms.hlrs

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
idintegerHLR id
datetimestring (date-time)HLR creation datetime
msisdnstringMSISDN
operator_codestringThe {Mobile Country Code, Mobile Network Code} unique identifier (wire: operatorCode)
portedbooleanHas the MSISDN been ported from its original network
reachablebooleanIs the MSISDN currently reachable
roamingbooleanIs the MSISDN currently roaming outside its natinal network
statusstringStatus of the HLR request (doing, done, error, todo)
validbooleanIs the MSISDN valid

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectid, service_nameGet an HLR lookup. Returns the result of the HLR lookup: validity, reachability, portability and roaming of the number.
listselectservice_namex_pagination_modeList HLR lookups. Returns the identifiers of the HLR lookups. An HLR lookup checks whether a mobile number is valid, reachable, ported or roaming.
createinsertservice_nameRequest HLR lookups. Requests an HLR lookup for one or several mobile numbers, given as a list or a CSV document URL. Returns the lookup identifiers and the credits used.

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
api_hoststringThe OVHcloud API host. Selected by OVH_ENDPOINT (ovh-eu, ovh-ca or ovh-us; default ovh-eu). (default: api.eu.ovhcloud.com, x-stackQL-envVarSelector: {"envVar":"OVH_ENDPOINT","default":"ovh-eu","values":{"ovh-eu":"api.eu.ovhcloud.com","ovh-ca":"api.ca.ovhcloud.com","ovh-us":"api.us.ovhcloud.com"}})
idintegerHLR id
service_namestringThe internal name of your SMS offer (wire: serviceName)
x_pagination_modestringSent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode)

SELECT examples​

Get an HLR lookup. Returns the result of the HLR lookup: validity, reachability, portability and roaming of the number.

SELECT
id,
datetime,
msisdn,
operator_code,
ported,
reachable,
roaming,
status,
valid
FROM ovh.sms.hlrs
WHERE id = '{{ id }}' -- required
AND service_name = '{{ service_name }}' -- required
;

INSERT examples​

Request HLR lookups. Requests an HLR lookup for one or several mobile numbers, given as a list or a CSV document URL. Returns the lookup identifiers and the credits used.

INSERT INTO ovh.sms.hlrs (
receivers,
receivers_document_url,
service_name
)
SELECT
'{{ receivers }}',
'{{ receivers_document_url }}',
'{{ service_name }}'
RETURNING
ids,
invalid_receivers,
tag,
total_credits_removed,
valid_receivers
;