Update an Inbound Route
Updates an inbound route and returns the updated inbound route.
Request URL
PUT {base_url}/uc-cconfig/api/v1/inbound-routes/{id}
Request parameters
- Headers
-
Parameter Required Type Description Authorization Yes String The access token used for authentication. Format: Bearer
{access_token}.x-tenant-code Yes String The tenant name. Note: You can obtain tenant name using the Query Tenants interface.
- Path parameters
-
Parameter Required Type Description id Yes String The ID of the inbound route to update. You can obtain the ID using the Search Inbound Routes interface.
- Body parameters
-
Parameter Required Type Description name No String The name of the inbound route. The value ranges from 1 to 63 characters. didMatch No Object<DID_Match_Config> The DID match configuration of the inbound route. callerMatch No Object<Caller_Match_Config> The caller number match configuration of the inbound route. trunkIds No Array<String> The list of IDs of the trunks to bind. destination No Object<Destination_Config> The destination of the inbound route. description No String The description of the inbound route. The maximum length is 255 characters. timeBasedRoutingEnabled No Boolean Whether to enable time-based routing.
Valid value:
true: Enable time-based routing.false: Disable time-based routing.
timeBasedRoutingProfileId No String The ID of the business hours profile that time-based routing references. timeBasedRoutingConfig No Object<Time_Based_Routing_Config> The time-based routing configuration.
- DID_Match_Config
-
Parameter Required Type Description mode No String The DID match mode.
Valid value:
DID_PATTERN: Match by DID pattern rules.PATTERN_TO_EXT: Match the DID pattern to users.RANGE: Match the DID range to a user range.EXACT: Map DID numbers to specific users.
If not specified,
DID_PATTERNis used.patterns No Array<String> The list of DID number patterns. This parameter is valid only when mode is DID_PATTERN.patternWithExt No String The DID pattern with the {{.Ext}}placeholder. This parameter is valid only when mode isPATTERN_TO_EXT.mappings No Array<DID_Match_Mapping> The exact mappings of DID numbers to users. This parameter is valid only when mode is EXACT.didIdStart No String The start ID of the DID record range. This parameter is valid only when mode is RANGE.didIdEnd No String The end ID of the DID record range. This parameter is valid only when mode is RANGE.
- DID_Match_Mapping
-
Parameter Required Type Description didId Yes String The ID of the selected DID record. The DID number is resolved from the ID. userId Yes String The ID of the target user.
- Caller_Match_Config
-
Parameter Required Type Description patterns No Array<String> The list of caller number patterns.
- Destination_Config
-
Parameter Required Type Description type No String The type of the route destination.
Valid value:
HANGUP: Hang up the call.USER: Route the call to a specified user.MATCH_SELECTED_USERS: Extract the extension number from the DID and route the call to the allowed users.MATCH_USER_RANGE: Map the DID range to an extension range.DID_TO_SPECIFIC_USER: Map the DID number to a specific user.IVR: Route the call to an IVR.EXTERNAL_NUMBER: Route the call to an external number.RING_GROUP: Route the call to a ring group.QUEUE: Route the call to a queue.USER_VOICEMAIL: Route the call to the voicemail of a user. value is required.GROUP_VOICEMAIL: Route the call to the voicemail of a ring group. value is required.PLAY_PROMPT: Play a prompt and then hang up. value is the prompt file name, and prefix is the playback count.
If not specified,
HANGUPis used.value No String The value of the destination, which is interpreted according to type. prefix No String The outbound prefix. This parameter is valid only when type is EXTERNAL_NUMBER. The maximum length is 7 characters.allowedUserIds No Array<String> The list of IDs of the allowed users. This parameter is valid only when type is MATCH_SELECTED_USERS.extensionStart No String The start of the extension range. This parameter is valid only when type is MATCH_USER_RANGE.extensionEnd No String The end of the extension range. This parameter is valid only when type is MATCH_USER_RANGE.repeatCount No Integer The number of times the prompt is played. This parameter is valid only when type is
PLAY_PROMPT.Valid value:
0: Not set.1-5: The number of times.
- Time_Based_Routing_Config
-
Parameter Required Type Description holidayHandling No String The handling method for holidays.
Valid value:
route: Route the call to the holiday destination.play_prompt: Play a prompt.ignore: Ignore the holiday.
If not specified,
routeis used.businessHoursDestination No Object<Destination_Config> The destination during business hours. outsideDestination No Object<Destination_Config> The destination outside business hours. holidayDestination No Object<Destination_Config> The destination on holidays.
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.
|
| 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<Inbound_Route> | The updated inbound route. |
- Inbound_Route
-
Parameter Type Description id String The ID of the inbound route. name String The name of the inbound route. listOrder Integer The position of the inbound route in the route list. description String The description of the inbound route. didMatch Object<DID_Match_Info> The DID match configuration of the inbound route. callerMatch Object<Caller_Match> The caller number match configuration of the inbound route. trunkIds Array<String> The list of IDs of the trunks bound to the inbound route. destination Object<Destination> The destination of the inbound route. createdAt String The time when the inbound route was created, in Unix timestamp format (milliseconds). updatedAt String The time when the inbound route was last updated, in Unix timestamp format (milliseconds). timeBasedRoutingEnabled Boolean Whether time-based routing is enabled.
true: Time-based routing is enabled.false: Time-based routing is disabled.
timeBasedRoutingProfileId String The ID of the business hours profile that time-based routing references. timeBasedRoutingConfig Object<Time_Based_Routing_Config_Info> The time-based routing configuration.
- DID_Match_Info
-
Parameter Type Description mode String The DID match mode:
DID_PATTERNPATTERN_TO_EXTRANGEEXACT
patterns Array<String> The list of DID number patterns. This parameter is returned only when mode is DID_PATTERN.patternWithExt String The DID pattern with the {{.Ext}}placeholder. This parameter is returned only when mode isPATTERN_TO_EXT.mappingsCount Integer The number of DID mappings. mappings Array<DID_Mapping_Detail> The DID mappings. This parameter is returned only when mode is EXACT.didIdStart String The start ID of the DID record range. This parameter is returned only when mode is RANGE, and an empty string is returned in other modes.didIdEnd String The end ID of the DID record range. This parameter is returned only when mode is RANGE, and an empty string is returned in other modes.defaultDisplayFormatStart String The default display format of the DID at the range start. defaultDisplayFormatEnd String The default display format of the DID at the range end. didNameStart String The name of the DID at the range start. didNameEnd String The name of the DID at the range end. countryCodeStart String The country code of the DID at the range start. countryCodeEnd String The country code of the DID at the range end. didE164Start String The E.164 number of the DID at the range start. didE164End String The E.164 number of the DID at the range end.
- DID_Mapping_Detail
-
Parameter Type Description userId String The ID of the user that the DID number is mapped to. extension String The extension number of the user. userName String The name of the user. didId String The ID of the DID record. An empty string indicates that the DID reference is missing or invalid. defaultDisplayFormat String The default display format of the DID number. didName String The name of the DID number. countryCode String The country code of the DID number. didE164 String The E.164 number of the DID.
- Caller_Match
-
Parameter Type Description patterns Array<String> The list of caller number patterns.
- Destination
-
Parameter Type Description type String The type of the route destination:
HANGUPUSERMATCH_SELECTED_USERSMATCH_USER_RANGEDID_TO_SPECIFIC_USERIVREXTERNAL_NUMBERRING_GROUPQUEUEUSER_VOICEMAILGROUP_VOICEMAILPLAY_PROMPT
value String The value of the destination. prefix String The outbound prefix. This parameter is returned only when type is EXTERNAL_NUMBER.allowedUserIds Array<String> The list of IDs of the allowed users. This parameter is returned only when type is MATCH_SELECTED_USERS.extensionStart String The start of the extension range. This parameter is returned only when type is MATCH_USER_RANGE.extensionEnd String The end of the extension range. This parameter is returned only when type is MATCH_USER_RANGE.repeatCount Integer The number of times the prompt is played. This parameter is returned only when type is PLAY_PROMPT.
- Time_Based_Routing_Config_Info
-
Parameter Type Description holidayHandling String The handling method for holidays:
routeplay_promptignore
businessHoursDestination Object<Destination> The destination during business hours. outsideDestination Object<Destination> The destination outside business hours. holidayDestination Object<Destination> The destination on holidays.
Example
Request example
PUT /uc-cconfig/api/v1/inbound-routes/374469838063886336 HTTP/1.1
Host: api.cn.novoone.com
Authorization: Bearer eyJraWQiOiJjbi0wLWtleS0xIiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJkaXN0cmlidXRvcmV4YW1wbGVAb3V0bG9vay5jb20iLCJhcHBfa2V5Ijoic2xOdnQzaHc1NXB2Vm5HRlNhR2ZOVTNmMWxYQ3lpa08iLCJncmFudF90eXBlIjoib3BlbmFwaSIsImNsaWVudF9leHQiOnsiZGVzY3JpcHRpb24iOiLnrKzkuInmlrnlkIjkvZzkvJnkvLTlupTnlKgiLCJwYXJ0bmVyIjoi56S65L6L5ZCI5L2c5LyZ5Ly0In0sImNsaWVudF90eXBlIjoib3BlbmFwaSIsImV4cCI6MTc5MzM2OTMwNCwiaWF0IjoxNzkzMzQ3NzA0LCJqdGkiOiJmMzVlZDk0MC01MDEyLTRjMjctOGE0NS0wM2EzYTVhZTFmMjUiLCJjbGllbnRfaWQiOiJub3ZvLW9wZW4tcGxhdGZvcm0iLCJ1c2VyX2V4dCI6eyJyb2xlSWRzIjpbM10sInN0eXBlIjoiQURNSU4iLCJ0ZW5hbnRDb2RlIjpudWxsLCJ0eXBlIjoiUF9BQ0NPVU5UIiwidXNlcklkIjozMDc2OTEzNjQ0OTE1OTk4NzIwLCJlbWFpbCI6ImRpc3RyaWJ1dG9yZXhhbXBsZUBvdXRsb29rLmNvbSIsInVzZXJuYW1lIjoiZGlzdHJpYnV0b3JleGFtcGxlQG91dGxvb2suY29tIiwidWNJZCI6MzA3NjkxMzY0NDg5MDgzMjg5Nn19.XOFg1WgfepDISEY6GwoJLoh2fclbzYlN1T0KABLNw2scP9Ew_OHvMHNBIqVmjnfj-L5tUDzRJ1jMUtUUWKOAXShaKl1IORVQDV2FwJYv7fqnrjW_HFCDmTGDim47PD99ZgRqUrU1-zCXrO9a4_fov2W_3rlSrPVVb2DGxoq4pE1PQ94SUsQ9JnPC4NaLY_RnoUeNmlFJ8_3PUVLIKgxYuhDt1YSR6qX9Qy4r9cEkMidG5Ae1rDceDk1rsnxddMOaoFzTu0WS0FJTRf8w5SnKVLueIh6LkRaIgdFRO4L3-DmseAj-ZaYgEATExvVAB3M_5q8oemiIqQepbtq66yW06g
x-tenant-code: colortest2
Content-Type: application/json
{
"name": "ir-doc-test-1-upd",
"didMatch": {
"mode": "DID_PATTERN",
"patterns": [
"6001"
]
},
"trunkIds": [
"367177966216302592"
],
"destination": {
"type": "IVR",
"value": "342969063155736576"
},
"description": "Updated for doc testing."
}
Response example
HTTP/1.1 200 OK { "requestId": "18de06552fb1854dc33b3d0282e8de2b", "code": "200", "message": "SUCCESS", "detailMessage": "", "result": { "id": "374469838063886336", "name": "ir-doc-test-1-upd", "listOrder": 3, "description": "", "didMatch": { "mode": "DID_PATTERN", "patterns": [ "6001" ], "patternWithExt": "", "mappingsCount": 0, "mappings": [], "didIdStart": "", "didIdEnd": "", "defaultDisplayFormatStart": "", "defaultDisplayFormatEnd": "", "didNameStart": "", "didNameEnd": "", "countryCodeStart": "", "countryCodeEnd": "", "didE164Start": "", "didE164End": "" }, "callerMatch": { "patterns": [] }, "trunkIds": [ "367177966216302592" ], "destination": { "type": "IVR", "value": "342969063155736576", "allowedUserIds": [], "extensionStart": "", "extensionEnd": "" }, "createdAt": "0", "updatedAt": "0", "timeBasedRoutingEnabled": false, "timeBasedRoutingProfileId": "", "timeBasedRoutingConfig": {} } }