---
title: "Telephone number search grouped by rate centers"
method: GET
path: "/v2/partition/{partitionId}/ratecenter/tnsearch"
tags: ["Rate Center Inventory"]
---

# Telephone number search grouped by rate centers

`GET /v2/partition/{partitionId}/ratecenter/tnsearch`

## Request

- Base URL: `https://api.alianza.com`
- URL: `https://api.alianza.com/v2/partition/{partitionId}/ratecenter/tnsearch`
- Auth: API key in header `X-AUTH-TOKEN`
- TypeScript: <https://skmtc.dev/alianza/apis/alianza-public-api/docs/v2/partition/:partitionId/ratecenter/tnsearch/get.ts> (a function with typed inputs; its response is checked against the schema)

Use to search for available telephone numbers available to activate by postal code or lat/long

## Path parameters

- `partitionId` string, required

## Query parameters

- `distanceunit` string
- `latitude` string
- `longitude` string
- `searchterm` string

## Response `200`

Successful operation

- TelephoneNumberViewX
  - `partitionId` string
  - `phoneNumber` string
  - `rateCenter` string
  - `rateCenterReorderName` string
  - `state` string
  - `country` string
  - `prefix` string
  - `accountId` string
  - `carrierId` string: The <a href="#/~schema/InboundCarrierX">inboundCarrierX.id</a> that services the telephone number.
  - `cooldownExpireDate` string, date-time
  - `cooldownRecoveredDate` string, date-time
  - `functionType` 'ELS' | 'TollFree' | 'TemporaryNumber' | 'SPTN'
  - `claimTicketId` string
  - `matchesZip` boolean: When this object is returned as part of a <a href="#/~operation/Telephone%20Number/tnSearch">search</a> that uses a zip code, results for nearby zip codes are also returned. This field indicates if the returned data matches the queried zip code.
  - `distance` number, float: When this object is returned as part of a <a href="#/~operation/Telephone%20Number/tnSearch">search</a> that uses a zip code, results for nearby zip codes are also returned. This field represents the distance (in miles) from the specified zip code.
  - `byotn` boolean: Bring Your Own Telephone Number (byotn) is a feature that allows the service provider to manage the rate center footprint coverage for a number.
  - `activationDate` integer
  - `isInInventory` boolean
  - `operationalStatus` 'ACTIVE' | 'STAGED'
  - `id` string
  - `port` boolean
  - `tags` string[]: Optional tags for categorizing the telephone number (e.g., location, service type). Tags are stored as attributes in the Attribute Service. Format is lowercase with hyphens replacing spaces. Maximum 10 tags per number.

## Other responses

- `400`: Invalid request parameters
- `401`: Unauthorized
- `404`: Not found

---

[API](https://skmtc.dev/alianza/apis/alianza-public-api.md) - [All operations](https://skmtc.dev/alianza/apis/alianza-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/alianza/apis/alianza-public-api/revisions/7223246c352c?raw)
