Bulk Update DIDs

Updates the trunk assignment for multiple DIDs in a single batch operation.

Request URL

PUT {base_url}/uc-cconfig/api/v1/dids/batch

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
ids Yes Array<String> The list of DID IDs to update (1–1000 entries, each ID greater than 0).
trunkIds Yes Array<String> The new list of trunk IDs to assign (at least 1 entry, each ID greater than 0).
confirmResellerReset No Boolean The reseller reset confirmation: true = confirm and save, revoking the reseller's access; omitted or false = do not save, and the response carries the reseller_reset_warning details.

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<Batch_Update_Result> The batch update result.
Batch_Update_Result
Parameter Type Description
successCount Integer The number of DIDs successfully updated.
failedCount Integer The number of DIDs that failed to update.
failures Array<Batch_Failure> The list of failed entries.
results Array<DID_Data> The list of successfully updated DID data.
ownFailures Array<Batch_Failure> The list of DIDs that conflict with DIDs under the current user.
otherFailures Array<Batch_Failure> The list of DIDs that conflict with DIDs under other users.
resellerResetWarning Object<Reseller_Reset_Warning> The reseller reset warning details.
Note:

When the new trunkIds would cause an assigned reseller to lose usage rights, omit confirmResellerReset or set it to false to receive the resellerResetWarning details without saving. Set it to true to save the change and recall the reseller.

Batch_Failure
Parameter Type Description
id String The DID ID (0 when creation failed).
errorCode String The error status code.
errorMessage String The reason for the failure.
didNumber String The DID number used in the range creation.
defaultDisplayFormat String The default display format of the existing conflicting DID.
DID_Data
Parameter Type Description
id String The DID ID.
didNumber String The DID number (original input, may contain formatting characters).
didName String The DID name.
destination String The DID call destination, for example extension:1001, ivr:sales.
creator String The user ID of the creator.
assignedTenant String The tenant currently assigned to this DID (null = unassigned).
trunkIds Array<String> The list of bound trunk IDs.
createdAt String The creation time as a millisecond timestamp.
updatedAt String The update time as a millisecond timestamp.
didE164 String The full E.164 format number. For Unknown Country, stores nationalNumber.
countryCode String The ISO 3166-1 country code, for example CN, US. XX indicates Unknown Country.
countryCallingCode String The country calling code, for example 86, 1. Empty for Unknown Country.
nationalNumber String The local number (country code stripped, cleaned digits only).
numberType String The number type, for example Local, Mobile, Toll-free. Supports custom values.
defaultDisplayFormat String The default display format, for example (261) 111-1127.
remark String The remark.
assignedReseller String The assigned reseller ID (empty = My Tenant).
ownerType String The ownership type (admin or reseller). Immutable after creation.
resellerResetWarning Object<Reseller_Reset_Warning> The reseller reset warning details.
Reseller_Reset_Warning
Parameter Type Description
saved Boolean Whether the operation was saved. Always false when a warning exists.
items Array<Reseller_Reset_Item> The list of affected DID entries.
Reseller_Reset_Item
Parameter Type Description
didDisplay String The affected DID number (default display format).
resellerEmail String The email of the currently assigned reseller.
tenantName String The tenant occupancy name (returned when the DID has been assigned to a tenant; empty otherwise).

Example

Request example

PUT /uc-cconfig/api/v1/dids/batch HTTP/1.1
Host: api.cn.novoone.com
Authorization: Bearer eyJraWQiOiJjbi0wLWtleS0xIiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJkaXN0cmlidXRvcmV4YW1wbGVAb3V0bG9vay5jb20iLCJhcHBfa2V5Ijoic2xOdnQzaHc1NXB2Vm5HRlNhR2ZOVTNmMWxYQ3lpa08iLCJncmFudF90eXBlIjoib3BlbmFwaSIsImNsaWVudF9leHQiOnsiZGVzY3JpcHRpb24iOiLnrKzkuInmlrnlkIjkvZzkvJnkvLTlupTnlKgiLCJwYXJ0bmVyIjoi56S65L6L5ZCI5L2c5LyZ5Ly0In0sImNsaWVudF90eXBlIjoib3BlbmFwaSIsImV4cCI6MTc5MzYzODk1MywiaWF0IjoxNzkzNjE3MzUzLCJqdGkiOiIzMTg2YTYxNi0yOTdjLTRkNzMtODRkZC1lNzNkODE1ZDRmYmYiLCJjbGllbnRfaWQiOiJub3ZvLW9wZW4tcGxhdGZvcm0iLCJ1c2VyX2V4dCI6eyJyb2xlSWRzIjpbM10sInN0eXBlIjoiQURNSU4iLCJ0ZW5hbnRDb2RlIjpudWxsLCJ0eXBlIjoiUF9BQ0NPVU5UIiwidXNlcklkIjozMDc2OTEzNjQ0OTE1OTk4NzIwLCJlbWFpbCI6ImRpc3RyaWJ1dG9yZXhhbXBsZUBvdXRsb29rLmNvbSIsInVzZXJuYW1lIjoiZGlzdHJpYnV0b3JleGFtcGxlQG91dGxvb2suY29tIiwidWNJZCI6MzA3NjkxMzY0NDg5MDgzMjg5Nn19.FR6Pir4F-5uDAVqebnXRnVymCoQlN5je95U9NywVCtrMLYnEjMNH1cw20Gz81DothBN4jXNzWT6A1V-DcghGQyjNjAAqfwTLYxAeksE_h8myiynhB67sB0VS6EPv8MTkEdVk4dmujjkQXU2yFVzlpQNvLwQhFDqpxlwpsom-Uk5jNh-JpWzpWJs9JP9Bn3oIZAwv847fXkvG_rSkBc2AAHf3y-zpRZ8nEZF4WDSCoEMfbsTdT5qahecCcThvJesTGFWyA1eW4xEUDplwZpnO-s7DIsbUrSO_123ylqOz0YZm2EirVJwr7j4KPzXFtTZdcvZ6t5mI9ofDbXG0woeTOw
Content-Type: application/json
{
  "ids": [
    "375602272973185024",
    "375602273472307200"
  ],
  "trunkIds": [
    "343306926664237056"
  ]
}

Response example

HTTP/1.1 200 OK
{
  "requestId": "8ee39b99b09934311bfddb46461c5215",
  "code": "200",
  "message": "SUCCESS",
  "detailMessage": "",
  "result": {
    "successCount": 2,
    "failedCount": 0,
    "failures": [],
    "results": [],
    "ownFailures": [],
    "otherFailures": []
  }
}
Note:

T

Note:

h

Note:

e

Note:
Note:

Note:

r

Note:

e

Note:

s

Note:

u

Note:

l

Note:

t

Note:

s

Note:

Note:
Note:

a

Note:

r

Note:

r

Note:

a

Note:

y

Note:
Note:

i

Note:

s

Note:
Note:

e

Note:

m

Note:

p

Note:

t

Note:

y

Note:
Note:

i

Note:

n

Note:
Note:

a

Note:
Note:

s

Note:

u

Note:

c

Note:

c

Note:

e

Note:

s

Note:

s

Note:

f

Note:

u

Note:

l

Note:
Note:

c

Note:

a

Note:

l

Note:

l

Note:

.

Note:
Note:

I

Note:

t

Note:
Note:

i

Note:

s

Note:
Note:

p

Note:

o

Note:

p

Note:

u

Note:

l

Note:

a

Note:

t

Note:

e

Note:

d

Note:
Note:

o

Note:

n

Note:

l

Note:

y

Note:
Note:

w

Note:

h

Note:

e

Note:

n

Note:
Note:

t

Note:

h

Note:

e

Note:
Note:

o

Note:

p

Note:

e

Note:

r

Note:

a

Note:

t

Note:

i

Note:

o

Note:

n

Note:
Note:

r

Note:

e

Note:

t

Note:

u

Note:

r

Note:

n

Note:

s

Note:
Note:

t

Note:

h

Note:

e

Note:
Note:

u

Note:

p

Note:

d

Note:

a

Note:

t

Note:

e

Note:

d

Note:
Note:

D

Note:

I

Note:

D

Note:
Note:

d

Note:

a

Note:

t

Note:

a

Note:

.