Subscriber function codes (featurecodes)
Requests
HTTP verb | Endpoint | Description |
---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Creation of a new CAF
Request
Field Description: featurecode entity
POST /rest/v1/uc/featurecodes HTTP/1.1
Content-Type: application/json; charset=utf-8
featurecode entity
Response
Field Description: featurecode entity
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"id": "c0d66244-016c-b869-ead9-50e54938780c",
"prefix": "150",
"type": "ivr",
"extension": "vmail",
"priority": 100,
"opts": {
"title": "",
"comment": ""
},
"ext": {
"ct": "2019-08-22T08:20:44.88Z",
"lwt": "2019-08-22T08:20:44.88Z"
}
}
Obtaining the list of CAFs
Request
Name | Type | Description |
---|---|---|
|
|
Filter by field values. |
|
|
List of fields to output. Available fields for output: id, prefix, type, extension, priority, opts.title, ext.lwt, ext.ct. |
|
|
Offset in the list of resources to be issued. |
|
|
The maximum number of resources in the list. |
|
|
The sort order of the resources in the list. |
|
|
Conversion to flat form of composite fields. |
GET /rest/v1/uc/featurecodes?filter={"type":"ivr"}&offset=0&limit=2 HTTP/1.1
Response
Field Description: featurecode entity
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
[
{
"id": "c0d66244-016c-b869-ead9-50e54938780c",
"prefix": "150",
"type": "ivr",
"extension": "vmail",
"priority": 1234,
"ext": {
"ct": "2019-08-22T08:20:44.88Z",
"lwt": "2019-08-22T08:20:44.88Z"
}
},
{
"id": "c2171b12-016c-b86a-2517-50e54938780c",
"prefix": "*101",
"type": "ivr",
"extension": "welcome",
"priority": 300,
"ext": {
"ct": "2019-08-22T08:20:59.79Z",
"lwt": "2019-08-22T08:20:59.79Z"
}
}
]
Obtaining CAF data
Request
Name | Type | Description |
---|---|---|
|
|
A list of fields to output. |
|
|
Conversion to flat form of composite fields. |
GET /rest/v1/uc/featurecodes/dccd337a-016c-d1cf-7393-50e54938780c HTTP/1.1
Response
Field Description: featurecode entity
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"id": "dccd337a-016c-d1cf-7393-50e54938780c",
"prefix": "*99",
"type": "voicemail",
"extension": "",
"priority": 100,
"opts": {
"title": "",
"comment": "default voicemail receive script used"
},
"ext": {
"ct": "2019-08-27T06:42:09.17Z",
"lwt": "2019-08-27T06:42:09.17Z"
}
}
Changing CAF data
Fields prohibited for modification: id
Request
Field Description: featurecode entity
PATCH /rest/v1/uc/featurecodes/c0d66244-016c-b869-ead9-50e54938780c HTTP/1.1
Content-Type: application/json; charset=utf-8
featurecode entity
Response
Field Description: featurecode entity
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"id": "c0d66244-016c-b869-ead9-50e54938780c",
"prefix": "*101",
"type": "ivr",
"extension": "vmail",
"priority": 100,
"opts": {
"title": "",
"comment": "custom voicemail IVR script"
},
"ext": {
"ct": "2019-08-22T08:20:44.88Z",
"lwt": "2019-09-08T11:46:59.02Z"
}
}
Removal of CAF
Search for CAF identifier
Searches the resource for the specified key, returns the identifier(s) to build the endpoint.
Key fields to search for: id, prefix
Request
LOOKUP /rest/v1/uc/featurecodes HTTP/1.1
Content-Type: application/json; charset=utf-8
"*101"
Response
HTTP/1.1 200 OK
content-type: application/json; charset=utf-8
[
"c0d66244-016c-b869-ead9-50e54938780c"
]
HTTP/1.1 404 Not Found
Content-Type: application/json; charset=utf-8
{
"error_code": 1404,
"error_message": "Lookup failed"
}