We use cookies to give you the best possible experience while you browse through our site. By continuing to use our website you implicitly agree to the usage of cookies on this site.

Read More

LRN API

This document provides in-depth instructions on how to look up LRN information with Tychron’s LRN API. Retrieve a number’s detailed geographical and carrier information to avoid dropped calls and lower your calling costs with accurate routing. Gain more control over your calling today with LRN.

Authorization

Please use your API Key's HTTP Token for authorization.

Restrictions

Please note that dips for Canadian numbers are restricted and require additional permissions. Please contact (support@tychron.com) for additional information.

Supported Output Types

The LRN API supports json and text as output types. For reference, see the examples below. If no output is specified, the default output is made in JSON.

Request Endpoint

GET /api/v1/lrn/:number HTTP/1.1
Host: api.atlas.tychron.online

Request Path Parameters

Parameters marked with * are mandatory in all requests.

ParameterTypeDefaultDescription
number *String An 11 digit, valid North American Numbering Plan (NANP) number.

Request Headers

Parameters marked with * are mandatory in all requests.

HeaderDefaultDescriptionExample
Acceptapplication/json (unless an output parameter is given)This header determines what output format should be returned in a response. When this header is given, it will take priority over the default output parameter.
Accept: application/json
Authorization * Authorization: Bearer KEYPlease use your API Key's HTTP Token for authorization.
Authorization: Bearer Rb2VRMSsm0VxHOIcniw6hCJhUqRExQk2

Request Format

GET /api/v1/lrn/:number?enhanced=:boolean&messaging_lookup=:boolean&number_format=11digit|10digit|e164&output=json|text HTTP/1.1
Host: api.atlas.tychron.online
Accept: application/json, text/plain
Authorization: Bearer YOUR_API_KEY_HERE

Query Parameters

Parameters marked with * are mandatory in all requests.

ParameterTypeDefaultDescription
enhancedBooleanfalseSpecifies whether or not additional block information should be queried for the number (This may incur additional costs).
messaging_lookupBooleanfalseSpecifies whether or not the messaging provider should be included in the query (This may incur additional costs).
number_formatString11digitThe queried number must be in either 11 digit, e164, or 10 digit format.
outputStringjsonQueries must be made in either json or text.

Please note that text output cannot be used in conjunction with messaging_lookup or enhanced parameters.

Response Codes

CodeDescriptionSolutions
200 OKThe request was successful and should contain the requested data. 
400 Bad RequestThe payload body of the request is malformed or the request contains invalid parameters.This error is most likely caused by a text based output with the messaging_lookup or enhanced flags set to true.

Either use json as the output, or unset the messaging_lookup or enhanced flags when using a text based output.
401 UnauthorizedThe request may be deemed unauthorized due to a number of factors.
  • The Authorization header is not set.
  • The provided API HTTP token is invalid, expired, or not active.
  • The requesting account may be unauthorized from making requests.
This error typically results from using an incorrect API token in requests. Check your API token for typos.

If the error persists, please contact support. (support@tychron.com)
402 Payment Required Your account has either an insufficient balance or you have exceeded your credit limit in the request.
Please contact (support@tychron.com) to purchase more credits.
403 ForbiddenThe user is not permitted to make the specified request(s). This error currently only applies to Canadian dips, as additional permissions are required for Canadian numbers.
If you require Canadian dips, please contact (support@tychron.com) for additional details.
415 Unsupported Media TypeThe content-type used to make the request is not supported.This endpoint only requires a GET request with query parameters. Please remove the Content-Type header from your request.
422 Unprocessable EntityThe parameters of the request body failed validation or contain invalid values.The response body will contain specific details for the request failure. Correct the request parameters based on these details.
500 Internal Server ErrorThe request has not been fulfilled due to a server error.
Please report this error and contact support for further assistance. (support@tychron.com)

Response Headers

NameDescriptionExample
X-Request-ID An ID used to identify the HTTP request.
X-Request-ID: wGvPFqerkrPGm3T0
X-CDR-IDAn ID used to identify the CDR (Call Detail Record) generated by the request. Please provide this ID for any billing questions when contacting support.
X-CDR-ID: 01EYVS5A5G7MAJVM25VWZCYKVY

Response Format

JSON

HTTP/1.1 200 OK
Content-Type: application/json
X-CDR-ID: AN_ID
{
  "data": {
    "number": "12003004000",
    "lrn": "17463334653",
    "enhanced": {
      "carrier": "CARRIER NAME",
      "carrier_type": "OCR",
      "city": "CITY NAME",
      "zip_code": "12345",
      "county": "COUNTY NAME",
      "timezone": "-0500",
      "state": "FL",
      "rate_center": "RATECENTER",
      "lata": "876",
      "ocn": "333"
    },
    "messaging": {
      "enabled": true,
      "provider": "Messaging Provider Name",
      "country": "COUNTRY",
      "country_code": "ISO",
      "reference_id": "us_acme"
    }
  }
}

Text

HTTP/1.1 200 OK
Content-Type: text/plain
12003004000

Response Parameters

Parameters marked with * are mandatory in all queries.

ParameterTypeDescription
Root
data * Data A top-level map containing dip data.
errors * List<Error>A top-level map containing any request errors.
Data
number * StringThe number used in the request.
lrnStringThe dipped lrn number. This number may be the same as the queried number if the number was not ported.
enhancedEnhancedA map containing dip data from the enhanced flag.
messagingMessagingA map containing dip data from the messaging flag.
Enhanced
carrier *StringThe name of the carrier that the queried number belongs to.
carrier_type *String
The the carrier's type of service provider. See carrier types below for a full list of types that may be returned.
state *StringThe state that the queried number belongs to.
cityStringThe city that the queried number belongs to.
zip_codeStringThe zip code of the queried number's switch. This may be left empty.
countyStringThe county of the queried number's switch. This may be left empty.
timezoneStringThe timezone of the queried number's switch. This may be left empty.
rate_center*StringThe rate center that the queried number is loaded under.
lata *StringThe local access transport area code (LATA) of the queried number.
ocn *StringThe operating company number (OCN) of the queried number.
Messaging
enabled *BooleanDenotes whether the queried number is capable of SMS or MMS.
provider *StringThe name of the messaging provider of the queried number if SMS or MMS enabled, or the just the voice provider if the number is not messaging enabled.
country *StringThe origin country of the queried number's provider.
country_code *StringThe ISO country code of the queried number's provider.
reference_idStringTychron issued internal ID that groups the Service Provider.

Carrier Types

AcronymFull Name
ILECIncumbent Local Exchange Carrier
ICOIndependent Telephone Company
ULECUnbundled Local Exchange Carrier
RBOCRegional Bell Operating Company
CLECCompetitive Local Exchange Carrier
CAPCompetitive Access Provider
IXCInter-exchange Carrier
WRSLWireless Reseller
IPESInternet Protocol Enabled Services
ETHXEthernet Exchange
INTLInternational Telecommunications Service Provider
LRSLLocal Reseller
WIRELESSWireless
PCSPersonal Communications Service
PCSRPersonal Communications Service Reseller
PAGINGPaging and messaging

cURL Examples

JSON

curl \
  -H "Authorization: Bearer KEY" \
  https://api.atlas.tychron.online/api/v1/lrn/12003004000
{"data":{"enhanced":null,"lrn":"12003004000","messaging":null,"number":"12003004000"},"errors":[]}

Text

curl \
  -H "Authorization: Bearer KEY" \
  https://api.atlas.tychron.online/api/v1/lrn/12003004000?output=text
12003004000