{"openapi":"3.0.0","servers":[{"url":"https:\/\/api.digitalcore.telkomsel.com"}],"info":{"title":"Send USSD","version":"1.0.0"},"paths":{"\/digihub\/ussd\/broadcast":{"post":{"summary":"Send USSD","operationId":"sendUSSD","description":"API to send USSD message.","parameters":[{"in":"header","name":"api_key","example":"e688u2hgpkzjd244wecywwv8","description":"API Key \/ Package Key from Digihub","required":true,"schema":{"type":"string"}},{"in":"header","name":"x-signature","example":"ff080f3200a5945deeb59ad65e2b33788f5df49066a82afcf8b6d5bf43ff76ea","description":"SHA256 (API Key + Secret Key + timeStamp). [More info](https:\/\/digihub.telkomsel.com\/documentation\/consumer-guide\/api-authentication)","required":true,"schema":{"type":"string"}},{"in":"header","name":"Content-Type","required":true,"schema":{"type":"string","enum":["application\/json"]}}],"requestBody":{"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/RequestBody"},"examples":{"Non Interactive Mode":{"value":{"transaction":{"transaction_id":"USSDBS190305164243721931830","channel":"MP","callback_domain":"domain.com\/callback\/digihub\/ussdapi"},"ussd_broadcast":{"mms":"0","msisdn":"62811xx","operation_type":"NI","ussd_content":"Test Broadcast","ussd_short_code":""}}},"Interactive Mode":{"value":{"transaction":{"transaction_id":"USSDBS190305164243721931830","channel":"MP","callback_domain":"domain.com\/callback\/digihub\/ussdapi"},"ussd_broadcast":{"mms":"1","msisdn":"62811xx","operation_type":"IN","ussd_content":"Test Broadcast","ussd_short_code":""}}},"Short-code Push Mode":{"value":{"transaction":{"transaction_id":"USSDBS190305164243721931830","channel":"MP","callback_domain":"domain.com\/callback\/digihub\/ussdapi"},"ussd_broadcast":{"mms":"1","msisdn":"62811xx","operation_type":"SP","ussd_content":"Test Broadcast","ussd_short_code":"900"}}}}}}},"responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ResponseBodySuccess"}}}},"400":{"description":"Invalid mandatory parameter \/ Empty mandatory parameter \/ Invalid callback URL","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ResponseBodyError"},"examples":{"Invalid mandatory parameter":{"value":{"transaction":{"transaction_id":"C002190726165745657448250","channel":"MP","status_code":"20002","status_desc":"Invalid mandatory parameter"},"ussd_broadcast":{"push_reference_id":"2019230154329515"}}},"Empty mandatory parameter":{"value":{"transaction":{"transaction_id":"C002190726165745657448250","channel":"MP","status_code":"20003","status_desc":"Empty mandatory parameter"},"ussd_broadcast":{"push_reference_id":"2019230154329515"}}},"Invalid callback URL":{"value":{"transaction":{"transaction_id":"C002190726165745657448250","channel":"MP","status_code":"20100","status_desc":"Invalid callback URL"},"ussd_broadcast":{"push_reference_id":"2019230154329515"}}}}}}},"500":{"description":"Client business error \/ ESB internal error \/ TMN communication exception","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ResponseBodyError"},"examples":{"InvClient business error":{"value":{"transaction":{"transaction_id":"C002190726165745657448250","channel":"MP","status_code":"20101","status_desc":"Client business error"},"ussd_broadcast":{"push_reference_id":"2019230154329515"}}},"ESB internal error":{"value":{"transaction":{"transaction_id":"C002190726165745657448250","channel":"MP","status_code":"40000","status_desc":"ESB internal error"},"ussd_broadcast":{"push_reference_id":"2019230154329515"}}},"TMN communication exception":{"value":{"transaction":{"transaction_id":"C002190726165745657448250","channel":"MP","status_code":"40004","status_desc":"TMN communication exception"},"ussd_broadcast":{"push_reference_id":"2019230154329515"}}}}}}},"502":{"description":"Service provider error: {consumer}-{provider}-{service provider error description}","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ResponseBodyError"},"example":{"transaction":{"transaction_id":"C002190726165745657448250","channel":"MP","status_code":"30xxx","status_desc":"Service provider error: {consumer}-{provider}-{service provider error description}"},"ussd_broadcast":{"push_reference_id":"2019230154329515"}}}}},"503":{"description":"Service provider unreachable","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ResponseBodyError"},"example":{"transaction":{"transaction_id":"C002190726165745657448250","channel":"MP","status_code":"10001","status_desc":"Service provider unreachable"},"ussd_broadcast":{"push_reference_id":"2019230154329515"}}}}}},"callbacks":{"deliveryReport":{"https:\/\/{$request.body#\/transaction\/callback_domain}":{"post":{"requestBody":{"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/CallbackBody"}}}},"responses":{"2XX":{"description":"Your server implementation should return this HTTP status code if the data was received successfully"}}}}}}}}},"components":{"schemas":{"RequestBody":{"type":"object","required":["transaction","ussd_broadcast"],"properties":{"transaction":{"$ref":"#\/components\/schemas\/RequestTransaction"},"ussd_broadcast":{"$ref":"#\/components\/schemas\/RequestUssdBroadcast"}}},"RequestTransaction":{"type":"object","properties":{"transaction_id":{"description":"Unique Id generated at source","type":"string","example":"USSDBS190305164243721931830"},"channel":{"description":"Channel ID","type":"string","example":"MP"},"callback_domain":{"description":"Callback domain of partner should matches the following format : `domain.com\/callback\/digihub\/ussdapi`","type":"string","example":"domain.com\/callback\/digihub\/ussdapi"}}},"RequestUssdBroadcast":{"type":"object","required":["mms","msisdn","operation_type","ussd_content","ussd_short_code"],"properties":{"mms":{"description":"More Message to Send.<br>\n0 \u2013 No more further message.<br>\n1 \u2013 More message to be sent soon (for interactive mode).\n","type":"string","enum":["1","2"],"example":"1"},"msisdn":{"description":"Subscriber mobile number","type":"string","example":"62811xx"},"operation_type":{"description":"Operation Service Type<br>\nNI \u2013 non-interactive.<br>\nIN \u2013 interactive.<br>\nSP \u2013 shortcode-push.\n","type":"string","enum":["NI","IN","SP"],"example":"NI"},"ussd_content":{"description":"Ussd content in url endcoded format based on the operation type.<br>\nNI \u2013 Must be filled.<br>\nIN \u2013 Must be filled.<br>\nSP \u2013 Must be empty.\n","type":"string","example":"Hello World!"},"ussd_short_code":{"description":"Ussd ShortCode.<br>\nNI \u2013 Must be empty.<br>\nIN \u2013 Must be empty.<br>\nSP \u2013 Must be filled.\n","type":"string","example":"*123#"}}},"ResponseBodySuccess":{"type":"object","required":["transaction","ussd_broadcast"],"properties":{"transaction":{"$ref":"#\/components\/schemas\/ResponseTransaction"},"sms_information":{"$ref":"#\/components\/schemas\/ResponseUssdBroadcast"}}},"ResponseBodyError":{"type":"object","required":["transaction"],"properties":{"transaction":{"$ref":"#\/components\/schemas\/ResponseTransaction"}}},"ResponseTransaction":{"type":"object","required":["transaction_id","channel","status_code","status_desc"],"properties":{"transaction_id":{"description":"Transaction ID","type":"string","example":"C002190726165745657448250"},"channel":{"description":"Unique ID of the source which had initiated the transaction","type":"string","example":"MP"},"status_code":{"description":"Status code","type":"string","example":"00000"},"status_desc":{"description":"Status descriptiona","type":"string","example":"Success"}}},"ResponseUssdBroadcast":{"type":"object","required":["push_reference_id"],"properties":{"push_reference_id":{"description":"Unique reference key, format is `yyyyddMMxxxxxxxx`<br>\n`y` is year<br>\n`d` is date<br>\n`M` is month<br>\n`x` is random number from timestamp char 3 \u2013 8.\n","type":"string","example":2019230154329515}}},"CallbackBody":{"type":"object","required":["transaction_id","push_reference_id","status","content"],"properties":{"transaction_id":{"description":"Transaction ID","type":"string","example":"C002190726165745657448250"},"push_reference_id":{"description":"Ussd pusdh reference id","type":"string","example":"2018122654329521"},"status":{"description":"Delivery report status","type":"string","enum":["SENDING","DELIVRD","UNDELIV"],"example":"DELIVRD"},"content":{"description":"Content of delivery, if content contains \u201cerror:\u201d then sending ussd is undeliv","type":"string","example":"Yes"}}}}}}