{"info":{"_postman_id":"868be6ca-3b48-42c1-9513-6001fab8a2a0","name":"Direct7SMS API Code Samples","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"description":"<html><head></head><body></body></html>","owner":"2513454","collectionId":"868be6ca-3b48-42c1-9513-6001fab8a2a0","publishedId":"SzS4QmSr","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2020-03-16T13:27:45.000Z"},"item":[{"name":"D7 HTTP API","event":[{"listen":"prerequest","script":{"id":"e4feaa2b-2e4c-4fa2-908a-1bfb3263ab4e","exec":[""],"type":"text/javascript"}}],"id":"4bf5c6fd-fc49-4dfc-8d2e-e4fff6ad8487","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"urlencoded","urlencoded":[]},"url":"https://http-api.d7networks.com/send?to=9715090019XX&from=SMSinf&coding=1&username=foo&password=bar&dlr=yes&dlr-url=https://4ba60af1.ngrok.io/receive&dlr-level=3&dlr-method=POST&content=Welcome to D7 sms , we will help you to talk with your customer effectively","description":"<p>Direct7 HTTP API allows sms gateway integration using simple HTTP GET/POST requests.</p>\n","urlObject":{"protocol":"https","path":["send"],"host":["http-api","d7networks","com"],"query":[{"description":{"content":"<p>Destination address, only one address is supported per request.(Mandatory)</p>\n","type":"text/plain"},"key":"to","value":"9715090019XX"},{"description":{"content":"<p>Originating address, In case rewriting of the sender’s address is supported or permitted by the SMS-C used to transmit the message, this number is transmitted as the originating address.(Mandatory)</p>\n","type":"text/plain"},"key":"from","value":"SMSinf"},{"description":{"content":"<p>Sets the Data Coding Scheme bits, default is 0, accepts values all allowed values in SMPP protocol 1</p>\n","type":"text/plain"},"key":"coding","value":"1"},{"description":{"content":"<p> Username for D7 user account.(Mandatory)</p>\n","type":"text/plain"},"key":"username","value":"foo"},{"description":{"content":"<p>Password for D7 user account.(Mandatory)</p>\n","type":"text/plain"},"key":"password","value":"bar"},{"description":{"content":"<p>Default is no (no DLR will be tracked)</p>\n","type":"text/plain"},"key":"dlr","value":"yes"},{"description":{"content":"<p>Default is no (no DLR will be tracked)(Mandatory if dlr)</p>\n","type":"text/plain"},"key":"dlr-url","value":"https://4ba60af1.ngrok.io/receive"},{"description":{"content":"<p>1: SMS-C level, 2: Terminal level, 3: Both . (Mandatory if dlr)</p>\n","type":"text/plain"},"key":"dlr-level","value":"3"},{"description":{"content":"<p>DLR is transmitted through http to a third party application using GET or POST method. ( Mandatory if dlr)</p>\n","type":"text/plain"},"key":"dlr-method","value":"POST"},{"description":{"content":"<p>Content to be sent(Mandatory)</p>\n","type":"text/plain"},"key":"content","value":"Welcome to D7 sms , we will help you to talk with your customer effectively"}],"variable":[]}},"response":[{"id":"4074fb13-1cd7-48d8-ad04-ceda9af89e3f","name":"D7 HTTP API Success Response","originalRequest":{"method":"GET","header":[],"body":{"mode":"formdata","formdata":[]},"url":{"raw":"https://http-api.d7networks.com/send?to=971509001994&from=SMSinf&coding=1&username=foo&password=bar&dlr=yes&dlr-url=https://4ba60af1.ngrok.io/receive&dlr-level=3&dlr-method=POST&content=Welcome to D7 sms , we will help you to talk with your customer effectively","protocol":"https","host":["http-api","d7networks","com"],"path":["send"],"query":[{"key":"to","value":"971509001994","description":"Destination address, only one address is supported per request"},{"key":"from","value":"SMSinf","description":"Originating address, In case rewriting of the sender’s address is supported or permitted by the SMS-C used to transmit the message, this number is transmitted as the originating address"},{"key":"coding","value":"1","description":"Sets the Data Coding Scheme bits, default is 0, accepts values all allowed values in SMPP protocol 1\n"},{"key":"username","value":"foo","description":"* Username for D7 user account."},{"key":"password","value":"bar","description":"* Password for D7 user account."},{"key":"dlr","value":"yes","description":"Default is no (no DLR will be tracked)"},{"key":"dlr-url","value":"https://4ba60af1.ngrok.io/receive","description":"Default is no (no DLR will be tracked)"},{"key":"dlr-level","value":"3","description":"1: SMS-C level, 2: Terminal level, 3: Both . *Mandatory if dlr"},{"key":"dlr-method","value":"POST","description":"DLR is transmitted through http to a third party application using GET or POST method. * Mandatory if dlr\n"},{"key":"content","value":"Welcome to D7 sms , we will help you to talk with your customer effectively","description":"*Content to be sent"}]}},"status":"OK","code":200,"_postman_previewlanguage":"plain","header":[{"key":"Server","value":"nginx/1.10.3"},{"key":"Date","value":"Mon, 16 Mar 2020 12:52:17 GMT"},{"key":"Content-Type","value":"text/plain"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"Success \"5f778eaa-3b10-4a5c-bada-6dc1285daf43\""}],"_postman_id":"4bf5c6fd-fc49-4dfc-8d2e-e4fff6ad8487"},{"name":"D7 Balance API","id":"72229139-501c-44e0-b12c-7b90b1725ab6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://http-api.d7networks.com/balance?username=foo&password=bar","description":"<p>In order to check user account balance of D7 user.User can access using HTTP GET/POST</p>\n","urlObject":{"protocol":"https","path":["balance"],"host":["http-api","d7networks","com"],"query":[{"key":"username","value":"foo"},{"key":"password","value":"bar"}],"variable":[]}},"response":[{"id":"f045be61-fcda-4308-a22f-72079cc3249d","name":"D7 Balance API Success","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://http-api.d7networks.com/balance?username=foo&password=bar","protocol":"https","host":["http-api","d7networks","com"],"path":["balance"],"query":[{"key":"username","value":"foo"},{"key":"password","value":"bar"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"nginx/1.10.3"},{"key":"Date","value":"Mon, 16 Mar 2020 12:57:18 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Content-Length","value":"41"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"{\n    \"balance\": \"20.0000\",\n    \"sms_count\": \"ND\"\n}"}],"_postman_id":"72229139-501c-44e0-b12c-7b90b1725ab6"},{"name":"D7 Rest API Single SMS","id":"8bdf3231-9677-4f8b-b3cd-fcea6eaa135f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"<username>"},{"key":"password","value":"<password>"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"to\":\"971509001XXX\",\n\t\"content\":\"Welcome to D7 sms , we will help you to talk with your customer effectively\",\n\t\"from\":\"SMSINFO\",\n\t\"dlr\":\"yes\",\n\t\"dlr-method\":\"GET\", \n\t\"dlr-level\":\"2\", \n\t\"dlr-url\":\"http://yourcustompostbackurl.com\"\n}"},"url":"https://rest-api.d7networks.com/secure/send","description":"<p>Send a single message to one destination address.</p>\n","urlObject":{"protocol":"https","path":["secure","send"],"host":["rest-api","d7networks","com"],"query":[],"variable":[]}},"response":[{"id":"32b513ab-7af1-4e51-955c-f4be2357870f","name":"D7 Rest API Single SMS Error","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"to\":\"971509001994\",\n\t\"content\":\"Welcome to D7 sms , we will help you to talk with your customer effectively\",\n\t\"dlr\":\"yes\",\n\t\"dlr-method\":\"GET\", \n\t\"dlr-level\":\"2\", \n\t\"dlr-url\":\"http://yourcustompostbackurl.com\"\n}"},"url":"https://rest-api.d7networks.com/secure/send"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"nginx/1.10.3"},{"key":"Date","value":"Mon, 16 Mar 2020 13:03:03 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Content-Length","value":"80"},{"key":"Connection","value":"keep-alive"},{"key":"Powered-By","value":"Jasmin 0.9.25"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Error \\\"Failed running interception script, check log for details\"\n}"},{"id":"ee5e63e4-73d8-4252-920c-6e7e83289c47","name":"D7 Rest API Single SMS Success","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"to\":\"971509001994\",\n\t\"content\":\"Welcome to D7 sms , we will help you to talk with your customer effectively\",\n\t\"from\":\"SMSINFO\",\n\t\"dlr\":\"yes\",\n\t\"dlr-method\":\"GET\", \n\t\"dlr-level\":\"2\", \n\t\"dlr-url\":\"http://yourcustompostbackurl.com\"\n}"},"url":"https://rest-api.d7networks.com/secure/send"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"nginx/1.10.3"},{"key":"Date","value":"Mon, 16 Mar 2020 13:02:22 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Content-Length","value":"58"},{"key":"Connection","value":"keep-alive"},{"key":"Powered-By","value":"Jasmin 0.9.25"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": \"Success \\\"71d9a576-73dd-4df5-9f5d-f60af12016d4\"\n}"}],"_postman_id":"8bdf3231-9677-4f8b-b3cd-fcea6eaa135f"},{"name":"D7 Rest API SendBatch","id":"0c11972f-b119-4c19-8e97-ca9096fe1bd0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"<username>"},{"key":"password","value":"<password>"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"messages\": [\n    {\n      \"to\": [\n\t\t9715090019XX,\n\t\t9715090019XX,\n\t\t9715090019XX\n      ],\n      \"content\":\"Welcome to D7 sms , we will help you to talk with your customer effectively\",\n      \"from\": \"D7sms\"\n    }\n  ]\n}"},"url":"http://rest-api.d7networks.com/secure/sendbatch","description":"<p>Send multiple messages to one or more destination addresses.</p>\n","urlObject":{"protocol":"http","path":["secure","sendbatch"],"host":["rest-api","d7networks","com"],"query":[],"variable":[]}},"response":[{"id":"8c66cb04-bd03-4be8-bba1-24f07ac9448f","name":"D7 Rest API SendBatch Success","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"messages\": [\n    {\n      \"to\": [\n\t\t971509001XXX,\n\t\t971509001XXX,\n\t\t971509001XXX\n      ],\n      \"content\":\"Welcome to D7 sms , we will help you to talk with your customer effectively\",\n      \"from\": \"D7sms\"\n    }\n  ]\n}"},"url":"http://rest-api.d7networks.com/secure/sendbatch"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"nginx/1.10.3"},{"key":"Date","value":"Mon, 16 Mar 2020 13:07:43 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Content-Length","value":"80"},{"key":"Connection","value":"keep-alive"},{"key":"Powered-By","value":"Jasmin 0.9.25"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"batchId\": \"b6aa506c-f363-4e89-b659-94d53ce5f9cb\",\n        \"messageCount\": 3\n    }\n}"}],"_postman_id":"0c11972f-b119-4c19-8e97-ca9096fe1bd0"},{"name":"D7 Rest API SendBatch With Callback","id":"99538666-a408-4c2c-a84b-c93fc3ccc336","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"<username>"},{"key":"password","value":"<password>"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"batch_config\": {\n    \"callback_url\": \"http://127.0.0.1:7877/successful_batch\",\n    \"errback_url\": \"http://127.0.0.1:7877/errored_batch\"\n  },\n  \"messages\": [\n    {\n      \"to\": [\n\t\t\"9715090019XX\",\n\t\t\"9715090019XX\"\n      ],\n      \"content\": \"Welcome to D7 sms , we will help you to talk with your customer effectively\",\n      \"from\": \"D7SMS\",\n      \"dlr-level\": 2,\n      \"dlr-method\": \"GET\",\n\t  \"dlr\": \"yes\",\n\t  \"dlr-url\": \"http://some.fancy/url\"\n      \n    }\n  ]\n}"},"url":"http://rest-api.d7networks.com/secure/sendbatch","description":"<p>Send multiple messages to one or more destination addresses with callback for each destination address to tack the delivery.</p>\n","urlObject":{"protocol":"http","path":["secure","sendbatch"],"host":["rest-api","d7networks","com"],"query":[],"variable":[]}},"response":[{"id":"f0b1e987-9ee5-46ea-b610-e5f8e6fb2a74","name":"D7 Rest API SendBatch With Callback Success","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"batch_config\": {\n    \"callback_url\": \"http://127.0.0.1:7877/successful_batch\",\n    \"errback_url\": \"http://127.0.0.1:7877/errored_batch\"\n  },\n  \"messages\": [\n    {\n      \"to\": [\n\t\t\"971509001XXX\",\n\t\t\"971509001XXX\"\n      ],\n      \"content\": \"Welcome to D7 sms , we will help you to talk with your customer effectively\",\n      \"from\": \"D7SMS\",\n      \"dlr-level\": 2,\n      \"dlr-method\": \"GET\",\n\t  \"dlr\": \"yes\",\n\t  \"dlr-url\": \"http://some.fancy/url\"\n      \n    }\n  ]\n}"},"url":"http://rest-api.d7networks.com/secure/sendbatch"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"nginx/1.10.3"},{"key":"Date","value":"Mon, 16 Mar 2020 13:11:36 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Content-Length","value":"80"},{"key":"Connection","value":"keep-alive"},{"key":"Powered-By","value":"Jasmin 0.9.25"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"batchId\": \"2237aedd-7f43-4f09-b5ad-8a55c36a5b4c\",\n        \"messageCount\": 2\n    }\n}"}],"_postman_id":"99538666-a408-4c2c-a84b-c93fc3ccc336"},{"name":"D7 Soap API","id":"22919147-8991-43b4-873a-6de6d2399944","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"<x:Envelope xmlns:x=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:tns=\"tns\">\n   <x:Header/>\n   <x:Body>\n       <tns:send>\n           <tns:username>foo</tns:username>\n           <tns:password>bar</tns:password>\n           <tns:source_addr>D7SMS</tns:source_addr>\n           <tns:destination_addr>971508031XXX</tns:destination_addr>\n           <tns:coding>8</tns:coding>\n           <tns:dlr>yes</tns:dlr>\n           <tns:dlr_url>http://sms.d7networks.com/dlr_receiver</tns:dlr_url>\n           <tns:dlr_level>2</tns:dlr_level>\n           <tns:dlr_method>GET</tns:dlr_method>\n           <tns:content>Welcome to D7 sms , we will help you to talk with your customer effectively </tns:content>\n       </tns:send>\n   </x:Body>\n</x:Envelope>"},"url":"http://smsc.d7networks.com:4545/jasmin/api?wsdl","description":"<p>Send SMS using SOAP Interface.</p>\n","urlObject":{"protocol":"http","port":"4545","path":["jasmin","api"],"host":["smsc","d7networks","com"],"query":[{"key":"wsdl","value":null}],"variable":[]}},"response":[{"id":"d9dd709f-2235-4a4b-acc4-47303e06f706","name":"D7 Soap API Sucess","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"<x:Envelope xmlns:x=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:tns=\"tns\">\n   <x:Header/>\n   <x:Body>\n       <tns:send>\n           <tns:username>foo</tns:username>\n           <tns:password>bar</tns:password>\n           <tns:source_addr>D7SMS</tns:source_addr>\n           <tns:destination_addr>971508031705</tns:destination_addr>\n           <tns:coding>8</tns:coding>\n           <tns:dlr>yes</tns:dlr>\n           <tns:dlr_url>http://sms.d7networks.com/dlr_receiver</tns:dlr_url>\n           <tns:dlr_level>2</tns:dlr_level>\n           <tns:dlr_method>GET</tns:dlr_method>\n           <tns:content>Welcome to D7 sms , we will help you to talk with your customer effectively </tns:content>\n       </tns:send>\n   </x:Body>\n</x:Envelope>"},"url":{"raw":"http://smsc.d7networks.com:4545/jasmin/api?wsdl","protocol":"http","host":["smsc","d7networks","com"],"port":"4545","path":["jasmin","api"],"query":[{"key":"wsdl","value":null}]}},"status":"OK","code":200,"_postman_previewlanguage":"xml","header":[{"key":"Content-Length","value":"305"},{"key":"Content-Type","value":"text/xml; charset=utf-8"},{"key":"Server","value":"Werkzeug/0.14.1 Python/2.7.13"},{"key":"Date","value":"Mon, 16 Mar 2020 13:16:14 GMT"}],"cookie":[],"responseTime":null,"body":"<?xml version='1.0' encoding='UTF-8'?>\n<soap11env:Envelope xmlns:soap11env=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:tns=\"tns\">\n    <soap11env:Body>\n        <tns:sendResponse>\n            <tns:sendResult>Success \"4fab9829-25c5-417c-b9f3-72b1fbbcf93b\"</tns:sendResult>\n        </tns:sendResponse>\n    </soap11env:Body>\n</soap11env:Envelope>"}],"_postman_id":"22919147-8991-43b4-873a-6de6d2399944"}],"event":[{"listen":"prerequest","script":{"id":"d34481b0-9f3f-4bae-8f45-6caff6147863","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"e5a2b398-3708-4217-8a44-c3bb26a46cb3","type":"text/javascript","exec":[""]}}]}