What is DNO Live Download API?
RealNumber® DNO Live Download Application Programming Interface (API) is a data feed that provides up to the minute changes to both voice and text DNO status for Toll-Free and local numbers, as well as daily updates for NPA, NPA-NXX, and block data. This allows users (RealNumber Toll-Free and local DNO data users) to poll this data and populate their own local database to allow them faster data access while accounting for up to the minute status changes.
There are concepts in this document that assume you already understand certain communication protocol terms such as HTTP, REST, and JSON.
How do I Get Started with DNO Live Download API?
Step 1: A user database needs to be created and then seeded by downloading and ingesting the following daily DNO files from RealNumber®.
- NPA-DNO-Report.csv
- NPA-NXX-DNO-Report.csv
- NPA-NXX-X-DNO-Report.csv (blocks)
- NPA-NXX-XXXX-DNO-Report.csv (local numbers)
- Dno-file.csv (toll-free numbers)
Users that have DNO for text enabled, will need to also download the text equivalent of each of these files.
- NPA-DNO-TEXT-Report.csv
- NPA-NXX-DNO-TEXT-Report.csv
- NPA-NXX-X-DNO-TEXT-Report.csv (blocks)
- NPA-NXX-XXXX-DNO-TEXT-Report.csv (local numbers)
- Dno-text-file.csv (toll-free numbers)
Step 2: You need to obtain an authentication token that you will use to access the DNO live download API
Step 3: You will then send a REST GET request to https://api-realnumber- ha.somos.com/live/api/download/{id} passing in the date the daily files were created as the ID. This will begin to download DNO data that has happened since the specific daily DNO report was created. The download API returns available messages up to a maximum of 20,000 messages per download request.
Step 4: You will continue to poll for DNO live data by sending REST GET requests to https://api- realnumber-ha.somos.com/live/api/download/{id} using the last received sequenceId from the previous DNO message. The API returns available messages that have a sequenceId greater than the provided last received sequenceId up to a maximum of 20,000 available messages per request.
What are Somos' Recommendations for DNO Live Download API?
It is possible for DNO messages to get out of order for the same value or for there to be duplicate messages. You should compare the last Update timestamp field with your existing data and only update if the received record is more recent than what you have.
It is recommended that you poll for messages once per minute. There is no benefit to polling at a faster rate as it will only increase data load and costs.