POST api/USSDservice/USSDRequest
Request Information
URI Parameters
None.
Body Parameters
USSDInputRequestName | Description | Type | Additional information |
---|---|---|---|
sessionId | string |
None. |
|
userInput | string |
None. |
|
sessionValues | Collection of Sessionvalue |
None. |
Request Formats
application/json, text/json
Sample:
{ "sessionId": "sample string 1", "userInput": "sample string 2", "sessionValues": [ { "indexableKey": { "index": 1, "key": "sample string 2" }, "value": "sample string 1" }, { "indexableKey": { "index": 1, "key": "sample string 2" }, "value": "sample string 1" } ] }
application/xml, text/xml
Sample:
<USSDInputRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ussdAPI.Models"> <sessionId>sample string 1</sessionId> <sessionValues> <Sessionvalue> <indexableKey> <index>1</index> <key>sample string 2</key> </indexableKey> <value>sample string 1</value> </Sessionvalue> <Sessionvalue> <indexableKey> <index>1</index> <key>sample string 2</key> </indexableKey> <value>sample string 1</value> </Sessionvalue> </sessionValues> <userInput>sample string 2</userInput> </USSDInputRequest>
application/x-www-form-urlencoded
Sample:
Response Information
Resource Description
USSDOutputResponseName | Description | Type | Additional information |
---|---|---|---|
prompt | string |
None. |
|
end | boolean |
None. |
|
nextPage | string |
None. |
|
result | Dictionary of string [key] and string [value] |
None. |
Response Formats
application/json, text/json
Sample:
{ "prompt": "sample string 1", "end": true, "nextPage": "sample string 3", "result": { "sample string 1": "sample string 2", "sample string 3": "sample string 4" } }
application/xml, text/xml
Sample:
<USSDOutputResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ussdAPI.Models"> <end>true</end> <nextPage>sample string 3</nextPage> <prompt>sample string 1</prompt> <result xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d2p1:KeyValueOfstringstring> <d2p1:Key>sample string 1</d2p1:Key> <d2p1:Value>sample string 2</d2p1:Value> </d2p1:KeyValueOfstringstring> <d2p1:KeyValueOfstringstring> <d2p1:Key>sample string 3</d2p1:Key> <d2p1:Value>sample string 4</d2p1:Value> </d2p1:KeyValueOfstringstring> </result> </USSDOutputResponse>