api:customer:callnotify-update
Table of Contents
API : Customer Call Notifier Update
Introduction
This request will update a call notify item, which describes an endpoint that gets notified about call events.
Request
| URL | https://api.telecomx.dk/customer/CUSTOMER_ID/callnotify/CALL_NOTIFY_ID | ||
|---|---|---|---|
| Method | POST | ||
| Access level | MANAGER or OWNER if user belongs to the customer. RESELLER if customer belongs to the reseller or a sub reseller. RESELLER_ADMIN. ADMIN. |
||
| Param | CUSTOMER_ID | Id of the customer, (24 hex-char string). | |
| CALL_NOTIFY_ID | Id of the call notify item (24 hex-char string). | ||
| Body | url | String | [optional] URL to call on event Format: <protocol>://<host>:<port>/<path>?<args> Protocols: http, https, tcp or udp Host: hostname or IP address Port: port number (not required for http and https) Path: URI Path, if required (does not apply to tcp and udp) Args: if additional args are needed e.g. for authentication (does not apply to tcp and udp) |
| method | String | [optional] Method for sending data to the subscriber: POSTARGS: Send as POST/body data, e.g. a=1&b=2. POSTXML1: Send as POST/body XML in common telecom provider format. POSTXML2: Send as POST/body XML in common telecom provider format with additional data. POSTJSON: Send as POST/body JSON data. GET1: Send as URI arguments in common telecom provider format. GET2: Send as URI arguments in common telecom provider format with additional data. |
|
| selection | String | [optional] Which type of calls to send events on: SIP, MVNO or ALL. |
|
Only the properties to change need to be sent. An empty body is rejected with 422 url.
Request body example
{ "url": "https://api.example.dk/call-events-v2" }
Response
the updated item:
| JSON object | ||
|---|---|---|
| _id | Id | Unique call notify id |
| url | String | URL to call on event Format: <protocol>://<host>:<port>/<path>?<args> Protocols: http, https, tcp or udp Host: hostname or IP address Port: port number (not required for http and https) Path: URI Path, if required (does not apply to tcp and udp) Args: if additional args are needed e.g. for authentication (does not apply to tcp and udp) |
| method | String | Method for sending data to the subscriber: POSTARGS: Send as POST/body data, e.g. a=1&b=2. POSTXML1: Send as POST/body XML in common telecom provider format. POSTXML2: Send as POST/body XML in common telecom provider format with additional data. POSTJSON: Send as POST/body JSON data. GET1: Send as URI arguments in common telecom provider format. GET2: Send as URI arguments in common telecom provider format with additional data. |
| selection | String | Which type of calls to send events on: SIP, MVNO or ALL. |
Note that properties holding no value may be omitted from the object.
Example - normal
{ "_id": "650000000000000000000701", "url": "https://api.example.dk/call-events-v2", "method": "POSTJSON", "selection": "ALL" }
Errors
| Error code | Message | Description |
|---|---|---|
| 422 | customer | Customer id is invalid |
| 422 | id | Call notify id is invalid |
| 403 | access_denied | Insufficient access level |
| 404 | not_found | Customer not found |
| 404 | callnotify | Call notify not found |
| 422 | url | Invalid URL |
| 422 | url | URL protocol is invalid |
| 422 | url | Protocol types TCP and UDP only permit host and port |
| 422 | url | Protocol types TCP and UDP requires a valid port |
| 422 | url | Port is invalid |
| 422 | url | URL points to an invalid IP address |
| 422 | url | URL points to an invalid hostname |
| 422 | method | Invalid method |
| 422 | selection | Invalid selection |
| 500 | internal_error | <Unspecified> |
api/customer/callnotify-update.txt · Last modified: by Mikkel Meerwaldt Jørgensen