{"__v":1,"_id":"565490a05ffae70d0078e4bb","category":{"__v":8,"_id":"56669e857cc81e0d00253f8e","pages":["568ceacb8a7ca5190039643a","5693a7995f1c951900644b25","5698e793d36db20d00ddba45","56a0ce7441766e0d00b28cf8","56a0d36544f3d80d00a2c242","56a0d3e0aca0730d003e3475","56a5ecf7b91d8d0d008349cc","56d595dba0b5600b000b1e75"],"project":"54eb50e5615ffc1900305a16","version":"54eb63b859b1172100334fae","sync":{"url":"","isSync":false},"reference":true,"createdAt":"2015-12-08T09:10:29.254Z","from_sync":false,"order":4,"slug":"omni-channel-messaging","title":"OMNI channel messaging"},"editedParams":true,"editedParams2":true,"parentDoc":null,"project":"54eb50e5615ffc1900305a16","user":"54eb4fdedf7add210007b29b","version":{"__v":18,"_id":"54eb63b859b1172100334fae","forked_from":"54eb63a1867e1917009b711d","project":"54eb50e5615ffc1900305a16","createdAt":"2015-02-23T17:30:32.501Z","releaseDate":"2015-02-23T17:30:32.501Z","categories":["54eb63b959b1172100334faf","54eb63b959b1172100334fb0","54eb63b959b1172100334fb1","54eb63b959b1172100334fb2","54ed8dd4ab373e2300f50eae","54ed99b2ab373e2300f50ede","55153a6de68daa2f00cff838","551546edbc466623002afe72","5515472ac28d6125001b8884","55154749c28d6125001b8885","555d9b4106dfec0d00d38ea7","5613e06e433e5735007c7708","5624bbb785a31117001c5403","56669e857cc81e0d00253f8e","568b8d837a42220d00498311","56a632277ef6620d00e2f18a","56d8147c3eb4dd0b00201aac","57a9ce2fac6db30e000d7efd","57a9cf4e944ea60e00dc3f74","58172386715dce0f00da4aa0","582dc59ee1b8692300c0dd03"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-11-24T16:30:24.366Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[{"name":"","code":"GET /omni/1/logs HTTP/1.1\nHost: api.infobip.com\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\nAccept: application/json","language":"json"}]},"results":{"codes":[{"status":200,"language":"json","code":"{  \n   \"results\":[  \n      {  \n         \"bulkId\":\"06479ba3-5977-47f6-9346-fee0369bc76b\",\n         \"messageId\":\"1f21d8d7-f306-4f53-9f6e-eddfce9849ea\",\n         \"to\":\"41793026727\",\n         \"from\":\"1234\",\n         \"text\":\"Test SMS.\",\n         \"sentAt\":\"2015-02-23T17:40:31.773+0100\",\n         \"doneAt\":\"2015-02-23T17:40:31.787+0100\",\n         \"messageCount\": 1,\n         \"price\":{  \n            \"pricePerMessage\":0.01,\n            \"currency\":\"EUR\"\n         },\n         \"status\":{  \n            \"groupId\":3,\n            \"groupName\":\"DELIVERED\",\n            \"id\":5,\n            \"name\":\"DELIVERED_TO_HANDSET\",\n            \"description\":\"Message delivered to handset\"\n         },\n         \"channel\": \"SMS\",\n      }\n   ]\n}","name":""}]},"settings":"","auth":"required","params":[{"_id":"55191994337285170047f83f","ref":"","in":"query","required":false,"desc":"Sender that can be alphanumeric or numeric.","default":"","type":"string","name":"from"},{"_id":"55191d11337285170047f854","ref":"","in":"query","required":false,"desc":"The message destination address.","default":"","type":"string","name":"to"},{"_id":"55191d11337285170047f853","ref":"","in":"query","required":false,"desc":"The ID that uniquely identifies the request. Bulk ID will be received only when you send a message to [more than one destination address](http://dev.infobip.com/v1/docs/send-single-sms#section-single-textual-message-to-one-destination).","default":"","type":"string","name":"bulkId"},{"_id":"55191d11337285170047f852","ref":"","in":"query","required":false,"desc":"The ID that uniquely identifies the message sent.","default":"","type":"string","name":"messageId"},{"_id":"55191d11337285170047f851","ref":"","in":"query","required":false,"desc":"Sent message [status group](http://dev.infobip.com/v1/docs/response-codes#section-statuses-groups). Indicates whether the message is successfully sent, not sent, delivered, not delivered, waiting for delivery or any other possible status.","default":"","type":"string","name":"generalStatus"},{"_id":"55191d11337285170047f850","ref":"","in":"query","required":false,"desc":"Lower limit on date and time of sending messages.","default":"","type":"datetime","name":"sentSince"},{"_id":"55191d11337285170047f84f","ref":"","in":"query","required":false,"desc":"Upper limit on date and time of sending messages.","default":"","type":"datetime","name":"sentUntil"},{"_id":"55191d11337285170047f84e","ref":"","in":"query","required":false,"desc":"Maximal number of messages in returned logs. Default value is **50**.","default":"","type":"int","name":"limit"},{"_id":"55191d11337285170047f84d","ref":"","in":"query","required":false,"desc":"Mobile country code.","default":"","type":"string","name":"mcc"},{"_id":"55191d11337285170047f84c","ref":"","in":"query","required":false,"desc":"Mobile network code.","default":"","type":"string","name":"mnc"},{"_id":"565490a05ffae70d0078e4bc","ref":"","in":"query","required":false,"desc":"Channel that was used for message delivering. Possible values are: `SMS`, `VOICE`, `PARSECO`, `VIBER`,`PUSH`,`EMAIL`.","default":"","type":"string","name":"channel"}],"url":"/omni/:version/logs"},"isReference":true,"order":7,"body":"[block:callout]\n{\n  \"type\": \"warning\",\n  \"body\": \"**All logs are available for the last 48 hours!**\",\n  \"title\": \"Important:\"\n}\n[/block]\n# Response format\n\nIf successful, the response header HTTP status code will be `200 OK` and the message logs will be returned.\n\nIf you try to send a message without authorization, you will get a response with HTTP status code `401 Unauthorized`.\n\n## OmniLogsResponse\n\n|Parameter|Type|Description|\n|-|-|-|\n|*results*|[OmniLog[]](#section-omnilog)|Collection of logs.|\n\n### OmniLog\n\n|Parameter|Type|Description|\n|-|-|-|\n|*bulkId*|String|The ID that uniquely identifies the request.|\n|*messageId*|String|The ID that uniquely identifies the message sent.|\n|*channel*|String|Channel that was used for message delivering. Possible values are: `SMS`, `PARSECO`, `VIBER`,'EMAIL','PUSH'.|\n|*to*|String|The message destination address.|\n|*from*|String|Sender ID that can be alphanumeric or numeric.|\n|*text*|String|Text of the message that was sent.|\n|*sentAt*|Date|Tells when the message was sent. It has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSSZ`.|\n|*doneAt*|Date|Tells when the message was finished processing by Infobip (ie. delivered to destination, delivered to destination network, etc.)|\n|*messageCount*|int|The number of sent message segments.|\n|*mccmnc*|String|Mobile country and network codes.|\n|*price*|[Price](#section-price)|Sent message price.|\n|*status*|[Status](#section-status)|Indicates whether the message is successfully sent, not sent, delivered, not delivered, waiting for delivery or any other possible status.|\n|*error*|[Error](#section-error)|Indicates whether the error occurred during the query execution.|\n\n#### Price\n\n|Parameter|Type|Description|\n|-|-|-|\n|*pricePerMessage*|BigDecimal|Price per one message.|\n|*currency*|String|The currency in which the price is expressed.|\n\n#### Status\n\n|Parameter|Type|Description|\n|-|-|-|\n|*groupId*|int|Status [group ID](http://dev.infobip.com/v1/docs/response-codes#status-object-example).|\n|*groupName*|String|Status [group name](http://dev.infobip.com/v1/docs/response-codes#status-object-example).|\n|*id*|int|Status [ID](http://dev.infobip.com/v1/docs/response-codes#status-object-example).|\n|*name*|String|Status [name](http://dev.infobip.com/v1/docs/response-codes#status-object-example).|\n|*description*|String|Human readable [description](http://dev.infobip.com/v1/docs/response-codes#status-object-example) of the status.|\n|*action*|String|[Action](http://dev.infobip.com/v1/docs/response-codes#status-object-example) that should be taken to eliminate the error.|\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Additional examples\"\n}\n[/block]\n# Getting logs without any query parameter\n\nThis request will return last 50 message logs from the last 48h by default.\n\n**Request**\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"GET /omni/1/logs HTTP/1.1\\nHost: api.infobip.com\\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\nAccept: application/json\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"GET /omni/1/logs HTTP/1.1\\nHost: api.infobip.com\\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\nAccept: application/xml\",\n      \"language\": \"xml\"\n    },\n    {\n      \"code\": \"curl -X GET \\n-H 'Accept: application/json' \\n-H 'Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ=='\\nhttps://api.infobip.com/omni/1/logs\",\n      \"language\": \"curl\"\n    },\n    {\n      \"code\": \"<?php\\n\\n$curl = curl_init();\\n\\ncurl_setopt_array($curl, array(\\n  CURLOPT_URL => \\\"http://api.infobip.com/omni/1/logs\\\",\\n  CURLOPT_RETURNTRANSFER => true,\\n  CURLOPT_ENCODING => \\\"\\\",\\n  CURLOPT_MAXREDIRS => 10,\\n  CURLOPT_TIMEOUT => 30,\\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\\n  CURLOPT_CUSTOMREQUEST => \\\"GET\\\",\\n  CURLOPT_POSTFIELDS => \\\"\\\",\\n  CURLOPT_HTTPHEADER => array(\\n    \\\"accept: application/json\\\",\\n    \\\"authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\\"\\n  ),\\n));\\n\\n$response = curl_exec($curl);\\n$err = curl_error($curl);\\n\\ncurl_close($curl);\\n\\nif ($err) {\\n  echo \\\"cURL Error #:\\\" . $err;\\n} else {\\n  echo $response;\\n}\",\n      \"language\": \"php\"\n    },\n    {\n      \"code\": \"require 'uri'\\nrequire 'net/http'\\n\\nurl = URI(\\\"https://api.infobip.com/omni/1/logs\\\")\\n\\nhttp = Net::HTTP.new(url.host, url.port)\\nhttp.use_ssl = true\\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\\n\\nrequest = Net::HTTP::Get.new(url)\\nrequest[\\\"authorization\\\"] = 'Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ=='\\nrequest[\\\"accept\\\"] = 'application/json'\\n\\nresponse = http.request(request)\\nputs response.read_body\",\n      \"language\": \"ruby\"\n    },\n    {\n      \"code\": \"import http.client\\n\\nconn = http.client.HTTPSConnection(\\\"api.infobip.com\\\")\\n\\nheaders = {\\n    'authorization': \\\"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\\",\\n    'accept': \\\"application/json\\\"\\n    }\\n\\nconn.request(\\\"GET\\\", \\\"/omni/1/logs\\\", headers=headers)\\n\\nres = conn.getresponse()\\ndata = res.read()\\n\\nprint(data.decode(\\\"utf-8\\\"))\",\n      \"language\": \"python\"\n    },\n    {\n      \"code\": \"HttpResponse<String> response = Unirest.get(\\\"https://api.infobip.com/omni/1/logs\\\")\\n  .header(\\\"authorization\\\", \\\"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\\")\\n  .header(\\\"accept\\\", \\\"application/json\\\")\\n  .asString();\",\n      \"language\": \"java\"\n    },\n    {\n      \"code\": \"var client = new RestClient(\\\"https://api.infobip.com/omni/1/logs\\\");\\n\\nvar request = new RestRequest(Method.GET);\\nrequest.AddHeader(\\\"accept\\\", \\\"application/json\\\");\\nrequest.AddHeader(\\\"authorization\\\", \\\"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\\");\\n\\nIRestResponse response = client.Execute(request);\",\n      \"language\": \"csharp\"\n    },\n    {\n      \"code\": \"var data = null;\\n\\nvar xhr = new XMLHttpRequest();\\nxhr.withCredentials = true;\\n\\nxhr.addEventListener(\\\"readystatechange\\\", function () {\\n  if (this.readyState === this.DONE) {\\n    console.log(this.responseText);\\n  }\\n});\\n\\nxhr.open(\\\"GET\\\", \\\"https://api.infobip.com/omni/1/logs\\\");\\nxhr.setRequestHeader(\\\"authorization\\\", \\\"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\\");\\nxhr.setRequestHeader(\\\"accept\\\", \\\"application/json\\\");\\n\\nxhr.send(data);\",\n      \"language\": \"javascript\"\n    }\n  ]\n}\n[/block]\n**Response**\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"HTTP/1.1 200 OK\\nContent-Type: application/json\\n\\n{  \\n   \\\"results\\\":[  \\n      {  \\n         \\\"bulkId\\\":\\\"bafdeb3d-719b-4cce-8762-54d47b40f3c5\\\",\\n         \\\"messageId\\\":\\\"07e03aae-fabc-44ad-b1ce-222e14094d70\\\",\\n         \\n         \\\"to\\\":\\\"41793026727\\\",\\n         \\\"from\\\":\\\"InfoSMS\\\",\\n         \\\"text\\\":\\\"Test SMS.\\\",\\n         \\\"messageCount\\\": 1,\\n         \\\"sentAt\\\":\\\"2015-02-23T17:41:11.833+0100\\\",\\n         \\\"doneAt\\\":\\\"2015-02-23T17:41:11.843+0100\\\",\\n         \\\"mccmnc\\\":\\\"22801\\\",\\n         \\\"price\\\":{  \\n            \\\"pricePerMessage\\\":0.01,\\n            \\\"currency\\\":\\\"EUR\\\"\\n         },\\n         \\\"status\\\":{  \\n            \\\"groupId\\\":3,\\n            \\\"groupName\\\":\\\"DELIVERED\\\",\\n            \\\"id\\\":5,\\n            \\\"name\\\":\\\"DELIVERED_TO_HANDSET\\\",\\n            \\\"description\\\":\\\"Message delivered to handset\\\"\\n         },\\n         \\\"channel\\\": \\\"SMS\\\",\\n      },\\n      {  \\n         \\\"bulkId\\\":\\\"06479ba3-5977-47f6-9346-fee0369bc76b\\\",\\n         \\\"messageId\\\":\\\"1f21d8d7-f306-4f53-9f6e-eddfce9849ea\\\",\\n         \\\"to\\\":\\\"41793026727\\\",\\n         \\\"from\\\":\\\"Demo PUSH Application\\\",\\n         \\\"text\\\":\\\"Test PUSH message.\\\",\\n         \\\"sentAt\\\":\\\"2015-02-23T17:40:31.773+0100\\\",\\n         \\\"doneAt\\\":\\\"2015-02-23T17:40:31.787+0100\\\",\\n         \\\"messageCount\\\":1,\\n         \\\"mccmnc\\\":\\\"22801\\\",\\n         \\\"price\\\":{  \\n            \\\"pricePerMessage\\\":0,\\n            \\\"currency\\\":\\\"EUR\\\"\\n         },\\n         \\\"status\\\":{  \\n            \\\"groupId\\\":3,\\n            \\\"groupName\\\":\\\"DELIVERED\\\",\\n            \\\"id\\\":5,\\n            \\\"name\\\":\\\"DELIVERED_TO_HANDSET\\\",\\n            \\\"description\\\":\\\"Message delivered to handset\\\"\\n         },\\n        \\\"channel\\\": \\\"PUSH\\\",\\n      }\\n   ]\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"HTTP/1.1 200 OK\\nContent-Type: application/xml\\n\\n<smsLogsResponse>\\n    <results>\\n    \\t<result>\\n            <bulkId>7944c32d-bf77-4f41-a752-c3aa89027adc</bulkId>\\n            <messageId>f97d3b99-fab2-468e-8acf-c8c8792b8ce6</messageId>\\n        \\t\\t<channel>SMS</channel>\\n            <to>41793026727</to>\\n            <from>InfoSMS</from>\\n            <text>Test SMS.</text>\\n            <sentAt>2015-02-23T17:41:18.020+0100</sentAt>\\n            <doneAt>2015-02-23T17:41:18.027+0100</doneAt>\\n            <messageCount>1</messageCount>\\n            <mccmnc>22801</mccmnc>\\n            <price>\\n                <pricePerMessage>0.0100</pricePerMessage>\\n                <currency>EUR</currency>\\n            </price>\\n            <status>\\n                <groupId>3</groupId>\\n                <groupName>DELIVERED</groupName>\\n                <id>5</id>\\n                <name>DELIVERED_TO_HANDSET</name>\\n                <description>Message delivered to handset</description>\\n            </status>\\n        </result>\\n        <result>\\n            <bulkId>bafdeb3d-719b-4cce-8762-54d47b40f3c5</bulkId>\\n            <messageId>07e03aae-fabc-44ad-b1ce-222e14094d70</messageId>\\n          \\t<channel>PUSH</channel>\\n            <to>41793026727</to>\\n            <from>Demo PUSH Application</from>\\n            <text>Test PUSH message.</text>\\n            <sentAt>2015-02-23T17:41:11.833+0100</sentAt>\\n            <doneAt>2015-02-23T17:41:11.843+0100</doneAt>\\n            <messageCount>1</messageCount>\\n            <mccmnc>22801</mccmnc>\\n            <price>\\n                <pricePerMessage>0</pricePerMessage>\\n                <currency>EUR</currency>\\n            </price>\\n            <status>\\n                <groupId>3</groupId>\\n                <groupName>DELIVERED</groupName>\\n                <id>5</id>\\n                <name>DELIVERED_TO_HANDSET</name>\\n                <description>Message delivered to handset</description>\\n            </status>\\n        </result>\\n    </results>\\n</smsLogsResponse>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n# Getting logs with `from`, `to` and `limit` as filters\n\nThis request will filter last messages by rule - of all messages sent from `from`, return last `limit` messages with destinations `to`.\n\n**Request**\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"GET /omni/1/logs?from=DemoViberApp&to=41793026727&limit=1 HTTP/1.1\\nHost: api.infobip.com\\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\nAccept: application/json\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"POST /omni/1/logs?from=DemoViberApp&to=41793026727&limit=1 HTTP/1.1\\nHost: api.infobip.com\\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\nAccept: application/xml\",\n      \"language\": \"xml\"\n    },\n    {\n      \"code\": \"curl -X GET \\\\\\n-H 'Accept: application/json' \\\\\\n-H 'Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==' \\\\\\nhttps://api.infobip.com/omni/1/logs?from=DemoViberApp&to=41793026727&limit=1\",\n      \"language\": \"curl\"\n    },\n    {\n      \"code\": \"<?php\\n\\n$curl = curl_init();\\n\\ncurl_setopt_array($curl, array(\\n  CURLOPT_URL => \\\"http://api.infobip.com/omni/1/logs?from=DemoViberApp&to=41793026727&limit=1\\\",\\n  CURLOPT_RETURNTRANSFER => true,\\n  CURLOPT_ENCODING => \\\"\\\",\\n  CURLOPT_MAXREDIRS => 10,\\n  CURLOPT_TIMEOUT => 30,\\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\\n  CURLOPT_CUSTOMREQUEST => \\\"GET\\\",\\n  CURLOPT_POSTFIELDS => \\\"\\\",\\n  CURLOPT_HTTPHEADER => array(\\n    \\\"accept: application/json\\\",\\n    \\\"authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\\"\\n  ),\\n));\\n\\n$response = curl_exec($curl);\\n$err = curl_error($curl);\\n\\ncurl_close($curl);\\n\\nif ($err) {\\n  echo \\\"cURL Error #:\\\" . $err;\\n} else {\\n  echo $response;\\n}\",\n      \"language\": \"php\"\n    },\n    {\n      \"code\": \"require 'uri'\\nrequire 'net/http'\\n\\nurl = URI(\\\"https://api.infobip.com/omni/1/logs?from=DemoViberApp&to=41793026727&limit=1\\\")\\n\\nhttp = Net::HTTP.new(url.host, url.port)\\nhttp.use_ssl = true\\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\\n\\nrequest = Net::HTTP::Get.new(url)\\nrequest[\\\"authorization\\\"] = 'Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ=='\\nrequest[\\\"accept\\\"] = 'application/json'\\n\\nresponse = http.request(request)\\nputs response.read_body\",\n      \"language\": \"ruby\"\n    },\n    {\n      \"code\": \"import http.client\\n\\nconn = http.client.HTTPSConnection(\\\"api.infobip.com\\\")\\n\\nheaders = {\\n    'authorization': \\\"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\\",\\n    'accept': \\\"application/json\\\"\\n    }\\n\\nconn.request(\\\"GET\\\", \\\"/omni/1/logs?from=DemoViberApp&to=41793026727&limit=1\\\", headers=headers)\\n\\nres = conn.getresponse()\\ndata = res.read()\\n\\nprint(data.decode(\\\"utf-8\\\"))\",\n      \"language\": \"python\"\n    },\n    {\n      \"code\": \"HttpResponse<String> response = Unirest.get(\\\"https://api.infobip.com/omni/1/logs?from=DemoViberApp&to=41793026727&limit=1\\\")\\n  .header(\\\"authorization\\\", \\\"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\\")\\n  .header(\\\"accept\\\", \\\"application/json\\\")\\n  .asString();\",\n      \"language\": \"java\"\n    },\n    {\n      \"code\": \"var client = new RestClient(\\\"https://api.infobip.com/omni/1/logs?from=DemoViberApp&to=41793026727&limit=1\\\");\\n\\nvar request = new RestRequest(Method.GET);\\nrequest.AddHeader(\\\"accept\\\", \\\"application/json\\\");\\nrequest.AddHeader(\\\"authorization\\\", \\\"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\\");\\n\\nIRestResponse response = client.Execute(request);\",\n      \"language\": \"csharp\"\n    },\n    {\n      \"code\": \"var data = null;\\n\\nvar xhr = new XMLHttpRequest();\\nxhr.withCredentials = true;\\n\\nxhr.addEventListener(\\\"readystatechange\\\", function () {\\n  if (this.readyState === this.DONE) {\\n    console.log(this.responseText);\\n  }\\n});\\n\\nxhr.open(\\\"GET\\\", \\\"https://api.infobip.com/omni/1/logs?from=DemoViberApp&to=41793026727&limit=1\\\");\\nxhr.setRequestHeader(\\\"authorization\\\", \\\"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\\");\\nxhr.setRequestHeader(\\\"accept\\\", \\\"application/json\\\");\\n\\nxhr.send(data);\",\n      \"language\": \"javascript\"\n    }\n  ]\n}\n[/block]\n**Response**\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"HTTP/1.1 200 OK\\nContent-Type: application/json\\n\\n{  \\n   \\\"results\\\":[  \\n      {  \\n         \\\"bulkId\\\":\\\"82d1d36e-e4fb-4194-8b93-caeb053bd327\\\",\\n         \\\"messageId\\\":\\\"fc0cbfb8-7a72-40da-a76d-e2c2d9400835\\\",\\n         \\\"to\\\":\\\"41793026727\\\",\\n         \\\"from\\\":\\\"DemoViberApp\\\",\\n         \\\"text\\\":\\\"Test Viber message.\\\",\\n         \\\"sentAt\\\":\\\"2015-02-23T17:42:05.390+0100\\\",\\n         \\\"doneAt\\\":\\\"2015-02-23T17:42:05.390+0100\\\",\\n         \\\"messageCount\\\":1,\\n         \\\"mccmnc\\\":\\\"22801\\\",\\n         \\\"price\\\":{  \\n            \\\"pricePerMessage\\\":0.0104,\\n            \\\"currency\\\":\\\"EUR\\\"\\n         },\\n         \\\"status\\\":{  \\n            \\\"groupId\\\":3,\\n            \\\"groupName\\\":\\\"DELIVERED\\\",\\n            \\\"id\\\":5,\\n            \\\"name\\\":\\\"DELIVERED_TO_HANDSET\\\",\\n            \\\"description\\\":\\\"Message delivered to handset\\\"\\n         },\\n         \\\"channel\\\": \\\"VIBER\\\",\\n      }\\n   ]\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"HTTP/1.1 200 OK\\nContent-Type: application/xml\\n\\n<smsLogsResponse>\\n   <results>\\n      <result>\\n         <bulkId>82d1d36e-e4fb-4194-8b93-caeb053bd327</bulkId>\\n         <messageId>fc0cbfb8-7a72-40da-a76d-e2c2d9400835</messageId>\\n         <channel>VIBER</channel>\\n         <to>41793026727</to>\\n         <from>DemoViberApp</from>\\n         <text>Test Viber message.</text>\\n         <sentAt>2015-02-23T17:42:05.390+0100</sentAt>\\n         <doneAt>2015-02-23T17:42:05.390+0100</doneAt>\\n         <messageCount>1</messageCount>\\n         <mccmnc>22801</mccmnc>\\n         <price>\\n            <pricePerMessage>0.0104</pricePerMessage>\\n            <currency>EUR</currency>\\n         </price>\\n         <status>\\n            <groupId>3</groupId>\\n            <groupName>DELIVERED</groupName>\\n            <id>6</id>\\n            <name>DELIVERED_TO_HANDSET</name>\\n            <description>Message delivered to handset</description>\\n         </status>\\n        </result>\\n   </results>\\n</smsLogsResponse>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n# Getting logs with multiple `bulkIds` as filters\n\nThis request will return messages that have `bulkId` among the specified `bulkIds` in a filter.\n\n**Request**\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"GET /omni/1/logs?bulkId=1dece649-6c8f-404e-8c6e-c7e073be509a,bafdeb3d-719b-4cce-8762-54d47b40f3c5 HTTP/1.1\\nHost: api.infobip.com\\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\nAccept: application/json\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"POST /omni/1/logs?bulkId=1dece649-6c8f-404e-8c6e-c7e073be509a,bafdeb3d-719b-4cce-8762-54d47b40f3c5 HTTP/1.1\\nHost: api.infobip.com\\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\nAccept: application/xml\",\n      \"language\": \"xml\"\n    },\n    {\n      \"code\": \"curl -X GET \\n-H 'Accept: application/json' \\n-H 'Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==' \\nhttps://api.infobip.com/omni/1/logs?bulkId=1dece649-6c8f-404e-8c6e-c7e073be509a,bafdeb3d-719b-4cce-8762-54d47b40f3c5\",\n      \"language\": \"curl\"\n    },\n    {\n      \"code\": \"<?php\\n\\n$curl = curl_init();\\n\\ncurl_setopt_array($curl, array(\\n  CURLOPT_URL => \\\"http://api.infobip.com/omni/1/logs?bulkId=1dece649-6c8f-404e-8c6e-c7e073be509a%2Cbafdeb3d-719b-4cce-8762-54d47b40f3c5\\\",\\n  CURLOPT_RETURNTRANSFER => true,\\n  CURLOPT_ENCODING => \\\"\\\",\\n  CURLOPT_MAXREDIRS => 10,\\n  CURLOPT_TIMEOUT => 30,\\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\\n  CURLOPT_CUSTOMREQUEST => \\\"GET\\\",\\n  CURLOPT_POSTFIELDS => \\\"\\\",\\n  CURLOPT_HTTPHEADER => array(\\n    \\\"accept: application/json\\\",\\n    \\\"authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\\"\\n  ),\\n));\\n\\n$response = curl_exec($curl);\\n$err = curl_error($curl);\\n\\ncurl_close($curl);\\n\\nif ($err) {\\n  echo \\\"cURL Error #:\\\" . $err;\\n} else {\\n  echo $response;\\n}\",\n      \"language\": \"php\"\n    },\n    {\n      \"code\": \"require 'uri'\\nrequire 'net/http'\\n\\nurl = URI(\\\"https://api.infobip.com/omni/1/logs?bulkId=1dece649-6c8f-404e-8c6e-c7e073be509a%2Cbafdeb3d-719b-4cce-8762-54d47b40f3c5\\\")\\n\\nhttp = Net::HTTP.new(url.host, url.port)\\nhttp.use_ssl = true\\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\\n\\nrequest = Net::HTTP::Get.new(url)\\nrequest[\\\"authorization\\\"] = 'Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ=='\\nrequest[\\\"accept\\\"] = 'application/json'\\n\\nresponse = http.request(request)\\nputs response.read_body\",\n      \"language\": \"ruby\"\n    },\n    {\n      \"code\": \"import http.client\\n\\nconn = http.client.HTTPSConnection(\\\"api.infobip.com\\\")\\n\\nheaders = {\\n    'authorization': \\\"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\\",\\n    'accept': \\\"application/json\\\"\\n    }\\n\\nconn.request(\\\"GET\\\", \\\"/omni/1/logs?bulkId=1dece649-6c8f-404e-8c6e-c7e073be509a%2Cbafdeb3d-719b-4cce-8762-54d47b40f3c5\\\", headers=headers)\\n\\nres = conn.getresponse()\\ndata = res.read()\\n\\nprint(data.decode(\\\"utf-8\\\"))\",\n      \"language\": \"python\"\n    },\n    {\n      \"code\": \"HttpResponse<String> response = Unirest.get(\\\"https://api.infobip.com/omni/1/logs?bulkId=1dece649-6c8f-404e-8c6e-c7e073be509a%2Cbafdeb3d-719b-4cce-8762-54d47b40f3c5\\\")\\n  .header(\\\"authorization\\\", \\\"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\\")\\n  .header(\\\"accept\\\", \\\"application/json\\\")\\n  .asString();\",\n      \"language\": \"java\"\n    },\n    {\n      \"code\": \"var client = new RestClient(\\\"https://api.infobip.com/omni/1/logs?bulkId=1dece649-6c8f-404e-8c6e-c7e073be509a%2Cbafdeb3d-719b-4cce-8762-54d47b40f3c5\\\");\\n\\nvar request = new RestRequest(Method.GET);\\nrequest.AddHeader(\\\"accept\\\", \\\"application/json\\\");\\nrequest.AddHeader(\\\"authorization\\\", \\\"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\\");\\n\\nIRestResponse response = client.Execute(request);\",\n      \"language\": \"csharp\"\n    },\n    {\n      \"code\": \"var data = null;\\n\\nvar xhr = new XMLHttpRequest();\\nxhr.withCredentials = true;\\n\\nxhr.addEventListener(\\\"readystatechange\\\", function () {\\n  if (this.readyState === this.DONE) {\\n    console.log(this.responseText);\\n  }\\n});\\n\\nxhr.open(\\\"GET\\\", \\\"https://api.infobip.com/omni/1/logs?bulkId=1dece649-6c8f-404e-8c6e-c7e073be509a%2Cbafdeb3d-719b-4cce-8762-54d47b40f3c5\\\");\\nxhr.setRequestHeader(\\\"authorization\\\", \\\"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\\");\\nxhr.setRequestHeader(\\\"accept\\\", \\\"application/json\\\");\\n\\nxhr.send(data);\",\n      \"language\": \"javascript\"\n    }\n  ]\n}\n[/block]\n**Response**\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"HTTP/1.1 200 OK\\nContent-Type: application/json\\n\\n{  \\n   \\\"results\\\":[  \\n      {  \\n         \\\"bulkId\\\":\\\"bafdeb3d-719b-4cce-8762-54d47b40f3c5\\\",\\n         \\\"messageId\\\":\\\"07e03aae-fabc-44ad-b1ce-222e14094d70\\\",\\n         \\\"to\\\":\\\"41793026727\\\",\\n         \\\"from\\\":\\\"InfoSMS\\\",\\n         \\\"text\\\":\\\"Test SMS.\\\",\\n         \\\"sentAt\\\":\\\"2015-02-23T17:41:11.833+0100\\\",\\n         \\\"doneAt\\\":\\\"2015-02-23T17:41:11.843+0100\\\",\\n         \\\"messageCount\\\":1,\\n         \\\"mccmnc\\\":\\\"22801\\\",\\n         \\\"price\\\":{  \\n            \\\"pricePerMessage\\\":0.01,\\n            \\\"currency\\\":\\\"EUR\\\"\\n         },\\n         \\\"status\\\":{  \\n            \\\"groupId\\\":3,\\n            \\\"groupName\\\":\\\"DELIVERED\\\",\\n            \\\"id\\\":5,\\n            \\\"name\\\":\\\"DELIVERED_TO_HANDSET\\\",\\n            \\\"description\\\":\\\"Message delivered to handset\\\"\\n         },\\n         \\\"channel\\\": \\\"SMS\\\",\\n      },\\n      {  \\n         \\\"bulkId\\\":\\\"1dece649-6c8f-404e-8c6e-c7e073be509a\\\",\\n         \\\"messageId\\\":\\\"faa48fe6-fe2c-4f36-a43b-a070e2906ecb\\\",\\n         \\\"to\\\":\\\"41793026727\\\",\\n         \\\"from\\\":\\\"41793026726\\\",\\n         \\\"text\\\":\\\"Test Voice Message.\\\",\\n         \\\"sentAt\\\":\\\"2015-02-23T16:22:37.413+0100\\\",\\n         \\\"doneAt\\\":\\\"2015-02-23T16:22:37.437+0100\\\",\\n         \\\"messageCount\\\":1,\\n         \\\"mccmnc\\\":\\\"22801\\\",\\n         \\\"price\\\":{  \\n            \\\"pricePerMessage\\\":0,\\n            \\\"currency\\\":\\\"EUR\\\"\\n         },\\n         \\\"status\\\":{  \\n            \\\"groupId\\\":2,\\n            \\\"groupName\\\":\\\"UNDELIVERABLE\\\",\\n            \\\"id\\\":9,\\n            \\\"name\\\":\\\"UNDELIVERABLE_NOT_DELIVERED\\\",\\n            \\\"description\\\":\\\"Message sent not delivered\\\"\\n         },\\n        \\\"channel\\\": \\\"VOICE\\\",\\n      }\\n   ]\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"HTTP/1.1 200 OK\\nContent-Type: application/xml\\n\\n<smsLogsResponse>\\n   <results>\\n      <result>\\n         <bulkId>bafdeb3d-719b-4cce-8762-54d47b40f3c5</bulkId>\\n         <messageId>07e03aae-fabc-44ad-b1ce-222e14094d70</messageId>\\n         <channel>SMS</channel>\\n         <to>41793026727</to>\\n         <from>InfoSMS</from>\\n         <text>Test SMS.</text>\\n         <sentAt>2015-02-23T17:41:11.833+0100</sentAt>\\n         <doneAt>2015-02-23T17:41:11.843+0100</doneAt>\\n         <messageCount>1</messageCount>\\n         <mccmnc>22801</mccmnc>\\n         <price>\\n            <pricePerMessage>0.0100</pricePerMessage>\\n            <currency>EUR</currency>\\n         </price>\\n         <status>\\n            <groupId>3</groupId>\\n            <groupName>DELIVERED</groupName>\\n            <id>5</id>\\n            <name>DELIVERED_TO_HANDSET</name>\\n            <description>Message delivered to handset</description>\\n         </status>\\n      </result>\\n      <result>\\n         <bulkId>1dece649-6c8f-404e-8c6e-c7e073be509a</bulkId>\\n         <messageId>faa48fe6-fe2c-4f36-a43b-a070e2906ecb</messageId>\\n         <channel>VOICE</channel>\\n         <to>41793026727</to>\\n         <from>41793026726</from>\\n         <text>Test Voice message.</text>\\n         <sentAt>2015-02-23T16:22:37.413+0100</sentAt>\\n         <doneAt>2015-02-23T16:22:37.437+0100</doneAt>\\n         <messageCount>1</messageCount>\\n         <mccmnc>22801</mccmnc>\\n         <price>\\n            <pricePerMessage>0.0000</pricePerMessage>\\n            <currency>EUR</currency>\\n         </price>\\n         <status>\\n            <groupId>2</groupId>\\n            <groupName>UNDELIVERABLE</groupName>\\n            <id>9</id>\\n            <name>UNDELIVERABLE_NOT_DELIVERED</name>\\n            <description>Message sent not delivered</description>\\n         </status>\\n      </result>\\n   </results>\\n</smsLogsResponse>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n# Getting logs with `date range` and `general status` as filters\n\nThis request will return messages with a status that matches the `generalStatus` parameter (see [Response codes](http://dev.infobip.com/v1/docs/response-codes#section-statuses-groups)) which were sent between `sentSince` and the current time.\n\n**Request**\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"GET /omni/1/logs?sentSince=2015-02-22T17:42:05.390%2b01:00&generalStatus=DELIVERED HTTP/1.1\\nHost: api.infobip.com\\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\nAccept: application/json\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"POST /omni/1/logs?sentSince=2015-02-22T17:42:05.390%2b01:00&generalStatus=DELIVERED HTTP/1.1\\nHost: api.infobip.com\\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\nAccept: application/xml\",\n      \"language\": \"xml\"\n    },\n    {\n      \"code\": \"curl -X GET \\n-H 'Accept: application/json' \\n-H 'Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==' \\nhttps://api.infobip.com/omni/1/logs?sentSince=2015-02-22T17:42:05.390%2b01:00&generalStatus=DELIVERED\",\n      \"language\": \"curl\"\n    },\n    {\n      \"code\": \"<?php\\n\\n$curl = curl_init();\\n\\ncurl_setopt_array($curl, array(\\n  CURLOPT_URL => \\\"http://api.infobip.com/omni/1/logs?sentSince=2015-02-22T17%3A42%3A05.390%252b01%3A00&generalStatus=DELIVERED\\\",\\n  CURLOPT_RETURNTRANSFER => true,\\n  CURLOPT_ENCODING => \\\"\\\",\\n  CURLOPT_MAXREDIRS => 10,\\n  CURLOPT_TIMEOUT => 30,\\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\\n  CURLOPT_CUSTOMREQUEST => \\\"GET\\\",\\n  CURLOPT_POSTFIELDS => \\\"\\\",\\n  CURLOPT_HTTPHEADER => array(\\n    \\\"accept: application/json\\\",\\n    \\\"authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\\"\\n  ),\\n));\\n\\n$response = curl_exec($curl);\\n$err = curl_error($curl);\\n\\ncurl_close($curl);\\n\\nif ($err) {\\n  echo \\\"cURL Error #:\\\" . $err;\\n} else {\\n  echo $response;\\n}\",\n      \"language\": \"php\"\n    },\n    {\n      \"code\": \"require 'uri'\\nrequire 'net/http'\\n\\nurl = URI(\\\"https://api.infobip.com/omni/1/logs?sentSince=2015-02-22T17%3A42%3A05.390%2B01%3A00&generalStatus=DELIVERED\\\")\\n\\nhttp = Net::HTTP.new(url.host, url.port)\\nhttp.use_ssl = true\\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\\n\\nrequest = Net::HTTP::Get.new(url)\\nrequest[\\\"authorization\\\"] = 'Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ=='\\nrequest[\\\"accept\\\"] = 'application/json'\\n\\nresponse = http.request(request)\\nputs response.read_body\",\n      \"language\": \"ruby\"\n    },\n    {\n      \"code\": \"import http.client\\n\\nconn = http.client.HTTPSConnection(\\\"api.infobip.com\\\")\\n\\nheaders = {\\n    'authorization': \\\"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\\",\\n    'accept': \\\"application/json\\\"\\n    }\\n\\nconn.request(\\\"GET\\\", \\\"/omni/1/logs?sentSince=2015-02-22T17%3A42%3A05.390%2B01%3A00&generalStatus=DELIVERED\\\", headers=headers)\\n\\nres = conn.getresponse()\\ndata = res.read()\\n\\nprint(data.decode(\\\"utf-8\\\"))\",\n      \"language\": \"python\"\n    },\n    {\n      \"code\": \"HttpResponse<String> response = Unirest.get(\\\"https://api.infobip.com/omni/1/logs?sentSince=2015-02-22T17%3A42%3A05.390%2B01%3A00&generalStatus=DELIVERED\\\")\\n  .header(\\\"authorization\\\", \\\"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\\")\\n  .header(\\\"accept\\\", \\\"application/json\\\")\\n  .asString();\",\n      \"language\": \"java\"\n    },\n    {\n      \"code\": \"var client = new RestClient(\\\"https://api.infobip.com/omni/1/logs?sentSince=2015-02-22T17%3A42%3A05.390%2B01%3A00&generalStatus=DELIVERED\\\");\\n\\nvar request = new RestRequest(Method.GET);\\nrequest.AddHeader(\\\"accept\\\", \\\"application/json\\\");\\nrequest.AddHeader(\\\"authorization\\\", \\\"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\\");\\n\\nIRestResponse response = client.Execute(request);\",\n      \"language\": \"csharp\"\n    },\n    {\n      \"code\": \"var data = null;\\n\\nvar xhr = new XMLHttpRequest();\\nxhr.withCredentials = true;\\n\\nxhr.addEventListener(\\\"readystatechange\\\", function () {\\n  if (this.readyState === this.DONE) {\\n    console.log(this.responseText);\\n  }\\n});\\n\\nxhr.open(\\\"GET\\\", \\\"https://api.infobip.com/omni/1/logs?sentSince=2015-02-22T17%3A42%3A05.390%2B01%3A00&generalStatus=DELIVERED\\\");\\nxhr.setRequestHeader(\\\"authorization\\\", \\\"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\\");\\nxhr.setRequestHeader(\\\"accept\\\", \\\"application/json\\\");\\n\\nxhr.send(data);\",\n      \"language\": \"javascript\"\n    }\n  ]\n}\n[/block]\n**Response**\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"HTTP/1.1 200 OK\\nContent-Type: application/json\\n\\n{  \\n   \\\"results\\\":[  \\n      {  \\n         \\\"bulkId\\\":\\\"ce166d0e-bac7-4639-a094-52c406852afd\\\",\\n         \\\"messageId\\\":\\\"fdf71ada-3308-4cd1-9962-31f2b937a1d0\\\",\\n         \\\"to\\\":\\\"41793026727\\\",\\n         \\\"from\\\":\\\"DemoViberApp\\\",\\n         \\\"text\\\":\\\"Test Viber message.\\\",\\n         \\\"sentAt\\\":\\\"2016-02-24T10:34:56.463+0100\\\",\\n         \\\"doneAt\\\":\\\"2016-02-24T10:34:56.480+0100\\\",\\n         \\\"messageCount\\\":1,\\n         \\\"mccmnc\\\":\\\"22801\\\",\\n         \\\"price\\\":{  \\n            \\\"pricePerMessage\\\":0.0104,\\n            \\\"currency\\\":\\\"EUR\\\"\\n         },\\n         \\\"status\\\":{  \\n            \\\"groupId\\\":3,\\n            \\\"groupName\\\":\\\"DELIVERED\\\",\\n            \\\"id\\\":5,\\n            \\\"name\\\":\\\"DELIVERED_TO_HANDSET\\\",\\n            \\\"description\\\":\\\"Message delivered to handset\\\"\\n         },\\n        \\\"channel\\\": \\\"VIBER\\\"\\n      }\\n   ]\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"HTTP/1.1 200 OK\\nContent-Type: application/xml\\n\\n<smsLogsResponse>\\n   <results>\\n      <result>\\n         <bulkId>ce166d0e-bac7-4639-a094-52c406852afd</bulkId>\\n         <messageId>fdf71ada-3308-4cd1-9962-31f2b937a1d0</messageId>\\n         <channel>VIBER</channel>\\n         <to>41793026727</to>\\n         <from>DemoViberApp</from>\\n         <text>Test Viber message.</text>\\n         <sentAt>2015-02-24T10:34:56.463+0100</sentAt>\\n         <doneAt>2015-02-24T10:34:56.480+0100</doneAt>\\n         <smsCount>1</smsCount>\\n         <mccmnc>22801</mccmnc>\\n         <price>\\n            <pricePerMessage>0.0104</pricePerMessage>\\n            <currency>EUR</currency>\\n         </price>\\n         <status>\\n            <groupId>3</groupId>\\n            <groupName>DELIVERED</groupName>\\n            <id>5</id>\\n            <name>DELIVERED_TO_HANDSET</name>\\n            <description>Message delivered to handset</description>\\n         </status>\\n      </result>\\n   </results>\\n</smsLogsResponse>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n# Getting logs with `channel` as filter\n\nThis request will return messages sent over specified omni channel.\n\n**Request**\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"GET /omni/1/logs?channel=PUSH HTTP/1.1\\nHost: api.infobip.com\\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\nAccept: application/json\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"GET /omni/1/logs?channel=PUSH HTTP/1.1\\nHost: api.infobip.com\\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\nAccept: application/xml\",\n      \"language\": \"xml\"\n    },\n    {\n      \"code\": \"curl -X GET \\n-H 'Accept: application/json' \\n-H 'Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==' \\nhttps://api.infobip.com/omni/1/logs?channel=PUSH\",\n      \"language\": \"curl\"\n    },\n    {\n      \"code\": \"<?php\\n\\n$curl = curl_init();\\n\\ncurl_setopt_array($curl, array(\\n  CURLOPT_URL => \\\"http://api.infobip.com/omni/1/logs?channel=PUSH\\\",\\n  CURLOPT_RETURNTRANSFER => true,\\n  CURLOPT_ENCODING => \\\"\\\",\\n  CURLOPT_MAXREDIRS => 10,\\n  CURLOPT_TIMEOUT => 30,\\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\\n  CURLOPT_CUSTOMREQUEST => \\\"GET\\\",\\n  CURLOPT_POSTFIELDS => \\\"\\\",\\n  CURLOPT_HTTPHEADER => array(\\n    \\\"accept: application/json\\\",\\n    \\\"authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\\"\\n  ),\\n));\\n\\n$response = curl_exec($curl);\\n$err = curl_error($curl);\\n\\ncurl_close($curl);\\n\\nif ($err) {\\n  echo \\\"cURL Error #:\\\" . $err;\\n} else {\\n  echo $response;\\n}\",\n      \"language\": \"php\"\n    },\n    {\n      \"code\": \"require 'uri'\\nrequire 'net/http'\\n\\nurl = URI(\\\"https://api.infobip.com/omni/1/logs?channel=PUSH\\\")\\n\\nhttp = Net::HTTP.new(url.host, url.port)\\nhttp.use_ssl = true\\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\\n\\nrequest = Net::HTTP::Get.new(url)\\nrequest[\\\"authorization\\\"] = 'Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ=='\\nrequest[\\\"accept\\\"] = 'application/json'\\n\\nresponse = http.request(request)\\nputs response.read_body\",\n      \"language\": \"ruby\"\n    },\n    {\n      \"code\": \"import http.client\\n\\nconn = http.client.HTTPSConnection(\\\"api.infobip.com\\\")\\n\\nheaders = {\\n    'authorization': \\\"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\\",\\n    'accept': \\\"application/json\\\"\\n    }\\n\\nconn.request(\\\"GET\\\", \\\"/omni/1/logs?channel=PUSH\\\", headers=headers)\\n\\nres = conn.getresponse()\\ndata = res.read()\\n\\nprint(data.decode(\\\"utf-8\\\"))\",\n      \"language\": \"python\"\n    },\n    {\n      \"code\": \"HttpResponse<String> response = Unirest.get(\\\"https://api.infobip.com/omni/1/logs?channel=PUSH\\\")\\n  .header(\\\"authorization\\\", \\\"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\\")\\n  .header(\\\"accept\\\", \\\"application/json\\\")\\n  .asString();\",\n      \"language\": \"java\"\n    },\n    {\n      \"code\": \"var client = new RestClient(\\\"https://api.infobip.com/omni/1/logs?channel=PUSH\\\");\\n\\nvar request = new RestRequest(Method.GET);\\nrequest.AddHeader(\\\"accept\\\", \\\"application/json\\\");\\nrequest.AddHeader(\\\"authorization\\\", \\\"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\\");\\n\\nIRestResponse response = client.Execute(request);\",\n      \"language\": \"csharp\"\n    },\n    {\n      \"code\": \"var data = null;\\n\\nvar xhr = new XMLHttpRequest();\\nxhr.withCredentials = true;\\n\\nxhr.addEventListener(\\\"readystatechange\\\", function () {\\n  if (this.readyState === this.DONE) {\\n    console.log(this.responseText);\\n  }\\n});\\n\\nxhr.open(\\\"GET\\\", \\\"https://api.infobip.com/omni/1/logs?channel=PUSH\\\");\\nxhr.setRequestHeader(\\\"authorization\\\", \\\"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\\");\\nxhr.setRequestHeader(\\\"accept\\\", \\\"application/json\\\");\\n\\nxhr.send(data);\",\n      \"language\": \"javascript\"\n    }\n  ]\n}\n[/block]\n**Response**\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"HTTP/1.1 200 OK\\nContent-Type: application/json\\n\\n{  \\n   \\\"results\\\":[  \\n      {  \\n         \\\"bulkId\\\":\\\"bafdeb3d-719b-4cce-8762-54d47b40f3c5\\\",\\n         \\\"messageId\\\":\\\"07e03aae-fabc-44ad-b1ce-222e14094d70\\\",\\n         \\\"to\\\":\\\"41793026727\\\",\\n         \\\"from\\\":\\\"Demo PUSH application\\\",\\n         \\\"text\\\":\\\"PUSH message nr. 1\\\",\\n         \\\"sentAt\\\":\\\"2015-02-23T17:41:11.833+0100\\\",\\n         \\\"doneAt\\\":\\\"2015-02-23T17:41:11.843+0100\\\",\\n         \\\"messageCount\\\":1,\\n         \\\"mccmnc\\\":\\\"22801\\\",\\n         \\\"price\\\":{  \\n            \\\"pricePerMessage\\\":0,\\n            \\\"currency\\\":\\\"EUR\\\"\\n         },\\n         \\\"status\\\":{  \\n            \\\"groupId\\\":3,\\n            \\\"groupName\\\":\\\"DELIVERED\\\",\\n            \\\"id\\\":5,\\n            \\\"name\\\":\\\"DELIVERED_TO_HANDSET\\\",\\n            \\\"description\\\":\\\"Message delivered to handset\\\"\\n         },\\n        \\\"channel\\\": \\\"PUSH\\\"\\n      },\\n      {  \\n         \\\"bulkId\\\":\\\"1dece649-6c8f-404e-8c6e-c7e073be509a\\\",\\n         \\\"messageId\\\":\\\"faa48fe6-fe2c-4f36-a43b-a070e2906ecb\\\",\\n         \\\"to\\\":\\\"41793026727\\\",\\n         \\\"from\\\":\\\"Demo PUSH application\\\",\\n         \\\"text\\\":\\\"Test message nr. 2\\\",\\n         \\\"sentAt\\\":\\\"2015-02-23T16:22:37.413+0100\\\",\\n         \\\"doneAt\\\":\\\"2015-02-23T16:22:37.437+0100\\\",\\n         \\\"messageCount\\\":1,\\n         \\\"mccmnc\\\":\\\"22801\\\",\\n         \\\"price\\\":{  \\n            \\\"pricePerMessage\\\":0,\\n            \\\"currency\\\":\\\"EUR\\\"\\n         },\\n         \\\"status\\\":{  \\n            \\\"groupId\\\":2,\\n            \\\"groupName\\\":\\\"UNDELIVERABLE\\\",\\n            \\\"id\\\":9,\\n            \\\"name\\\":\\\"UNDELIVERABLE_NOT_DELIVERED\\\",\\n            \\\"description\\\":\\\"Message sent not delivered\\\"\\n         },\\n        \\\"channel\\\": \\\"PUSH\\\"\\n      }\\n   ]\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n<omniLogsResponse>\\n   <results>\\n      <bulkId>bafdeb3d-719b-4cce-8762-54d47b40f3c5</bulkId>\\n      <messageId>07e03aae-fabc-44ad-b1ce-222e14094d70</messageId>\\n      <channel>PUSH</channel>\\n      <to>41793026727</to>\\n      <from>Demo PUSH application</from>\\n      <text>PUSH message nr. 1</text>\\n      <sentAt>2015-02-23T17:41:11.833+0100</sentAt>\\n      <doneAt>2015-02-23T17:41:11.843+0100</doneAt>\\n      <messageCount>1</messageCount>\\n      <mccmnc>22801</mccmnc>\\n      <price>\\n         <pricePerMessage>0</pricePerMessage>\\n         <currency>EUR</currency>\\n      </price>\\n      <status>\\n         <groupId>3</groupId>\\n         <groupName>DELIVERED</groupName>\\n         <id>5</id>\\n         <name>DELIVERED_TO_HANDSET</name>\\n         <description>Message delivered to handset</description>\\n      </status>\\n   </results>\\n   <results>\\n      <bulkId>1dece649-6c8f-404e-8c6e-c7e073be509a</bulkId>\\n      <messageId>faa48fe6-fe2c-4f36-a43b-a070e2906ecb</messageId>\\n      <channel>PUSH</channel>\\n      <to>41793026727</to>\\n      <from>Demo PUSH application</from>\\n      <text>PUSH message nr. 2</text>\\n      <sentAt>2015-02-23T16:22:37.413+0100</sentAt>\\n      <doneAt>2015-02-23T16:22:37.437+0100</doneAt>\\n      <messageCount>1</messageCount>\\n      <mccmnc>22801</mccmnc>\\n      <price>\\n         <pricePerMessage>0</pricePerMessage>\\n         <currency>EUR</currency>\\n      </price>\\n      <status>\\n         <groupId>2</groupId>\\n         <groupName>UNDELIVERABLE</groupName>\\n         <id>9</id>\\n         <name>UNDELIVERABLE_NOT_DELIVERED</name>\\n         <description>Message sent not delivered</description>\\n      </status>\\n   </results>\\n</omniLogsResponse>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]","excerpt":"This method allows you to get logs for sent messages.","slug":"omni-logs","type":"get","title":"OMNI logs"}

getOMNI logs

This method allows you to get logs for sent messages.

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Query Params

from:
string
Sender that can be alphanumeric or numeric.
to:
string
The message destination address.
bulkId:
string
The ID that uniquely identifies the request. Bulk ID will be received only when you send a message to [more than one destination address](http://dev.infobip.com/v1/docs/send-single-sms#section-single-textual-message-to-one-destination).
messageId:
string
The ID that uniquely identifies the message sent.
generalStatus:
string
Sent message [status group](http://dev.infobip.com/v1/docs/response-codes#section-statuses-groups). Indicates whether the message is successfully sent, not sent, delivered, not delivered, waiting for delivery or any other possible status.
sentSince:
datetime
Lower limit on date and time of sending messages.
sentUntil:
datetime
Upper limit on date and time of sending messages.
limit:
integer
Maximal number of messages in returned logs. Default value is **50**.
mcc:
string
Mobile country code.
mnc:
string
Mobile network code.
channel:
string
Channel that was used for message delivering. Possible values are: `SMS`, `VOICE`, `PARSECO`, `VIBER`,`PUSH`,`EMAIL`.

Examples


Result Format


Documentation

[block:callout] { "type": "warning", "body": "**All logs are available for the last 48 hours!**", "title": "Important:" } [/block] # Response format If successful, the response header HTTP status code will be `200 OK` and the message logs will be returned. If you try to send a message without authorization, you will get a response with HTTP status code `401 Unauthorized`. ## OmniLogsResponse |Parameter|Type|Description| |-|-|-| |*results*|[OmniLog[]](#section-omnilog)|Collection of logs.| ### OmniLog |Parameter|Type|Description| |-|-|-| |*bulkId*|String|The ID that uniquely identifies the request.| |*messageId*|String|The ID that uniquely identifies the message sent.| |*channel*|String|Channel that was used for message delivering. Possible values are: `SMS`, `PARSECO`, `VIBER`,'EMAIL','PUSH'.| |*to*|String|The message destination address.| |*from*|String|Sender ID that can be alphanumeric or numeric.| |*text*|String|Text of the message that was sent.| |*sentAt*|Date|Tells when the message was sent. It has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSSZ`.| |*doneAt*|Date|Tells when the message was finished processing by Infobip (ie. delivered to destination, delivered to destination network, etc.)| |*messageCount*|int|The number of sent message segments.| |*mccmnc*|String|Mobile country and network codes.| |*price*|[Price](#section-price)|Sent message price.| |*status*|[Status](#section-status)|Indicates whether the message is successfully sent, not sent, delivered, not delivered, waiting for delivery or any other possible status.| |*error*|[Error](#section-error)|Indicates whether the error occurred during the query execution.| #### Price |Parameter|Type|Description| |-|-|-| |*pricePerMessage*|BigDecimal|Price per one message.| |*currency*|String|The currency in which the price is expressed.| #### Status |Parameter|Type|Description| |-|-|-| |*groupId*|int|Status [group ID](http://dev.infobip.com/v1/docs/response-codes#status-object-example).| |*groupName*|String|Status [group name](http://dev.infobip.com/v1/docs/response-codes#status-object-example).| |*id*|int|Status [ID](http://dev.infobip.com/v1/docs/response-codes#status-object-example).| |*name*|String|Status [name](http://dev.infobip.com/v1/docs/response-codes#status-object-example).| |*description*|String|Human readable [description](http://dev.infobip.com/v1/docs/response-codes#status-object-example) of the status.| |*action*|String|[Action](http://dev.infobip.com/v1/docs/response-codes#status-object-example) that should be taken to eliminate the error.| [block:api-header] { "type": "basic", "title": "Additional examples" } [/block] # Getting logs without any query parameter This request will return last 50 message logs from the last 48h by default. **Request** [block:code] { "codes": [ { "code": "GET /omni/1/logs HTTP/1.1\nHost: api.infobip.com\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\nAccept: application/json", "language": "json" }, { "code": "GET /omni/1/logs HTTP/1.1\nHost: api.infobip.com\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\nAccept: application/xml", "language": "xml" }, { "code": "curl -X GET \n-H 'Accept: application/json' \n-H 'Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ=='\nhttps://api.infobip.com/omni/1/logs", "language": "curl" }, { "code": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, array(\n CURLOPT_URL => \"http://api.infobip.com/omni/1/logs\",\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_ENCODING => \"\",\n CURLOPT_MAXREDIRS => 10,\n CURLOPT_TIMEOUT => 30,\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n CURLOPT_CUSTOMREQUEST => \"GET\",\n CURLOPT_POSTFIELDS => \"\",\n CURLOPT_HTTPHEADER => array(\n \"accept: application/json\",\n \"authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\"\n ),\n));\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n echo \"cURL Error #:\" . $err;\n} else {\n echo $response;\n}", "language": "php" }, { "code": "require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.infobip.com/omni/1/logs\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"authorization\"] = 'Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ=='\nrequest[\"accept\"] = 'application/json'\n\nresponse = http.request(request)\nputs response.read_body", "language": "ruby" }, { "code": "import http.client\n\nconn = http.client.HTTPSConnection(\"api.infobip.com\")\n\nheaders = {\n 'authorization': \"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\",\n 'accept': \"application/json\"\n }\n\nconn.request(\"GET\", \"/omni/1/logs\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))", "language": "python" }, { "code": "HttpResponse<String> response = Unirest.get(\"https://api.infobip.com/omni/1/logs\")\n .header(\"authorization\", \"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\")\n .header(\"accept\", \"application/json\")\n .asString();", "language": "java" }, { "code": "var client = new RestClient(\"https://api.infobip.com/omni/1/logs\");\n\nvar request = new RestRequest(Method.GET);\nrequest.AddHeader(\"accept\", \"application/json\");\nrequest.AddHeader(\"authorization\", \"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\");\n\nIRestResponse response = client.Execute(request);", "language": "csharp" }, { "code": "var data = null;\n\nvar xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n if (this.readyState === this.DONE) {\n console.log(this.responseText);\n }\n});\n\nxhr.open(\"GET\", \"https://api.infobip.com/omni/1/logs\");\nxhr.setRequestHeader(\"authorization\", \"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\");\nxhr.setRequestHeader(\"accept\", \"application/json\");\n\nxhr.send(data);", "language": "javascript" } ] } [/block] **Response** [block:code] { "codes": [ { "code": "HTTP/1.1 200 OK\nContent-Type: application/json\n\n{ \n \"results\":[ \n { \n \"bulkId\":\"bafdeb3d-719b-4cce-8762-54d47b40f3c5\",\n \"messageId\":\"07e03aae-fabc-44ad-b1ce-222e14094d70\",\n \n \"to\":\"41793026727\",\n \"from\":\"InfoSMS\",\n \"text\":\"Test SMS.\",\n \"messageCount\": 1,\n \"sentAt\":\"2015-02-23T17:41:11.833+0100\",\n \"doneAt\":\"2015-02-23T17:41:11.843+0100\",\n \"mccmnc\":\"22801\",\n \"price\":{ \n \"pricePerMessage\":0.01,\n \"currency\":\"EUR\"\n },\n \"status\":{ \n \"groupId\":3,\n \"groupName\":\"DELIVERED\",\n \"id\":5,\n \"name\":\"DELIVERED_TO_HANDSET\",\n \"description\":\"Message delivered to handset\"\n },\n \"channel\": \"SMS\",\n },\n { \n \"bulkId\":\"06479ba3-5977-47f6-9346-fee0369bc76b\",\n \"messageId\":\"1f21d8d7-f306-4f53-9f6e-eddfce9849ea\",\n \"to\":\"41793026727\",\n \"from\":\"Demo PUSH Application\",\n \"text\":\"Test PUSH message.\",\n \"sentAt\":\"2015-02-23T17:40:31.773+0100\",\n \"doneAt\":\"2015-02-23T17:40:31.787+0100\",\n \"messageCount\":1,\n \"mccmnc\":\"22801\",\n \"price\":{ \n \"pricePerMessage\":0,\n \"currency\":\"EUR\"\n },\n \"status\":{ \n \"groupId\":3,\n \"groupName\":\"DELIVERED\",\n \"id\":5,\n \"name\":\"DELIVERED_TO_HANDSET\",\n \"description\":\"Message delivered to handset\"\n },\n \"channel\": \"PUSH\",\n }\n ]\n}", "language": "json" }, { "code": "HTTP/1.1 200 OK\nContent-Type: application/xml\n\n<smsLogsResponse>\n <results>\n \t<result>\n <bulkId>7944c32d-bf77-4f41-a752-c3aa89027adc</bulkId>\n <messageId>f97d3b99-fab2-468e-8acf-c8c8792b8ce6</messageId>\n \t\t<channel>SMS</channel>\n <to>41793026727</to>\n <from>InfoSMS</from>\n <text>Test SMS.</text>\n <sentAt>2015-02-23T17:41:18.020+0100</sentAt>\n <doneAt>2015-02-23T17:41:18.027+0100</doneAt>\n <messageCount>1</messageCount>\n <mccmnc>22801</mccmnc>\n <price>\n <pricePerMessage>0.0100</pricePerMessage>\n <currency>EUR</currency>\n </price>\n <status>\n <groupId>3</groupId>\n <groupName>DELIVERED</groupName>\n <id>5</id>\n <name>DELIVERED_TO_HANDSET</name>\n <description>Message delivered to handset</description>\n </status>\n </result>\n <result>\n <bulkId>bafdeb3d-719b-4cce-8762-54d47b40f3c5</bulkId>\n <messageId>07e03aae-fabc-44ad-b1ce-222e14094d70</messageId>\n \t<channel>PUSH</channel>\n <to>41793026727</to>\n <from>Demo PUSH Application</from>\n <text>Test PUSH message.</text>\n <sentAt>2015-02-23T17:41:11.833+0100</sentAt>\n <doneAt>2015-02-23T17:41:11.843+0100</doneAt>\n <messageCount>1</messageCount>\n <mccmnc>22801</mccmnc>\n <price>\n <pricePerMessage>0</pricePerMessage>\n <currency>EUR</currency>\n </price>\n <status>\n <groupId>3</groupId>\n <groupName>DELIVERED</groupName>\n <id>5</id>\n <name>DELIVERED_TO_HANDSET</name>\n <description>Message delivered to handset</description>\n </status>\n </result>\n </results>\n</smsLogsResponse>", "language": "xml" } ] } [/block] # Getting logs with `from`, `to` and `limit` as filters This request will filter last messages by rule - of all messages sent from `from`, return last `limit` messages with destinations `to`. **Request** [block:code] { "codes": [ { "code": "GET /omni/1/logs?from=DemoViberApp&to=41793026727&limit=1 HTTP/1.1\nHost: api.infobip.com\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\nAccept: application/json", "language": "json" }, { "code": "POST /omni/1/logs?from=DemoViberApp&to=41793026727&limit=1 HTTP/1.1\nHost: api.infobip.com\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\nAccept: application/xml", "language": "xml" }, { "code": "curl -X GET \\\n-H 'Accept: application/json' \\\n-H 'Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==' \\\nhttps://api.infobip.com/omni/1/logs?from=DemoViberApp&to=41793026727&limit=1", "language": "curl" }, { "code": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, array(\n CURLOPT_URL => \"http://api.infobip.com/omni/1/logs?from=DemoViberApp&to=41793026727&limit=1\",\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_ENCODING => \"\",\n CURLOPT_MAXREDIRS => 10,\n CURLOPT_TIMEOUT => 30,\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n CURLOPT_CUSTOMREQUEST => \"GET\",\n CURLOPT_POSTFIELDS => \"\",\n CURLOPT_HTTPHEADER => array(\n \"accept: application/json\",\n \"authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\"\n ),\n));\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n echo \"cURL Error #:\" . $err;\n} else {\n echo $response;\n}", "language": "php" }, { "code": "require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.infobip.com/omni/1/logs?from=DemoViberApp&to=41793026727&limit=1\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"authorization\"] = 'Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ=='\nrequest[\"accept\"] = 'application/json'\n\nresponse = http.request(request)\nputs response.read_body", "language": "ruby" }, { "code": "import http.client\n\nconn = http.client.HTTPSConnection(\"api.infobip.com\")\n\nheaders = {\n 'authorization': \"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\",\n 'accept': \"application/json\"\n }\n\nconn.request(\"GET\", \"/omni/1/logs?from=DemoViberApp&to=41793026727&limit=1\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))", "language": "python" }, { "code": "HttpResponse<String> response = Unirest.get(\"https://api.infobip.com/omni/1/logs?from=DemoViberApp&to=41793026727&limit=1\")\n .header(\"authorization\", \"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\")\n .header(\"accept\", \"application/json\")\n .asString();", "language": "java" }, { "code": "var client = new RestClient(\"https://api.infobip.com/omni/1/logs?from=DemoViberApp&to=41793026727&limit=1\");\n\nvar request = new RestRequest(Method.GET);\nrequest.AddHeader(\"accept\", \"application/json\");\nrequest.AddHeader(\"authorization\", \"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\");\n\nIRestResponse response = client.Execute(request);", "language": "csharp" }, { "code": "var data = null;\n\nvar xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n if (this.readyState === this.DONE) {\n console.log(this.responseText);\n }\n});\n\nxhr.open(\"GET\", \"https://api.infobip.com/omni/1/logs?from=DemoViberApp&to=41793026727&limit=1\");\nxhr.setRequestHeader(\"authorization\", \"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\");\nxhr.setRequestHeader(\"accept\", \"application/json\");\n\nxhr.send(data);", "language": "javascript" } ] } [/block] **Response** [block:code] { "codes": [ { "code": "HTTP/1.1 200 OK\nContent-Type: application/json\n\n{ \n \"results\":[ \n { \n \"bulkId\":\"82d1d36e-e4fb-4194-8b93-caeb053bd327\",\n \"messageId\":\"fc0cbfb8-7a72-40da-a76d-e2c2d9400835\",\n \"to\":\"41793026727\",\n \"from\":\"DemoViberApp\",\n \"text\":\"Test Viber message.\",\n \"sentAt\":\"2015-02-23T17:42:05.390+0100\",\n \"doneAt\":\"2015-02-23T17:42:05.390+0100\",\n \"messageCount\":1,\n \"mccmnc\":\"22801\",\n \"price\":{ \n \"pricePerMessage\":0.0104,\n \"currency\":\"EUR\"\n },\n \"status\":{ \n \"groupId\":3,\n \"groupName\":\"DELIVERED\",\n \"id\":5,\n \"name\":\"DELIVERED_TO_HANDSET\",\n \"description\":\"Message delivered to handset\"\n },\n \"channel\": \"VIBER\",\n }\n ]\n}", "language": "json" }, { "code": "HTTP/1.1 200 OK\nContent-Type: application/xml\n\n<smsLogsResponse>\n <results>\n <result>\n <bulkId>82d1d36e-e4fb-4194-8b93-caeb053bd327</bulkId>\n <messageId>fc0cbfb8-7a72-40da-a76d-e2c2d9400835</messageId>\n <channel>VIBER</channel>\n <to>41793026727</to>\n <from>DemoViberApp</from>\n <text>Test Viber message.</text>\n <sentAt>2015-02-23T17:42:05.390+0100</sentAt>\n <doneAt>2015-02-23T17:42:05.390+0100</doneAt>\n <messageCount>1</messageCount>\n <mccmnc>22801</mccmnc>\n <price>\n <pricePerMessage>0.0104</pricePerMessage>\n <currency>EUR</currency>\n </price>\n <status>\n <groupId>3</groupId>\n <groupName>DELIVERED</groupName>\n <id>6</id>\n <name>DELIVERED_TO_HANDSET</name>\n <description>Message delivered to handset</description>\n </status>\n </result>\n </results>\n</smsLogsResponse>", "language": "xml" } ] } [/block] # Getting logs with multiple `bulkIds` as filters This request will return messages that have `bulkId` among the specified `bulkIds` in a filter. **Request** [block:code] { "codes": [ { "code": "GET /omni/1/logs?bulkId=1dece649-6c8f-404e-8c6e-c7e073be509a,bafdeb3d-719b-4cce-8762-54d47b40f3c5 HTTP/1.1\nHost: api.infobip.com\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\nAccept: application/json", "language": "json" }, { "code": "POST /omni/1/logs?bulkId=1dece649-6c8f-404e-8c6e-c7e073be509a,bafdeb3d-719b-4cce-8762-54d47b40f3c5 HTTP/1.1\nHost: api.infobip.com\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\nAccept: application/xml", "language": "xml" }, { "code": "curl -X GET \n-H 'Accept: application/json' \n-H 'Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==' \nhttps://api.infobip.com/omni/1/logs?bulkId=1dece649-6c8f-404e-8c6e-c7e073be509a,bafdeb3d-719b-4cce-8762-54d47b40f3c5", "language": "curl" }, { "code": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, array(\n CURLOPT_URL => \"http://api.infobip.com/omni/1/logs?bulkId=1dece649-6c8f-404e-8c6e-c7e073be509a%2Cbafdeb3d-719b-4cce-8762-54d47b40f3c5\",\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_ENCODING => \"\",\n CURLOPT_MAXREDIRS => 10,\n CURLOPT_TIMEOUT => 30,\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n CURLOPT_CUSTOMREQUEST => \"GET\",\n CURLOPT_POSTFIELDS => \"\",\n CURLOPT_HTTPHEADER => array(\n \"accept: application/json\",\n \"authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\"\n ),\n));\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n echo \"cURL Error #:\" . $err;\n} else {\n echo $response;\n}", "language": "php" }, { "code": "require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.infobip.com/omni/1/logs?bulkId=1dece649-6c8f-404e-8c6e-c7e073be509a%2Cbafdeb3d-719b-4cce-8762-54d47b40f3c5\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"authorization\"] = 'Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ=='\nrequest[\"accept\"] = 'application/json'\n\nresponse = http.request(request)\nputs response.read_body", "language": "ruby" }, { "code": "import http.client\n\nconn = http.client.HTTPSConnection(\"api.infobip.com\")\n\nheaders = {\n 'authorization': \"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\",\n 'accept': \"application/json\"\n }\n\nconn.request(\"GET\", \"/omni/1/logs?bulkId=1dece649-6c8f-404e-8c6e-c7e073be509a%2Cbafdeb3d-719b-4cce-8762-54d47b40f3c5\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))", "language": "python" }, { "code": "HttpResponse<String> response = Unirest.get(\"https://api.infobip.com/omni/1/logs?bulkId=1dece649-6c8f-404e-8c6e-c7e073be509a%2Cbafdeb3d-719b-4cce-8762-54d47b40f3c5\")\n .header(\"authorization\", \"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\")\n .header(\"accept\", \"application/json\")\n .asString();", "language": "java" }, { "code": "var client = new RestClient(\"https://api.infobip.com/omni/1/logs?bulkId=1dece649-6c8f-404e-8c6e-c7e073be509a%2Cbafdeb3d-719b-4cce-8762-54d47b40f3c5\");\n\nvar request = new RestRequest(Method.GET);\nrequest.AddHeader(\"accept\", \"application/json\");\nrequest.AddHeader(\"authorization\", \"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\");\n\nIRestResponse response = client.Execute(request);", "language": "csharp" }, { "code": "var data = null;\n\nvar xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n if (this.readyState === this.DONE) {\n console.log(this.responseText);\n }\n});\n\nxhr.open(\"GET\", \"https://api.infobip.com/omni/1/logs?bulkId=1dece649-6c8f-404e-8c6e-c7e073be509a%2Cbafdeb3d-719b-4cce-8762-54d47b40f3c5\");\nxhr.setRequestHeader(\"authorization\", \"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\");\nxhr.setRequestHeader(\"accept\", \"application/json\");\n\nxhr.send(data);", "language": "javascript" } ] } [/block] **Response** [block:code] { "codes": [ { "code": "HTTP/1.1 200 OK\nContent-Type: application/json\n\n{ \n \"results\":[ \n { \n \"bulkId\":\"bafdeb3d-719b-4cce-8762-54d47b40f3c5\",\n \"messageId\":\"07e03aae-fabc-44ad-b1ce-222e14094d70\",\n \"to\":\"41793026727\",\n \"from\":\"InfoSMS\",\n \"text\":\"Test SMS.\",\n \"sentAt\":\"2015-02-23T17:41:11.833+0100\",\n \"doneAt\":\"2015-02-23T17:41:11.843+0100\",\n \"messageCount\":1,\n \"mccmnc\":\"22801\",\n \"price\":{ \n \"pricePerMessage\":0.01,\n \"currency\":\"EUR\"\n },\n \"status\":{ \n \"groupId\":3,\n \"groupName\":\"DELIVERED\",\n \"id\":5,\n \"name\":\"DELIVERED_TO_HANDSET\",\n \"description\":\"Message delivered to handset\"\n },\n \"channel\": \"SMS\",\n },\n { \n \"bulkId\":\"1dece649-6c8f-404e-8c6e-c7e073be509a\",\n \"messageId\":\"faa48fe6-fe2c-4f36-a43b-a070e2906ecb\",\n \"to\":\"41793026727\",\n \"from\":\"41793026726\",\n \"text\":\"Test Voice Message.\",\n \"sentAt\":\"2015-02-23T16:22:37.413+0100\",\n \"doneAt\":\"2015-02-23T16:22:37.437+0100\",\n \"messageCount\":1,\n \"mccmnc\":\"22801\",\n \"price\":{ \n \"pricePerMessage\":0,\n \"currency\":\"EUR\"\n },\n \"status\":{ \n \"groupId\":2,\n \"groupName\":\"UNDELIVERABLE\",\n \"id\":9,\n \"name\":\"UNDELIVERABLE_NOT_DELIVERED\",\n \"description\":\"Message sent not delivered\"\n },\n \"channel\": \"VOICE\",\n }\n ]\n}", "language": "json" }, { "code": "HTTP/1.1 200 OK\nContent-Type: application/xml\n\n<smsLogsResponse>\n <results>\n <result>\n <bulkId>bafdeb3d-719b-4cce-8762-54d47b40f3c5</bulkId>\n <messageId>07e03aae-fabc-44ad-b1ce-222e14094d70</messageId>\n <channel>SMS</channel>\n <to>41793026727</to>\n <from>InfoSMS</from>\n <text>Test SMS.</text>\n <sentAt>2015-02-23T17:41:11.833+0100</sentAt>\n <doneAt>2015-02-23T17:41:11.843+0100</doneAt>\n <messageCount>1</messageCount>\n <mccmnc>22801</mccmnc>\n <price>\n <pricePerMessage>0.0100</pricePerMessage>\n <currency>EUR</currency>\n </price>\n <status>\n <groupId>3</groupId>\n <groupName>DELIVERED</groupName>\n <id>5</id>\n <name>DELIVERED_TO_HANDSET</name>\n <description>Message delivered to handset</description>\n </status>\n </result>\n <result>\n <bulkId>1dece649-6c8f-404e-8c6e-c7e073be509a</bulkId>\n <messageId>faa48fe6-fe2c-4f36-a43b-a070e2906ecb</messageId>\n <channel>VOICE</channel>\n <to>41793026727</to>\n <from>41793026726</from>\n <text>Test Voice message.</text>\n <sentAt>2015-02-23T16:22:37.413+0100</sentAt>\n <doneAt>2015-02-23T16:22:37.437+0100</doneAt>\n <messageCount>1</messageCount>\n <mccmnc>22801</mccmnc>\n <price>\n <pricePerMessage>0.0000</pricePerMessage>\n <currency>EUR</currency>\n </price>\n <status>\n <groupId>2</groupId>\n <groupName>UNDELIVERABLE</groupName>\n <id>9</id>\n <name>UNDELIVERABLE_NOT_DELIVERED</name>\n <description>Message sent not delivered</description>\n </status>\n </result>\n </results>\n</smsLogsResponse>", "language": "xml" } ] } [/block] # Getting logs with `date range` and `general status` as filters This request will return messages with a status that matches the `generalStatus` parameter (see [Response codes](http://dev.infobip.com/v1/docs/response-codes#section-statuses-groups)) which were sent between `sentSince` and the current time. **Request** [block:code] { "codes": [ { "code": "GET /omni/1/logs?sentSince=2015-02-22T17:42:05.390%2b01:00&generalStatus=DELIVERED HTTP/1.1\nHost: api.infobip.com\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\nAccept: application/json", "language": "json" }, { "code": "POST /omni/1/logs?sentSince=2015-02-22T17:42:05.390%2b01:00&generalStatus=DELIVERED HTTP/1.1\nHost: api.infobip.com\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\nAccept: application/xml", "language": "xml" }, { "code": "curl -X GET \n-H 'Accept: application/json' \n-H 'Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==' \nhttps://api.infobip.com/omni/1/logs?sentSince=2015-02-22T17:42:05.390%2b01:00&generalStatus=DELIVERED", "language": "curl" }, { "code": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, array(\n CURLOPT_URL => \"http://api.infobip.com/omni/1/logs?sentSince=2015-02-22T17%3A42%3A05.390%252b01%3A00&generalStatus=DELIVERED\",\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_ENCODING => \"\",\n CURLOPT_MAXREDIRS => 10,\n CURLOPT_TIMEOUT => 30,\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n CURLOPT_CUSTOMREQUEST => \"GET\",\n CURLOPT_POSTFIELDS => \"\",\n CURLOPT_HTTPHEADER => array(\n \"accept: application/json\",\n \"authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\"\n ),\n));\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n echo \"cURL Error #:\" . $err;\n} else {\n echo $response;\n}", "language": "php" }, { "code": "require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.infobip.com/omni/1/logs?sentSince=2015-02-22T17%3A42%3A05.390%2B01%3A00&generalStatus=DELIVERED\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"authorization\"] = 'Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ=='\nrequest[\"accept\"] = 'application/json'\n\nresponse = http.request(request)\nputs response.read_body", "language": "ruby" }, { "code": "import http.client\n\nconn = http.client.HTTPSConnection(\"api.infobip.com\")\n\nheaders = {\n 'authorization': \"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\",\n 'accept': \"application/json\"\n }\n\nconn.request(\"GET\", \"/omni/1/logs?sentSince=2015-02-22T17%3A42%3A05.390%2B01%3A00&generalStatus=DELIVERED\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))", "language": "python" }, { "code": "HttpResponse<String> response = Unirest.get(\"https://api.infobip.com/omni/1/logs?sentSince=2015-02-22T17%3A42%3A05.390%2B01%3A00&generalStatus=DELIVERED\")\n .header(\"authorization\", \"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\")\n .header(\"accept\", \"application/json\")\n .asString();", "language": "java" }, { "code": "var client = new RestClient(\"https://api.infobip.com/omni/1/logs?sentSince=2015-02-22T17%3A42%3A05.390%2B01%3A00&generalStatus=DELIVERED\");\n\nvar request = new RestRequest(Method.GET);\nrequest.AddHeader(\"accept\", \"application/json\");\nrequest.AddHeader(\"authorization\", \"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\");\n\nIRestResponse response = client.Execute(request);", "language": "csharp" }, { "code": "var data = null;\n\nvar xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n if (this.readyState === this.DONE) {\n console.log(this.responseText);\n }\n});\n\nxhr.open(\"GET\", \"https://api.infobip.com/omni/1/logs?sentSince=2015-02-22T17%3A42%3A05.390%2B01%3A00&generalStatus=DELIVERED\");\nxhr.setRequestHeader(\"authorization\", \"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\");\nxhr.setRequestHeader(\"accept\", \"application/json\");\n\nxhr.send(data);", "language": "javascript" } ] } [/block] **Response** [block:code] { "codes": [ { "code": "HTTP/1.1 200 OK\nContent-Type: application/json\n\n{ \n \"results\":[ \n { \n \"bulkId\":\"ce166d0e-bac7-4639-a094-52c406852afd\",\n \"messageId\":\"fdf71ada-3308-4cd1-9962-31f2b937a1d0\",\n \"to\":\"41793026727\",\n \"from\":\"DemoViberApp\",\n \"text\":\"Test Viber message.\",\n \"sentAt\":\"2016-02-24T10:34:56.463+0100\",\n \"doneAt\":\"2016-02-24T10:34:56.480+0100\",\n \"messageCount\":1,\n \"mccmnc\":\"22801\",\n \"price\":{ \n \"pricePerMessage\":0.0104,\n \"currency\":\"EUR\"\n },\n \"status\":{ \n \"groupId\":3,\n \"groupName\":\"DELIVERED\",\n \"id\":5,\n \"name\":\"DELIVERED_TO_HANDSET\",\n \"description\":\"Message delivered to handset\"\n },\n \"channel\": \"VIBER\"\n }\n ]\n}", "language": "json" }, { "code": "HTTP/1.1 200 OK\nContent-Type: application/xml\n\n<smsLogsResponse>\n <results>\n <result>\n <bulkId>ce166d0e-bac7-4639-a094-52c406852afd</bulkId>\n <messageId>fdf71ada-3308-4cd1-9962-31f2b937a1d0</messageId>\n <channel>VIBER</channel>\n <to>41793026727</to>\n <from>DemoViberApp</from>\n <text>Test Viber message.</text>\n <sentAt>2015-02-24T10:34:56.463+0100</sentAt>\n <doneAt>2015-02-24T10:34:56.480+0100</doneAt>\n <smsCount>1</smsCount>\n <mccmnc>22801</mccmnc>\n <price>\n <pricePerMessage>0.0104</pricePerMessage>\n <currency>EUR</currency>\n </price>\n <status>\n <groupId>3</groupId>\n <groupName>DELIVERED</groupName>\n <id>5</id>\n <name>DELIVERED_TO_HANDSET</name>\n <description>Message delivered to handset</description>\n </status>\n </result>\n </results>\n</smsLogsResponse>", "language": "xml" } ] } [/block] # Getting logs with `channel` as filter This request will return messages sent over specified omni channel. **Request** [block:code] { "codes": [ { "code": "GET /omni/1/logs?channel=PUSH HTTP/1.1\nHost: api.infobip.com\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\nAccept: application/json", "language": "json" }, { "code": "GET /omni/1/logs?channel=PUSH HTTP/1.1\nHost: api.infobip.com\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\nAccept: application/xml", "language": "xml" }, { "code": "curl -X GET \n-H 'Accept: application/json' \n-H 'Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==' \nhttps://api.infobip.com/omni/1/logs?channel=PUSH", "language": "curl" }, { "code": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, array(\n CURLOPT_URL => \"http://api.infobip.com/omni/1/logs?channel=PUSH\",\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_ENCODING => \"\",\n CURLOPT_MAXREDIRS => 10,\n CURLOPT_TIMEOUT => 30,\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n CURLOPT_CUSTOMREQUEST => \"GET\",\n CURLOPT_POSTFIELDS => \"\",\n CURLOPT_HTTPHEADER => array(\n \"accept: application/json\",\n \"authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\"\n ),\n));\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n echo \"cURL Error #:\" . $err;\n} else {\n echo $response;\n}", "language": "php" }, { "code": "require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.infobip.com/omni/1/logs?channel=PUSH\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"authorization\"] = 'Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ=='\nrequest[\"accept\"] = 'application/json'\n\nresponse = http.request(request)\nputs response.read_body", "language": "ruby" }, { "code": "import http.client\n\nconn = http.client.HTTPSConnection(\"api.infobip.com\")\n\nheaders = {\n 'authorization': \"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\",\n 'accept': \"application/json\"\n }\n\nconn.request(\"GET\", \"/omni/1/logs?channel=PUSH\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))", "language": "python" }, { "code": "HttpResponse<String> response = Unirest.get(\"https://api.infobip.com/omni/1/logs?channel=PUSH\")\n .header(\"authorization\", \"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\")\n .header(\"accept\", \"application/json\")\n .asString();", "language": "java" }, { "code": "var client = new RestClient(\"https://api.infobip.com/omni/1/logs?channel=PUSH\");\n\nvar request = new RestRequest(Method.GET);\nrequest.AddHeader(\"accept\", \"application/json\");\nrequest.AddHeader(\"authorization\", \"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\");\n\nIRestResponse response = client.Execute(request);", "language": "csharp" }, { "code": "var data = null;\n\nvar xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n if (this.readyState === this.DONE) {\n console.log(this.responseText);\n }\n});\n\nxhr.open(\"GET\", \"https://api.infobip.com/omni/1/logs?channel=PUSH\");\nxhr.setRequestHeader(\"authorization\", \"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\");\nxhr.setRequestHeader(\"accept\", \"application/json\");\n\nxhr.send(data);", "language": "javascript" } ] } [/block] **Response** [block:code] { "codes": [ { "code": "HTTP/1.1 200 OK\nContent-Type: application/json\n\n{ \n \"results\":[ \n { \n \"bulkId\":\"bafdeb3d-719b-4cce-8762-54d47b40f3c5\",\n \"messageId\":\"07e03aae-fabc-44ad-b1ce-222e14094d70\",\n \"to\":\"41793026727\",\n \"from\":\"Demo PUSH application\",\n \"text\":\"PUSH message nr. 1\",\n \"sentAt\":\"2015-02-23T17:41:11.833+0100\",\n \"doneAt\":\"2015-02-23T17:41:11.843+0100\",\n \"messageCount\":1,\n \"mccmnc\":\"22801\",\n \"price\":{ \n \"pricePerMessage\":0,\n \"currency\":\"EUR\"\n },\n \"status\":{ \n \"groupId\":3,\n \"groupName\":\"DELIVERED\",\n \"id\":5,\n \"name\":\"DELIVERED_TO_HANDSET\",\n \"description\":\"Message delivered to handset\"\n },\n \"channel\": \"PUSH\"\n },\n { \n \"bulkId\":\"1dece649-6c8f-404e-8c6e-c7e073be509a\",\n \"messageId\":\"faa48fe6-fe2c-4f36-a43b-a070e2906ecb\",\n \"to\":\"41793026727\",\n \"from\":\"Demo PUSH application\",\n \"text\":\"Test message nr. 2\",\n \"sentAt\":\"2015-02-23T16:22:37.413+0100\",\n \"doneAt\":\"2015-02-23T16:22:37.437+0100\",\n \"messageCount\":1,\n \"mccmnc\":\"22801\",\n \"price\":{ \n \"pricePerMessage\":0,\n \"currency\":\"EUR\"\n },\n \"status\":{ \n \"groupId\":2,\n \"groupName\":\"UNDELIVERABLE\",\n \"id\":9,\n \"name\":\"UNDELIVERABLE_NOT_DELIVERED\",\n \"description\":\"Message sent not delivered\"\n },\n \"channel\": \"PUSH\"\n }\n ]\n}", "language": "json" }, { "code": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<omniLogsResponse>\n <results>\n <bulkId>bafdeb3d-719b-4cce-8762-54d47b40f3c5</bulkId>\n <messageId>07e03aae-fabc-44ad-b1ce-222e14094d70</messageId>\n <channel>PUSH</channel>\n <to>41793026727</to>\n <from>Demo PUSH application</from>\n <text>PUSH message nr. 1</text>\n <sentAt>2015-02-23T17:41:11.833+0100</sentAt>\n <doneAt>2015-02-23T17:41:11.843+0100</doneAt>\n <messageCount>1</messageCount>\n <mccmnc>22801</mccmnc>\n <price>\n <pricePerMessage>0</pricePerMessage>\n <currency>EUR</currency>\n </price>\n <status>\n <groupId>3</groupId>\n <groupName>DELIVERED</groupName>\n <id>5</id>\n <name>DELIVERED_TO_HANDSET</name>\n <description>Message delivered to handset</description>\n </status>\n </results>\n <results>\n <bulkId>1dece649-6c8f-404e-8c6e-c7e073be509a</bulkId>\n <messageId>faa48fe6-fe2c-4f36-a43b-a070e2906ecb</messageId>\n <channel>PUSH</channel>\n <to>41793026727</to>\n <from>Demo PUSH application</from>\n <text>PUSH message nr. 2</text>\n <sentAt>2015-02-23T16:22:37.413+0100</sentAt>\n <doneAt>2015-02-23T16:22:37.437+0100</doneAt>\n <messageCount>1</messageCount>\n <mccmnc>22801</mccmnc>\n <price>\n <pricePerMessage>0</pricePerMessage>\n <currency>EUR</currency>\n </price>\n <status>\n <groupId>2</groupId>\n <groupName>UNDELIVERABLE</groupName>\n <id>9</id>\n <name>UNDELIVERABLE_NOT_DELIVERED</name>\n <description>Message sent not delivered</description>\n </status>\n </results>\n</omniLogsResponse>", "language": "xml" } ] } [/block]

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}