List Account CNAM Records

Returns a list of all CNAM records on your account by default. You can apply search filters using any of the available query parameters.

Endpoint

GET /cnams

Query Parameters

  • limit
    integer

    Limits the number of CNAM records to retrieve. There is no max limit currently enforced.

  • offset
    integer

    Offsets the list of CNAM records to retrieve by your specified value. For example, if you have 4 CNAM records and you entered 1 as your offset value, then only 3 of your CNAM records will be displayed in the response.

  • is_approved
    boolean

    Filters results to CNAM records that are either approved or not approved.

  • value
    string

    Filters results to CNAM records that include this string (case insensitive)."

Response Fields

On success, the HTTP status code in the response header is 200 OK and the response body contains an array of cnam objects in JSON format. On error, the header status code is an error code and the response body contains an array of error objects.

Example Request

GET /v2/cnams?is_approved=true HTTP/1.1
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json

                        

Example Request

curl -X GET https://api.flowroute.com/v2/cnams?is_approved=true -u accessKey:secretKey

                        

Example Request

This assumes that you have the Python API Wrapper installed and set up. The following example is from cnam_demo.py. Please make sure to use neutral (vertical) quotes in your request. Smart quotes are known to cause errors.


# Instantiate the API client and create a controller for CNAMs
client = FlowroutenumbersandmessagingClient(basic_auth_user_name, basic_auth_password)
cnams_controller = client.cnams
print("\n--List Approved CNAM Records")
result = cnams_controller.list_cnams(limit, offset, is_approved=True)
pprint.pprint(result)

                        

Example Responses

200 OK

{
  "data": [
    {
      "attributes": {
        "approval_datetime": null,
        "creation_datetime": null,
        "is_approved": true,
        "rejection_reason": "",
        "value": "TEST, MARIA"
      },
      "id": "17604",
      "links": {
        "self": "https://api.flowroute.com/v2/cnams/17604"
      },
      "type": "cnam"
    },
    {
      "attributes": {
        "approval_datetime": "2018-04-16 16:20:32.939166+00:00",
        "creation_datetime": "2018-04-12 19:08:39.062539+00:00",
        "is_approved": true,
        "rejection_reason": null,
        "value": "REGENCE INC"
      },
      "id": "22671",
      "links": {
        "self": "https://api.flowroute.com/v2/cnams/22671"
      },
      "type": "cnam"
    },
    {
      "attributes": {
        "approval_datetime": "2018-04-23 17:04:30.829341+00:00",
        "creation_datetime": "2018-04-19 21:03:04.932192+00:00",
        "is_approved": true,
        "rejection_reason": null,
        "value": "BROWN BAG"
      },
      "id": "22790",
      "links": {
        "self": "https://api.flowroute.com/v2/cnams/22790"
      },
      "type": "cnam"
    }
  ],
  "links": {
    "self": "https://api.flowroute.com/v2/cnams?is_approved=True&limit=100&offset=0"
  }
}

            

422 UNPROCESSABLE ENTITY

{
  "errors": [
    {
      "detail": {
        "limit": [
          "Invalid value."
        ]
      },
      "id": "07f2df99-f31d-45ce-93d3-1512f81ab27d",
      "status": 422
    }
  ]
}