LRN API

Introduction

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.co 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

HTTP/1.1 GET https://api.atlas.tychron.io/api/lrn/:number

Path Parameters

Parameters marked with * are mandatory in all requests.

Parameter Type Default Description
number * String An 11 digit, valid North American Numbering Plan (NANP) number.

Request Headers

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

Request Format

HTTP/1.1 GET https://api.atlas.tychron.io/api/lrn/12003004000?enhanced=boolean&messaging_lookup=boolean&number_format=11digit|10digit|e164&output=json|text

Accept: application/json, text/plain
Authorization: Bearer YOUR_API_KEY_HERE

Query Parameters

Parameters marked with * are mandatory in all queries.

Parameter Type Default Description
enhanced Boolean false Specifies whether or not additional block information should be queried for the number (This may incur additional costs).
messaging_lookup Boolean false Specifies whether or not the messaging provider should be included in the query (This may incur additional costs).
number_format String 11digit The queried number must be in either 11 digit, e164, or 10 digit format.
output String json Queries 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

Response Codes

Code Description Further Comments and possible solutions
200 OK The request was successful and should contain the requested data.
400 Bad Request The 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 Unauthorized The request may be deemed unauthorized due to a number of factors.
  • The Authorization header is not set.
  • The provided API 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@tychron.co.
402 Payment Required Your account has either an insufficient balance or you have exceeded your credit limit in the request. Please contact support@tychron.co to purchase more credits.
403 Forbidden The 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.co for additional details.
415 Unsupported Media Type The 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 Entity The parameters of the request body have failed validation or contain invalid values. The response body will contain specific details for the request failure. Correct the request parameters based on this response.
500 Internal Server Error The request has not been fulfilled due to a server error.

Please report this error and contact support@tychron.co for further assistance.

Response Headers

Name Description Example
X-Request-ID An ID used to identify the HTTP request.
X-Request-ID: wGvPFqerkrPGm3T0
X-CDR-ID An 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"
    }
  }
}
Attributes

Parameters marked with * are mandatory in all requests.

Parameter Type Default Description
Root
data * Data A top-level map containing dip data.
errors * List<Error> A top-level map containing any request errors.
Data
number * String The number used in the request.
lrn String The dipped lrn number. This number may be the same as the queried number if the number was not ported.
enhanced Enhanced A map containing dip data from the enhanced flag.
messaging Messaging A map containing dip data from the messaging flag.
Enhanced
carrier * String The name of the carrier that the queried number belongs to.
carrier_type * String The the carrier's type of service provider.
state * String The state that the queried number belongs to.
city String The city that the queried number belongs to.
zip_code String The zip code of the queried number’s switch. This may be left empty.
county String The county of the queried number’s switch. This may be left empty.
timezone String The timezone of the queried number’s switch. This may be left empty.
rate_center* String The rate center that the queried number is loaded under.
lata* String The local access transport area code (LATA) of the queried number.
ocn * String The operating company number (OCN) of the queried number.
Messaging
enabled * Boolean Denotes whether the queried number is capable of SMS or MMS.
provider * String The 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 * String The origin country of the queried number’s provider.
country_code * String The ISO country code of the queried number’s provider.

Text

HTTP/1.1 200 OK

Content-Type: text/plain
12003004000

cURL Examples

JSON Example

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

Text Example

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