Get DNIS Allocation
This method retrieves the Interaction unique ID of the Interaction to which a phone number is allocated.
Invoking the Method Using REST
URL Syntax and Example
http(s)://[host:port/internalPath]/Application Name/version/[version]/dnis/allocate/get/{phone}
https://gointeract.io/interact/version/2/dnis/allocate/get/380974520200
Specific URI Fields
URI Field | Data Type | Description/Notes |
---|---|---|
phone | string | The relevant phone number. You may use either the full phone number or the DNID. |
HTTP Method
GET
HTTP Headers
Tenant-Id: <account> Application-Key: <dnis application key> Environment-Name: <environment-name>
Expected Responses
Response Scenario | Status Code/Header | Example Message |
---|---|---|
Success (phone found and allocated and ID returned successfully) | 200 | <unique id> |
Success (phone found but not allocated) | 200 | EMPTY |
Invalid security headers | 401 "Unauthenticated-Reason" Header | { "code":"0x7000000", "message": "Request is unauthorized, missing or wrong credentials", "moreInfoUrl":"http://support.uniphore.com", } |
Phone number does not exist | 404 | Phone number <phone number> was not found |
General error (internal error) | 500 | exception |
Invoking the Method Using SOAP
WSDL URL
https://gointeract.io/interact/version/2/agent/soap/agent.wsdl
Headers
Tenant-Id: <tenantId> Application-Key: <dnis application key> Environment-Name: <environment-name>
Input Parameters
Parameter | Description |
---|---|
phone | The relevant phone number. You may use either the full phone number or the DNID. |
Sample Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap="http://com/jacada/interact/agent/soap"> <soapenv:Header/> <soapenv:Body> <soap:GetDnisAllocationRequest> <soap:phone>111</soap:phone> </soap:GetDnisAllocationRequest> </soapenv:Body> </soapenv:Envelope>
Expected Responses
Response Scenario | Example Message |
---|---|
Success (phone found and allocated and ID returned successfully) | <ns2:result>Success</ns2:result> |
Success (phone found but not allocated) | EMPTY |
Invalid security headers | <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Header/> <SOAP-ENV:Body> <SOAP-ENV:Fault> <faultcode>0x7000000</faultcode> <faultstring>Request is unauthorized, missing or wrong credentials</faultstring> </SOAP-ENV:Fault> </SOAP-ENV:Body> </SOAP-ENV:Envelope> |
Phone number does not exist | <ns2:result>Phone number <phone number> was not found</ns2:result> |
General error (internal error) | exception (in XML format) |