List CNAM Record Details

Returns details pertaining to a specific CNAM record on your account, including long code numbers that are associated with the record.

Endpoint

GET /cnams/:cnam_id

Path Parameter

  • cnam_id
    integer REQUIRED

    The unique identifier for the CNAM record you want to retrieve.

Detailed CNAM Object

The relationships and included objects are only returned for approved CNAM records which are associated with a long code phone number on your Flowroute account.

Response Fields

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

  • data
    object

    Data object for the CNAM record.

    • attributes
      object

      Attributes object associated with the specified CNAM record. For an explanation of the different attributes, see CNAM Attributes on "List Account CNAM Records".

    • id
      integer

      Unique identifier of the CNAM record.

    • links
      object

      Links object pointing to the CNAM record's URI. For example, https://api.flowroute.com/v2/cnams/20430.

    • relationships
      object

      Object desribing the different relationships an approved cnam object can have such as the phone numbers associated with the record.

      • numbers object- Object listing the numbers associated with a CNAM record.

        • data array- Array of phone numbers associated with the specified CNAM record.

          • id integer- ID of the phone number object which is equal to its value.

          • type string- This will always be number.

    • type
      string

      This will always be cnam.

  • included
    array

    An array of number objects associated with an approved CNAM record on your account. For object details, see phone number attributes in "List Account Phone Numbers".

Example Request

GET /v2/cnams/17604 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/17604  -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 CNAM Detail")
cnam_id = result['data'][0]['id']
result = cnams_controller.get_cnam(cnam_id)
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"
    },
    "relationships": {
      "numbers": {
        "data": [
          {
            "id": "12065014377",
            "type": "number"
          },
          {
            "id": "16502390214",
            "type": "number"
          },
          {
            "id": "18338647399",
            "type": "number"
          }
        ]
      }
    },
    "type": "cnam"
  },
  "included": [
    {
      "attributes": {
        "alias": "TFN",
        "cnam_lookups_enabled": true,
        "number_type": "toll-free",
        "rate_center": null,
        "state": null,
        "value": "18338647399"
      },
      "id": "18338647399",
      "links": {
        "self": "https://api.flowroute.com/v2/numbers/18338647399"
      },
      "type": "number"
    },
    {
      "attributes": {
        "alias": null,
        "cnam_lookups_enabled": true,
        "number_type": "longcode",
        "rate_center": "millbrae",
        "state": "ca",
        "value": "16502390214"
      },
      "id": "16502390214",
      "links": {
        "self": "https://api.flowroute.com/v2/numbers/16502390214"
      },
      "type": "number"
    },
    {
      "attributes": {
        "alias": null,
        "cnam_lookups_enabled": true,
        "number_type": "longcode",
        "rate_center": "seattle",
        "state": "wa",
        "value": "12065014377"
      },
      "id": "12065014377",
      "links": {
        "self": "https://api.flowroute.com/v2/numbers/12065014377"
      },
      "type": "number"
    }
  ]
}

            

422 UNPROCESSABLE ENTITY

{
  "errors": [
    {
      "detail": {
        "limit": [
          "Not a valid integer."
        ]
      },
      "id": "4de849a7-6b27-49da-b053-144dc738b282",
      "status": 422
    }
  ]
}