---
title: "Creates Dynamic inventory orders, those orders eventually will activate telephone numbers received on a request"
method: POST
path: "/v2/partition/{partitionId}/account/{accountId}/dynamic-inventory/orders"
tags: ["Dynamic Inventory"]
---

# Creates Dynamic inventory orders, those orders eventually will activate telephone numbers received on a request

`POST /v2/partition/{partitionId}/account/{accountId}/dynamic-inventory/orders`

## Request

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

## Path parameters

- `accountId` string, required
- `partitionId` string, required

## Request body

- DynamicTelephoneNumberActivationX
  - `partitionId` string
  - `accountId` string
  - `carrierId` string
  - `orderId` string
  - `tnQuantity` integer
  - `deviceId` string
  - `userId` string
  - `customerServiceRecord` LatLongCustomerServiceRecordX
    - `id` string
    - `firstName` string
    - `middleInitial` string
    - `lastName` string
    - `businessName` string
    - `streetNumber` string
    - `streetNumberSuffix` string
    - `preDirectional` '' | 'N' | 'NE' | 'E' | 'SE' | 'S' | 'SW' | 'W' | 'NW'
    - `streetName` string
    - `streetSuffix` string
    - `postDirectional` '' | 'N' | 'NE' | 'E' | 'SE' | 'S' | 'SW' | 'W' | 'NW'
    - `city` string
    - `state` string
    - `country` string
    - `postalCode` string
    - `secondaryLocationDescription` '' | 'APARTMENT' | 'BUILDING' | 'BASEMENT' | 'DEPARTMENT' | 'FLOOR' | 'FRONT' | 'HANGER' | 'KEY' | 'LOBBY' | 'LOT' | 'LOWER' | 'OFFICE' | 'PENTHOUSE' | 'PIER' | 'REAR' | 'ROOM' | 'SIDE' | 'SLIP' | 'SPACE' | 'SUITE' | 'STOP' | 'TRAILER' | 'UNIT' | 'UPPER'
    - `unit` string
    - `customerType` 'BUSINESS' | 'RESIDENTIAL'
    - `firstNameSecondary` string
    - `blockCustomerName` boolean
    - `customerName` string
    - `latitude` number, double
    - `longitude` number, double
  - `directoryListing` DirectoryListingX
    - `listed` boolean
    - `type` 'ERROR' | 'LIST_PUBLISH' | 'LIST_NOT_PUBLISH' | 'NOT_LIST_NOT_PUBLISH' | 'PORTED' | 'COMPLEX': Indicates how a telephone number should be listed. <span hidden>For more information on the directory listing process, please refer <a href="directoryListing.html#overview">here</a></span>
    - `address` AddressX
      - `id` string
      - `firstName` string
      - `middleInitial` string
      - `lastName` string
      - `businessName` string
      - `streetNumber` string
      - `streetNumberSuffix` string
      - `preDirectional` '' | 'N' | 'NE' | 'E' | 'SE' | 'S' | 'SW' | 'W' | 'NW'
      - `streetName` string
      - `streetSuffix` string
      - `postDirectional` '' | 'N' | 'NE' | 'E' | 'SE' | 'S' | 'SW' | 'W' | 'NW'
      - `city` string
      - `state` string: A two-letter state abbreviation
      - `country` string: Alianza supports accounts in USA and CAN
      - `postalCode` string
      - `secondaryLocationDescription` '' | 'APARTMENT' | 'BUILDING' | 'BASEMENT' | 'DEPARTMENT' | 'FLOOR' | 'FRONT' | 'HANGER' | 'KEY' | 'LOBBY' | 'LOT' | 'LOWER' | 'OFFICE' | 'PENTHOUSE' | 'PIER' | 'REAR' | 'ROOM' | 'SIDE' | 'SLIP' | 'SPACE' | 'SUITE' | 'STOP' | 'TRAILER' | 'UNIT' | 'UPPER'
      - `unit` string
  - `e911Address` E911AddressX
    - `id` string
    - `firstName` string
    - `middleInitial` string
    - `lastName` string
    - `businessName` string
    - `streetNumber` string
    - `streetNumberSuffix` string
    - `preDirectional` '' | 'N' | 'NE' | 'E' | 'SE' | 'S' | 'SW' | 'W' | 'NW'
    - `streetName` string
    - `streetSuffix` string
    - `postDirectional` '' | 'N' | 'NE' | 'E' | 'SE' | 'S' | 'SW' | 'W' | 'NW'
    - `city` string
    - `state` string
    - `country` string
    - `postalCode` string
    - `secondaryLocationDescription` '' | 'APARTMENT' | 'BUILDING' | 'BASEMENT' | 'DEPARTMENT' | 'FLOOR' | 'FRONT' | 'HANGER' | 'KEY' | 'LOBBY' | 'LOT' | 'LOWER' | 'OFFICE' | 'PENTHOUSE' | 'PIER' | 'REAR' | 'ROOM' | 'SIDE' | 'SLIP' | 'SPACE' | 'SUITE' | 'STOP' | 'TRAILER' | 'UNIT' | 'UPPER'
    - `unit` string
    - `customerType` 'BUSINESS' | 'RESIDENTIAL'
    - `latitude` string: -90 through 90, 4-6 decimals
    - `longitude` string: -180 through 180, 4-6 decimals
    - `language` string: Optional, see /v2/ref/language for supported languages
  - `tnSettings` TelephoneNumberAccountBareX
    - `phoneNumber` string
    - `referenceType` 'SIP_TRUNK' | 'END_USER' | 'IVR' | 'LINE_APPEARANCE' | 'LINE_HUNTGROUP' | 'TELEPHONE' | 'VFAX' | 'BUSINESS_LINE' | 'BUSINESS_LINE_HUNT_GROUP' | 'CALL_GROUP' | 'CALL_QUEUE' | 'AUTO_ATTENDANT' | 'SPECIALTY_LINE' | 'CONTACT_CENTER'
    - `referenceId` string
    - `functionType` 'ELS' | 'TollFree' | 'TemporaryNumber' | 'SPTN'
    - `canAcceptSMS` boolean
    - `operationalStatus` 'ACTIVE' | 'STAGED'
    - `portId` string
    - `servicePackageType` 'Usage' | 'PrimaryLocalFlatRate' | 'PrimaryLocalAndDomesticLDFlatRate' | 'SecondaryLocalFlatRate' | 'SecondaryLocalAndDomesticLDFlatRate'
    - `tollFree` boolean
    - `id` string
    - `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.
  - `ringType` 'StandardRing' | 'Ring1' | 'Ring2' | 'Ring3' | 'Ring4' | 'Ring5' | 'Ring6' | 'Ring7'
  - `archived` boolean
  - `alianzaOrderId` string
  - `smsSettings` SmsSettingsX
    - `smsLoaDocumentVersionId` string
    - `updatedAt` string, date-time
    - `campaignId` string
    - `smsLoa` FileDataBase64X
      - `contentType` string
      - `name` string
      - `contentBase64` string
    - `enableSMS` boolean
    - `createdAt` string, date-time
    - `authorizingPerson` string
    - `smsAction` 'CHANGE_CAMPAIGN' | 'DISABLE' | 'ENABLE' | 'PORT_COMPLETED'
    - `smsCarrierId` string
    - `campaignName` string
    - `remoteCampaignId` string
  - `id` string

## Response `200`

Successful operation

- DynamicInventoryOrderX
  - `partitionId` string
  - `accountId` string
  - `customerServiceRecord` LatLongCustomerServiceRecordX
    - `id` string
    - `firstName` string
    - `middleInitial` string
    - `lastName` string
    - `businessName` string
    - `streetNumber` string
    - `streetNumberSuffix` string
    - `preDirectional` '' | 'N' | 'NE' | 'E' | 'SE' | 'S' | 'SW' | 'W' | 'NW'
    - `streetName` string
    - `streetSuffix` string
    - `postDirectional` '' | 'N' | 'NE' | 'E' | 'SE' | 'S' | 'SW' | 'W' | 'NW'
    - `city` string
    - `state` string
    - `country` string
    - `postalCode` string
    - `secondaryLocationDescription` '' | 'APARTMENT' | 'BUILDING' | 'BASEMENT' | 'DEPARTMENT' | 'FLOOR' | 'FRONT' | 'HANGER' | 'KEY' | 'LOBBY' | 'LOT' | 'LOWER' | 'OFFICE' | 'PENTHOUSE' | 'PIER' | 'REAR' | 'ROOM' | 'SIDE' | 'SLIP' | 'SPACE' | 'SUITE' | 'STOP' | 'TRAILER' | 'UNIT' | 'UPPER'
    - `unit` string
    - `customerType` 'BUSINESS' | 'RESIDENTIAL'
    - `firstNameSecondary` string
    - `blockCustomerName` boolean
    - `customerName` string
    - `latitude` number, double
    - `longitude` number, double
  - `directoryListing` DirectoryListingX
    - `listed` boolean
    - `type` 'ERROR' | 'LIST_PUBLISH' | 'LIST_NOT_PUBLISH' | 'NOT_LIST_NOT_PUBLISH' | 'PORTED' | 'COMPLEX': Indicates how a telephone number should be listed. <span hidden>For more information on the directory listing process, please refer <a href="directoryListing.html#overview">here</a></span>
    - `address` AddressX
      - `id` string
      - `firstName` string
      - `middleInitial` string
      - `lastName` string
      - `businessName` string
      - `streetNumber` string
      - `streetNumberSuffix` string
      - `preDirectional` '' | 'N' | 'NE' | 'E' | 'SE' | 'S' | 'SW' | 'W' | 'NW'
      - `streetName` string
      - `streetSuffix` string
      - `postDirectional` '' | 'N' | 'NE' | 'E' | 'SE' | 'S' | 'SW' | 'W' | 'NW'
      - `city` string
      - `state` string: A two-letter state abbreviation
      - `country` string: Alianza supports accounts in USA and CAN
      - `postalCode` string
      - `secondaryLocationDescription` '' | 'APARTMENT' | 'BUILDING' | 'BASEMENT' | 'DEPARTMENT' | 'FLOOR' | 'FRONT' | 'HANGER' | 'KEY' | 'LOBBY' | 'LOT' | 'LOWER' | 'OFFICE' | 'PENTHOUSE' | 'PIER' | 'REAR' | 'ROOM' | 'SIDE' | 'SLIP' | 'SPACE' | 'SUITE' | 'STOP' | 'TRAILER' | 'UNIT' | 'UPPER'
      - `unit` string
  - `e911Address` E911AddressX
    - `id` string
    - `firstName` string
    - `middleInitial` string
    - `lastName` string
    - `businessName` string
    - `streetNumber` string
    - `streetNumberSuffix` string
    - `preDirectional` '' | 'N' | 'NE' | 'E' | 'SE' | 'S' | 'SW' | 'W' | 'NW'
    - `streetName` string
    - `streetSuffix` string
    - `postDirectional` '' | 'N' | 'NE' | 'E' | 'SE' | 'S' | 'SW' | 'W' | 'NW'
    - `city` string
    - `state` string
    - `country` string
    - `postalCode` string
    - `secondaryLocationDescription` '' | 'APARTMENT' | 'BUILDING' | 'BASEMENT' | 'DEPARTMENT' | 'FLOOR' | 'FRONT' | 'HANGER' | 'KEY' | 'LOBBY' | 'LOT' | 'LOWER' | 'OFFICE' | 'PENTHOUSE' | 'PIER' | 'REAR' | 'ROOM' | 'SIDE' | 'SLIP' | 'SPACE' | 'SUITE' | 'STOP' | 'TRAILER' | 'UNIT' | 'UPPER'
    - `unit` string
    - `customerType` 'BUSINESS' | 'RESIDENTIAL'
    - `latitude` string: -90 through 90, 4-6 decimals
    - `longitude` string: -180 through 180, 4-6 decimals
    - `language` string: Optional, see /v2/ref/language for supported languages
  - `inventory` DynamicInventoryX[]
    - `carrierId` string
    - `orderId` string
    - `tns` DynamicInventoryOrderTelephoneNumberX[]
      - `tn` string
      - `id` string
    - `id` string
  - `deviceId` string
  - `referenceId` string
  - `referenceType` string
  - `smsSettings` SmsSettingsX
    - `smsLoaDocumentVersionId` string
    - `updatedAt` string, date-time
    - `campaignId` string
    - `smsLoa` FileDataBase64X
      - `contentType` string
      - `name` string
      - `contentBase64` string
    - `enableSMS` boolean
    - `createdAt` string, date-time
    - `authorizingPerson` string
    - `smsAction` 'CHANGE_CAMPAIGN' | 'DISABLE' | 'ENABLE' | 'PORT_COMPLETED'
    - `smsCarrierId` string
    - `campaignName` string
    - `remoteCampaignId` string
  - `userId` string
  - `id` string

## Other responses

- `400`: Invalid request parameters

---

[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)
