Numbers REST Summary

Overview

The number procurement process starts with a request from a Softlinx customer’s administrator. The administrator creates the request and then Softlinx support processes the request and obtains the number. If questions or issues arise during the procurement process, the status of the request is updated and emails and support tickets are exchanged between the requestor and Softlinx support. The need for this exchange is more common with port-in requests.

The numbers API allows the Softlinx customer to make a number request without using the portal. However, the same procurement process is followed regardless of whether the request was made via the portal or the API.

A fax number request can be for a new number or to port in an existing number. The data required for these two types of requests is different. When making a new number request, the data needed for a toll-free number or a non-toll-free number is also different. The API accommodates these differences with three different endpoints: one for a port-in, one for a non-toll-free number and one for a toll-free number:

  • /api/numbers/add-port-request
  • /api/numbers/add-new-number-request/non-toll-free
  • /api/numbers/add-new-number-request/toll-free

In all three requests, there is a required email address, an optional comment, and an optional user to be assigned the fax number.

Note: It is strongly recommended that the user be created before requesting a fax number, so the user can be assigned the fax number during the request process. Otherwise, there is a chance that a number is activated and a fax is received without an associated user. In this case, the fax will go to the default replix user account.

There are convenience API endpoints available to retrieve related information for specific requests. For example, if a specific area code is preferred, there is an endpoint that will return a list of area codes for a specific state.

In the non-toll-free fax number request, a state or province, city and area codes can be specified. The corresponding API endpoints can be used to obtains a list of valid states, provinces, cities and area codes. The Regions endpoint will return states or provinces depending on what country is specified. When making a non-toll-free fax number request, only a region (state or province) must be specified, the city and area codes are optional.

Note: The list of states, provinces, cities, and area codes rarely change. Therefore, it is recommended that these lists be cached by the client’s API system vs. being called each time a new fax number is requested.

Security

In order to use the API, a security token must be passed in the header. The security token can be generated for a specific user by an administrator using the Softlinx portal. The user with the security token must be a portal administrator and have permission to manage fax numbers. When making an API call, it will be in the context of this user.

Versioning

The version of the API call will be specified in the header.

API Test Sandbox

Currently the API environment is being hosted in the development sandbox. Once the API endpoints are finalized, it will be moved to the test environment. Until such time, the URLs may change as this feature progresses through the review cycle.

The API endpoints and descriptions can be found at: https://api.rpxdev.com/swagger/index.html.

Production URL

The URL for the number API is https://api.rpxfax.com/api . The endpoints are defined in the swagger URL above.

Use Case Scenarios

A new non-toll-free fax number

POST /api/numbers/add-new-number-request/non-toll-free

The following JSON object should be POSTED in the request:

{
  "country_code": "",
  "department_name": "",
  "assign_to_user": "",
  "notify_email": [ "" ],
  "comment": "",
  "forward_from": "",
  "region": "",
  "city": "",
  "area_code": [ "" ],
}

A country code must be specified. It can be “US” or “CA”. In this scenario, the value for country_code will be “US”. A state is also required. The API refers to US states and Canadian provinces as regions. A list of valid states can be retrieved using the /api/numbers/regions/US URL. If you have an area code preference for a specific city, use the /api/numbers/cities/{country_code}/{region_code} endpoint to get a list of cities related to a country and region. If you have a preference for a specific area code (or two), then use the /api/numbers/area_codes/{country_code}/{region_code}/{city} URL to get a list of area codes. The city code is optional. An email address must be specified. This email address will be notified when activity occurs on this request.

Example 1

Area code preference is for Massachusetts, US.

{
  "country_code": "US",
  "department_name": "",
  "assign_to_user": "",
  "notify_email": [
    "jdoe@acme.com"
  ],
  "comment": "Please process ASAP.",
  "forward_from": "",
  "region": "MA",
  "city": "",
  "area_code": []
}

Example 2

Area code preference is Acton, MA, in US and fax number should be assigned to user s_smith

{
  "country_code": "US",
  "department_name": "",
  "assign_to_user": "s_smith",
  "notify_email": [
    "jdoe@acme.com"
  ],
  "comment": "If Acton area codes not available, then try Boston.",
  "forward_from": "",
  "region": "MA",
  "city": "Acton",
   "area_code": []
}

A CURL command line would be similar to:

curl --request POST --url https://api.rpxdev.com/api/numbers/add-new-number-request/non-toll-free  --header "Authorization: Bearer XXX" --header "Content-Type: application/json" --data-raw "{   \"country_code\": \"US\",   \"department_name\": \"\",   \"assign_to_user\": \"\",  \"notify_email\": [ \"admin@acme.com\"], \"comment\": \"Please ASAP.\",   \"region\": \"MA\",   \"city\": \"Acton\", \"forward_from\": \"\",   \"area_code\": []}"

Porting a US fax number

POST /api/numbers/add-port-request

The following JSON object should be POSTED in the request along with an LOA PDF and Bill PDF.

{
  "country_code": "",
  "department_name": "",
  "assign_to_user": "",
  "notify_email": [
    "admin@acme.com"
  ],
  "comment": "",
  "number_to_port": "",
  "toll_free": true/false
}

A CURL command line would be similar to:

curl --request POST --url https://api.rpxdev.com/api/numbers/add-port-request -F loaFile=@c:\LOA.pdf -F billFile=@c:\Bill.pdf   --header "Authorization: Bearer XXX" -F "data={   \"country_code\": \"US\",   \"department_name\": \"\",   \"assign_to_user\": \"\",  \"notify_email\": [\"joe@softlinx.com\"],  \"comment\": \"Please ASAP.\",   \"number_to_port\": \"14001231233\"   }"