Preview DID Assignment

Previews the assignment operation for multiple DIDs. The response indicates whether the selected DIDs currently belong to the same owner, and lists the resellers that can be assigned to all of them.

Request URL

POST {base_url}/uc-cconfig/api/v1/dids/assignment-preview

Request parameters

Headers
Parameter Required Type Description
Authorization Yes String The access token used for authentication.

Format: Bearer {access_token}.

x-tenant-code No String The tenant name.
Note: You can obtain tenant name using the Query Tenants interface.
Body parameters
Parameter Required Type Description
didIds Yes Array<String> The list of DID IDs to preview, supporting 1 to 500 DIDs. Each ID must be greater than 0. You can obtain the IDs using the Query DID List interface.

Response parameters

Parameter Type Description
requestId String The unique ID of the request, which can be used to quickly locate the request.
code String The HTTP status code of the request.
  • 200: Request succeeded.
  • Non-200 value: Request failed.
message String The status message of the request.
detailMessage String The detailed error information.

When the request is successful, this parameter returns empty.

result Object<Assignment_Preview_Result> The preview result.
Assignment_Preview_Result
Parameter Type Description
currentAssignmentConsistent Boolean

Whether the selected DIDs currently belong to the same owner.

  • true: All selected DIDs belong to the same owner.
  • false: The selected DIDs have different owners.
currentResellerId String The current owner when the selected DIDs are consistent. 0 indicates that the DIDs belong to the administrator account. This value is not applicable when currentAssignmentConsistent is false.
assignableResellers Array<Reseller_Summary> The resellers that have usage rights on all trunks bound to the selected DIDs. An empty array indicates that no reseller can be assigned.
inUseDids Array<In_Use_DID> The DIDs that are currently occupied by a tenant. Reassigning them releases the original tenant occupancy immediately.
Reseller_Summary
Parameter Type Description
resellerId String The user ID of the reseller.
name String The name of the reseller.
email String The email address of the reseller.
In_Use_DID
Parameter Type Description
didId String The ID of the DID.
didDisplay String The DID number in the default display format.
currentResellerId String The ID of the reseller that the DID is currently assigned to.
tenantCode String The code of the tenant that occupies the DID.

Example

Request example

POST /uc-cconfig/api/v1/dids/assignment-preview HTTP/1.1
Host: api.cn.novoone.com
Authorization: Bearer eyJraWQiOiJjbi0wLWtleS0xIiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJkaXN0cmlidXRvcmV4YW1wbGVAb3V0bG9vay5j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273472307200"
  ]
}

Response example

HTTP/1.1 200 OK
{
  "requestId": "d9bc7ce90acf6b3c35dea8c0a04bfd5e",
  "code": "200",
  "message": "SUCCESS",
  "detailMessage": "",
  "result": {
    "currentAssignmentConsistent": true,
    "currentResellerId": "3471902689642823680",
    "assignableResellers": [
      {
        "resellerId": "3380587246366191616",
        "name": "yaya",
        "email": "zaza@yeastar.com"
      },
      {
        "resellerId": "3471902689642823680",
        "name": "Example li",
        "email": "resellerexample@outlook.com"
      }
    ],
    "inUseDids": []
  }
}
Note:

The inUseDids array lists the DIDs that are currently occupied by a tenant. This is a non-blocking warning: reassigning these DIDs releases the original tenant occupancy immediately.