{"__v":1,"_id":"551bc170c08a24210029d50e","category":{"__v":3,"_id":"55154749c28d6125001b8885","pages":["551abac26491a10d0099943c","551ba163944d6b2f00479d47","551bc170c08a24210029d50e"],"project":"54eb50e5615ffc1900305a16","version":"54eb63b859b1172100334fae","sync":{"url":"","isSync":false},"reference":true,"createdAt":"2015-03-27T12:04:25.647Z","from_sync":false,"order":7,"slug":"number-context","title":"Number Lookup"},"editedParams":true,"editedParams2":true,"parentDoc":null,"project":"54eb50e5615ffc1900305a16","user":"54eb4fdedf7add210007b29b","version":{"__v":21,"_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","589b19b4fec2730f0082e040","58b04a023529383900a759b5","58b92d1598157a0f004869bf"],"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-04-01T09:59:12.166Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[{"name":"","code":"GET /number/1/logs HTTP/1.1\nHost: api.infobip.com\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\nAccept: application/json","language":"json"}]},"method":"get","results":{"codes":[{"name":"","code":"{  \n   \"results\":[  \n      {  \n         \"bulkId\":\"6455bad7-e83c-483e-8b51-1a32abe83d25\",\n         \"messageId\":\"24bd66d4-97c9-4598-9283-401224591bbd\",\n         \"to\":\"41793026727\",\n         \"sentAt\":\"2015-02-24T11:40:30.893+0100\",\n         \"doneAt\":\"2015-02-24T11:40:30.917+0100\",\n         \"mccmnc\":\"22801\",\n         \"price\":{  \n            \"pricePerLookup\":0.01,\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         \"error\":{  \n            \"groupId\":2,\n            \"groupName\":\"USER_ERRORS\",\n            \"id\":4096,\n            \"name\":\"EC_INVALID_PDU_FORMAT\",\n            \"description\":\"Invalid PDU Format\",\n            \"permanent\":true\n         }\n      }\n   ]\n}","language":"json","status":200}]},"settings":"","auth":"required","params":[{"_id":"551bc170c08a24210029d517","ref":"","in":"query","required":false,"desc":"The Number Lookup destination address.","default":"","type":"string","name":"to"},{"_id":"551bc170c08a24210029d516","ref":"","in":"query","required":false,"desc":"The ID that uniquely identifies the request. Bulk ID will be received only when you send a Number Lookup to more than one destination address.","default":"","type":"string","name":"bulkId"},{"_id":"551bc170c08a24210029d515","ref":"","in":"query","required":false,"desc":"The ID that uniquely identifies the performed lookup on destination address.","default":"","type":"string","name":"messageId"},{"_id":"551bc170c08a24210029d514","ref":"","in":"query","required":false,"desc":"Sent SMS [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":"551bc170c08a24210029d513","ref":"","in":"query","required":false,"desc":"Lower limit for NC sentAt time (time of sending the lookup). Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSSXXX`.","default":"","type":"datetime","name":"sentSince"},{"_id":"551bc170c08a24210029d512","ref":"","in":"query","required":false,"desc":"Upper limit for NC sentAt time (time of sending the lookup). Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSSXXX`.","default":"","type":"datetime","name":"sentUntil"},{"_id":"551bc170c08a24210029d511","ref":"","in":"query","required":false,"desc":"Maximal number of number lookups in returned logs.","default":"","type":"int","name":"limit"},{"_id":"551bc170c08a24210029d510","ref":"","in":"query","required":false,"desc":"Mobile country code.","default":"","type":"string","name":"mcc"},{"_id":"551bc170c08a24210029d50f","ref":"","in":"query","required":false,"desc":"Mobile network code.","default":"","type":"string","name":"mnc"}],"url":"/number/:version/logs"},"isReference":true,"order":3,"body":"[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"Important:\",\n  \"body\": \"**Number Lookup logs are available for the last 48 hours!**\"\n}\n[/block]\n# Response format\n\nIf successful, response header HTTP status code will be `200 OK` and the Number Lookup logs will be returned.\n\nIf you try to send message without authorization, you will get a response with HTTP status code `401 Unauthorized`.\n\n## NCLogsResponse\n\n|Parameter|Type|Description|\n|-|-|-|\n|*results*|[NCLog[]](#section-nclog)|Collection of logs.|\n\n#### NCLog\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|*to*|String|The message destination address.|\n|*sentAt*|Date|Tells when the SMS was sent. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSSZ`.|\n|*doneAt*|Date|Tells when the SMS was finished processing by Infobip (ie. delivered to destination, delivered to destination network, etc.)|\n|*mccmnc*|String|Mobile country and network codes.|\n|*price*|[Price](#section-price)|Sent SMS 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 SMS.|\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#### Error\n\n|Parameter|Type|Description|\n|-|-|-|\n|*groupId*|int|Error [group ID](http://dev.infobip.com/v1/docs/response-codes#error-object-example).|\n|*groupName*|String|Error [group name](http://dev.infobip.com/v1/docs/response-codes#error-object-example).|\n|*id*|int|Error [ID](http://dev.infobip.com/v1/docs/response-codes#error-object-example).|\n|*name*|String|Error [name](http://dev.infobip.com/v1/docs/response-codes#error-object-example).|\n|*description*|String|Human readable [description](http://dev.infobip.com/v1/docs/response-codes#error-object-example) of the error.|\n|*permanent*|boolean|Tells if the error [is permanent](http://dev.infobip.com/v1/docs/response-codes#error-object-example).|\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Additional examples\"\n}\n[/block]\n# Getting logs without any query parameter \n\n**Request**\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"GET /number/1/logs HTTP/1.1\\nHost: api.infobip.com\\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\nAccept: application/json\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"GET /number/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/number/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/number/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/number/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\\\", \\\"/number/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/number/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/number/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/number/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\\\":\\\"6455bad7-e83c-483e-8b51-1a32abe83d25\\\",\\n         \\\"messageId\\\":\\\"24bd66d4-97c9-4598-9283-401224591bbd\\\",\\n         \\\"to\\\":\\\"41793026727\\\",\\n         \\\"sentAt\\\":\\\"2015-02-24T11:40:30.893+0100\\\",\\n         \\\"doneAt\\\":\\\"2015-02-24T11:40:30.917+0100\\\",\\n         \\\"mccmnc\\\":\\\"22801\\\",\\n         \\\"price\\\":{  \\n            \\\"pricePerLookup\\\":0.01,\\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         \\\"error\\\":{  \\n            \\\"groupId\\\":2,\\n            \\\"groupName\\\":\\\"USER_ERRORS\\\",\\n            \\\"id\\\":4096,\\n            \\\"name\\\":\\\"EC_INVALID_PDU_FORMAT\\\",\\n            \\\"description\\\":\\\"Invalid PDU Format\\\",\\n            \\\"permanent\\\":true\\n         }\\n      },\\n      {  \\n         \\\"bulkId\\\":\\\"15743c28-5a56-4f12-872f-bd178e620546\\\",\\n         \\\"messageId\\\":\\\"26938ce9-1a27-4595-a990-a01129129a05\\\",\\n         \\\"to\\\":\\\"41763026727\\\",\\n         \\\"sentAt\\\":\\\"2015-02-23T16:25:30.777+0100\\\",\\n         \\\"doneAt\\\":\\\"2015-02-23T16:25:30.777+0100\\\",\\n         \\\"mccmnc\\\":\\\"22801\\\",\\n         \\\"price\\\":{  \\n            \\\"pricePerLookup\\\":0,\\n            \\\"currency\\\":\\\"EUR\\\"\\n         },\\n         \\\"status\\\":{  \\n            \\\"groupId\\\":5,\\n            \\\"groupName\\\":\\\"REJECTED\\\",\\n            \\\"id\\\":6,\\n            \\\"name\\\":\\\"REJECTED_NETWORK\\\",\\n            \\\"description\\\":\\\"Network is forbidden\\\",\\n            \\\"action\\\":\\\"Contact account manager\\\"\\n         },\\n         \\\"error\\\":{  \\n            \\\"groupId\\\":0,\\n            \\\"groupName\\\":\\\"OK\\\",\\n            \\\"id\\\":0,\\n            \\\"name\\\":\\\"NO_ERROR\\\",\\n            \\\"description\\\":\\\"No Error\\\",\\n            \\\"permanent\\\":false\\n         }\\n      }\\n   ]\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"HTTP/1.1 200 OK\\nContent-Type: application/xml\\n\\n<ncLogsResponse>\\n   <results>\\n      <result>\\n         <bulkId>6455bad7-e83c-483e-8b51-1a32abe83d25</bulkId>\\n         <messageId>24bd66d4-97c9-4598-9283-401224591bbd</messageId>\\n         <to>41793026727</to>\\n         <sentAt>2015-02-24T11:40:30.893+0100</sentAt>\\n         <doneAt>2015-02-24T11:40:30.917+0100</doneAt>\\n         <mccmnc>22801</mccmnc>\\n         <price>\\n            <pricePerLookup>0.0100</pricePerLookup>\\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         <error>\\n            <groupId>2</groupId>\\n            <groupName>USER_ERRORS</groupName>\\n            <id>4096</id>\\n            <name>EC_INVALID_PDU_FORMAT</name>\\n            <description>Invalid PDU Format</description>\\n            <permanent>true</permanent>\\n         </error>\\n      </result>\\n      <result>\\n         <bulkId>15743c28-5a56-4f12-872f-bd178e620546</bulkId>\\n         <messageId>26938ce9-1a27-4595-a990-a01129129a05</messageId>\\n         <to>41793026727</to>\\n         <sentAt>2015-02-23T16:25:30.777+0100</sentAt>\\n         <doneAt>2015-02-23T16:25:30.777+0100</doneAt>\\n         <mccmnc>22801</mccmnc>\\n         <price>\\n            <pricePerLookup>0.0000</pricePerLookup>\\n            <currency>EUR</currency>\\n         </price>\\n         <status>\\n            <groupId>5</groupId>\\n            <groupName>REJECTED</groupName>\\n            <id>6</id>\\n            <name>REJECTED_NETWORK</name>\\n            <description>Network is forbidden</description>\\n            <action>Contact account manager</action>\\n         </status>\\n         <error>\\n            <groupId>0</groupId>\\n            <groupName>OK</groupName>\\n            <id>0</id>\\n            <name>NO_ERROR</name>\\n            <description>No Error</description>\\n            <permanent>false</permanent>\\n         </error>\\n      </result>\\n   </results>\\n</ncLogsResponse>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n# Getting logs with multiple `message id` as filter\n\n**Request**\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"GET /number/1/logs?messageId=24bd66d4-97c9-4598-9283-401224591bbd,26938ce9-1a27-4595-a990-a01129129a05 HTTP/1.1\\nHost: api.infobip.com\\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\nAccept: application/json\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"GET /number/1/logs?messageId=24bd66d4-97c9-4598-9283-401224591bbd,26938ce9-1a27-4595-a990-a01129129a05 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/number/1/logs?messageId=24bd66d4-97c9-4598-9283-401224591bbd,26938ce9-1a27-4595-a990-a01129129a05\",\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/number/1/logs?messageId=24bd66d4-97c9-4598-9283-401224591bbd%2C26938ce9-1a27-4595-a990-a01129129a05\\\",\\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/number/1/logs?messageId=24bd66d4-97c9-4598-9283-401224591bbd%2C26938ce9-1a27-4595-a990-a01129129a05\\\")\\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\\\", \\\"/number/1/logs?messageId=24bd66d4-97c9-4598-9283-401224591bbd%2C26938ce9-1a27-4595-a990-a01129129a05\\\", 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/number/1/logs?messageId=24bd66d4-97c9-4598-9283-401224591bbd%2C26938ce9-1a27-4595-a990-a01129129a05\\\")\\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/number/1/logs?messageId=24bd66d4-97c9-4598-9283-401224591bbd%2C26938ce9-1a27-4595-a990-a01129129a05\\\");\\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/number/1/logs?messageId=24bd66d4-97c9-4598-9283-401224591bbd%2C26938ce9-1a27-4595-a990-a01129129a05\\\");\\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\\\":\\\"6455bad7-e83c-483e-8b51-1a32abe83d25\\\",\\n         \\\"messageId\\\":\\\"24bd66d4-97c9-4598-9283-401224591bbd\\\",\\n         \\\"to\\\":\\\"41793026727\\\",\\n         \\\"sentAt\\\":\\\"2015-02-24T11:40:30.893+0100\\\",\\n         \\\"doneAt\\\":\\\"2015-02-24T11:40:30.917+0100\\\",\\n         \\\"mccmnc\\\":\\\"22801\\\",\\n         \\\"price\\\":{  \\n            \\\"pricePerLookup\\\":0.01,\\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         \\\"error\\\":{  \\n            \\\"groupId\\\":2,\\n            \\\"groupName\\\":\\\"USER_ERRORS\\\",\\n            \\\"id\\\":4096,\\n            \\\"name\\\":\\\"EC_INVALID_PDU_FORMAT\\\",\\n            \\\"description\\\":\\\"Invalid PDU Format\\\",\\n            \\\"permanent\\\":true\\n         }\\n      },\\n      {  \\n         \\\"bulkId\\\":\\\"15743c28-5a56-4f12-872f-bd178e620546\\\",\\n         \\\"messageId\\\":\\\"26938ce9-1a27-4595-a990-a01129129a05\\\",\\n         \\\"to\\\":\\\"41793026727\\\",\\n         \\\"sentAt\\\":\\\"2015-02-23T16:25:30.777+0100\\\",\\n         \\\"doneAt\\\":\\\"2015-02-23T16:25:30.777+0100\\\",\\n         \\\"mccmnc\\\":\\\"22801\\\",\\n         \\\"price\\\":{  \\n            \\\"pricePerLookup\\\":0,\\n            \\\"currency\\\":\\\"EUR\\\"\\n         },\\n         \\\"status\\\":{  \\n            \\\"groupId\\\":5,\\n            \\\"groupName\\\":\\\"REJECTED\\\",\\n            \\\"id\\\":6,\\n            \\\"name\\\":\\\"REJECTED_NETWORK\\\",\\n            \\\"description\\\":\\\"Network is forbidden\\\",\\n            \\\"action\\\":\\\"Contact account manager\\\"\\n         },\\n         \\\"error\\\":{  \\n            \\\"groupId\\\":0,\\n            \\\"groupName\\\":\\\"OK\\\",\\n            \\\"id\\\":0,\\n            \\\"name\\\":\\\"NO_ERROR\\\",\\n            \\\"description\\\":\\\"No Error\\\",\\n            \\\"permanent\\\":false\\n         }\\n      }\\n   ]\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"HTTP/1.1 200 OK\\nContent-Type: application/xml\\n\\n<ncLogsResponse>\\n   <results>\\n      <result>\\n         <bulkId>6455bad7-e83c-483e-8b51-1a32abe83d25</bulkId>\\n         <messageId>24bd66d4-97c9-4598-9283-401224591bbd</messageId>\\n         <to>41793026727</to>\\n         <sentAt>2015-02-24T11:40:30.893+0100</sentAt>\\n         <doneAt>2015-02-24T11:40:30.917+0100</doneAt>\\n         <mccmnc>22801</mccmnc>\\n         <price>\\n            <pricePerLookup>0.0100</pricePerLookup>\\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         <error>\\n            <groupId>2</groupId>\\n            <groupName>USER_ERRORS</groupName>\\n            <id>4096</id>\\n            <name>EC_INVALID_PDU_FORMAT</name>\\n            <description>Invalid PDU Format</description>\\n            <permanent>true</permanent>\\n         </error>\\n      </result>\\n      <result>\\n         <bulkId>15743c28-5a56-4f12-872f-bd178e620546</bulkId>\\n         <messageId>26938ce9-1a27-4595-a990-a01129129a05</messageId>\\n         <to>41793026727</to>\\n         <sentAt>2015-02-23T16:25:30.777+0100</sentAt>\\n         <doneAt>2015-02-23T16:25:30.777+0100</doneAt>\\n         <mccmnc>22801</mccmnc>\\n         <price>\\n            <pricePerLookup>0.0000</pricePerLookup>\\n            <currency>EUR</currency>\\n         </price>\\n         <status>\\n            <groupId>5</groupId>\\n            <groupName>REJECTED</groupName>\\n            <id>6</id>\\n            <name>REJECTED_NETWORK</name>\\n            <description>Network is forbidden</description>\\n            <action>Contact account manager</action>\\n         </status>\\n         <error>\\n            <groupId>0</groupId>\\n            <groupName>OK</groupName>\\n            <id>0</id>\\n            <name>NO_ERROR</name>\\n            <description>No Error</description>\\n            <permanent>false</permanent>\\n         </error>\\n      </result>\\n   </results>\\n</ncLogsResponse>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n# Getting logs with `number`, `status`, `time range`, and `limit` as filters\n\n**Request**\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"GET /number/1/logs?to=41793026727&generalStatus=REJECTED&sentSince=2015-02-23T16:20:30.777%2b01:00&limit=1 HTTP/1.1\\nHost: api.infobip.com\\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\nAccept: application/json\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"GET /number/1/logs?to=41793026727&generalStatus=REJECTED&sentSince=2015-02-23T16:20:30.777%2b01:00&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/number/1/logs?to=41793026727&generalStatus=REJECTED&sentSince=2015-02-23T16:20:30.777%2b01:00&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/number/1/logs?to=41793026727&generalStatus=REJECTED&sentSince=2015-02-23T16%3A20%3A30.777%252b01%3A00&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/number/1/logs?to=41793026727&generalStatus=REJECTED&sentSince=2015-02-23T16%3A20%3A30.777%2B01%3A00&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\\\", \\\"/number/1/logs?to=41793026727&generalStatus=REJECTED&sentSince=2015-02-23T16%3A20%3A30.777%2B01%3A00&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/number/1/logs?to=41793026727&generalStatus=REJECTED&sentSince=2015-02-23T16%3A20%3A30.777%2B01%3A00&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/number/1/logs?to=41793026727&generalStatus=REJECTED&sentSince=2015-02-23T16%3A20%3A30.777%2B01%3A00&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/number/1/logs?to=41793026727&generalStatus=REJECTED&sentSince=2015-02-23T16%3A20%3A30.777%2B01%3A00&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\\\":\\\"15743c28-5a56-4f12-872f-bd178e620546\\\",\\n         \\\"messageId\\\":\\\"26938ce9-1a27-4595-a990-a01129129a05\\\",\\n         \\\"to\\\":\\\"41793026727\\\",\\n         \\\"sentAt\\\":\\\"2015-02-23T16:25:30.777+0100\\\",\\n         \\\"doneAt\\\":\\\"2015-02-23T16:25:30.777+0100\\\",\\n         \\\"mccmnc\\\":\\\"22801\\\",\\n         \\\"price\\\":{  \\n            \\\"pricePerLookup\\\":0,\\n            \\\"currency\\\":\\\"EUR\\\"\\n         },\\n         \\\"status\\\":{  \\n            \\\"groupId\\\":5,\\n            \\\"groupName\\\":\\\"REJECTED\\\",\\n            \\\"id\\\":6,\\n            \\\"name\\\":\\\"REJECTED_NETWORK\\\",\\n            \\\"description\\\":\\\"Network is forbidden\\\",\\n            \\\"action\\\":\\\"Contact account manager\\\"\\n         },\\n         \\\"error\\\":{  \\n            \\\"groupId\\\":0,\\n            \\\"groupName\\\":\\\"OK\\\",\\n            \\\"id\\\":0,\\n            \\\"name\\\":\\\"NO_ERROR\\\",\\n            \\\"description\\\":\\\"No Error\\\",\\n            \\\"permanent\\\":false\\n         }\\n      }\\n   ]\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"HTTP/1.1 200 OK\\nContent-Type: application/xml\\n\\n<ncLogsResponse>\\n   <results>\\n      <result>\\n         <bulkId>15743c28-5a56-4f12-872f-bd178e620546</bulkId>\\n         <messageId>26938ce9-1a27-4595-a990-a01129129a05</messageId>\\n         <to>41793026727</to>\\n         <mccmnc>22801</mccmnc>\\n         <sentAt>2015-02-23T16:25:30.777+0100</sentAt>\\n         <doneAt>2015-02-23T16:25:30.777+0100</doneAt>\\n         <price>\\n            <pricePerLookup>0.0000</pricePerLookup>\\n            <currency>EUR</currency>\\n         </price>\\n         <status>\\n            <groupId>5</groupId>\\n            <groupName>REJECTED</groupName>\\n            <id>6</id>\\n            <name>REJECTED_NETWORK</name>\\n            <description>Network is forbidden</description>\\n            <action>Contact account manager</action>\\n         </status>\\n         <error>\\n            <groupId>0</groupId>\\n            <groupName>OK</groupName>\\n            <id>0</id>\\n            <name>NO_ERROR</name>\\n            <description>No Error</description>\\n            <permanent>false</permanent>\\n         </error>\\n      </result>\\n   </results>\\n</ncLogsResponse>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]","excerpt":"This method allows you to get logs for sent Number Lookup.","slug":"sent-lookup-logs","type":"endpoint","title":"Sent lookup logs"}

getSent lookup logs

This method allows you to get logs for sent Number Lookup.

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Query Params

to:
string
The Number Lookup destination address.
bulkId:
string
The ID that uniquely identifies the request. Bulk ID will be received only when you send a Number Lookup to more than one destination address.
messageId:
string
The ID that uniquely identifies the performed lookup on destination address.
generalStatus:
string
Sent SMS [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 for NC sentAt time (time of sending the lookup). Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSSXXX`.
sentUntil:
datetime
Upper limit for NC sentAt time (time of sending the lookup). Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSSXXX`.
limit:
integer
Maximal number of number lookups in returned logs.
mcc:
string
Mobile country code.
mnc:
string
Mobile network code.

Examples


Result Format


Documentation

[block:callout] { "type": "warning", "title": "Important:", "body": "**Number Lookup logs are available for the last 48 hours!**" } [/block] # Response format If successful, response header HTTP status code will be `200 OK` and the Number Lookup logs will be returned. If you try to send message without authorization, you will get a response with HTTP status code `401 Unauthorized`. ## NCLogsResponse |Parameter|Type|Description| |-|-|-| |*results*|[NCLog[]](#section-nclog)|Collection of logs.| #### NCLog |Parameter|Type|Description| |-|-|-| |*bulkId*|String|The ID that uniquely identifies the request.| |*messageId*|String|The ID that uniquely identifies the message sent.| |*to*|String|The message destination address.| |*sentAt*|Date|Tells when the SMS was sent. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSSZ`.| |*doneAt*|Date|Tells when the SMS was finished processing by Infobip (ie. delivered to destination, delivered to destination network, etc.)| |*mccmnc*|String|Mobile country and network codes.| |*price*|[Price](#section-price)|Sent SMS 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 SMS.| |*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.| #### Error |Parameter|Type|Description| |-|-|-| |*groupId*|int|Error [group ID](http://dev.infobip.com/v1/docs/response-codes#error-object-example).| |*groupName*|String|Error [group name](http://dev.infobip.com/v1/docs/response-codes#error-object-example).| |*id*|int|Error [ID](http://dev.infobip.com/v1/docs/response-codes#error-object-example).| |*name*|String|Error [name](http://dev.infobip.com/v1/docs/response-codes#error-object-example).| |*description*|String|Human readable [description](http://dev.infobip.com/v1/docs/response-codes#error-object-example) of the error.| |*permanent*|boolean|Tells if the error [is permanent](http://dev.infobip.com/v1/docs/response-codes#error-object-example).| [block:api-header] { "type": "basic", "title": "Additional examples" } [/block] # Getting logs without any query parameter **Request** [block:code] { "codes": [ { "code": "GET /number/1/logs HTTP/1.1\nHost: api.infobip.com\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\nAccept: application/json", "language": "json" }, { "code": "GET /number/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/number/1/logs", "language": "curl" }, { "code": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, array(\n CURLOPT_URL => \"http://api.infobip.com/number/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/number/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\", \"/number/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/number/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/number/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/number/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\":\"6455bad7-e83c-483e-8b51-1a32abe83d25\",\n \"messageId\":\"24bd66d4-97c9-4598-9283-401224591bbd\",\n \"to\":\"41793026727\",\n \"sentAt\":\"2015-02-24T11:40:30.893+0100\",\n \"doneAt\":\"2015-02-24T11:40:30.917+0100\",\n \"mccmnc\":\"22801\",\n \"price\":{ \n \"pricePerLookup\":0.01,\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 \"error\":{ \n \"groupId\":2,\n \"groupName\":\"USER_ERRORS\",\n \"id\":4096,\n \"name\":\"EC_INVALID_PDU_FORMAT\",\n \"description\":\"Invalid PDU Format\",\n \"permanent\":true\n }\n },\n { \n \"bulkId\":\"15743c28-5a56-4f12-872f-bd178e620546\",\n \"messageId\":\"26938ce9-1a27-4595-a990-a01129129a05\",\n \"to\":\"41763026727\",\n \"sentAt\":\"2015-02-23T16:25:30.777+0100\",\n \"doneAt\":\"2015-02-23T16:25:30.777+0100\",\n \"mccmnc\":\"22801\",\n \"price\":{ \n \"pricePerLookup\":0,\n \"currency\":\"EUR\"\n },\n \"status\":{ \n \"groupId\":5,\n \"groupName\":\"REJECTED\",\n \"id\":6,\n \"name\":\"REJECTED_NETWORK\",\n \"description\":\"Network is forbidden\",\n \"action\":\"Contact account manager\"\n },\n \"error\":{ \n \"groupId\":0,\n \"groupName\":\"OK\",\n \"id\":0,\n \"name\":\"NO_ERROR\",\n \"description\":\"No Error\",\n \"permanent\":false\n }\n }\n ]\n}", "language": "json" }, { "code": "HTTP/1.1 200 OK\nContent-Type: application/xml\n\n<ncLogsResponse>\n <results>\n <result>\n <bulkId>6455bad7-e83c-483e-8b51-1a32abe83d25</bulkId>\n <messageId>24bd66d4-97c9-4598-9283-401224591bbd</messageId>\n <to>41793026727</to>\n <sentAt>2015-02-24T11:40:30.893+0100</sentAt>\n <doneAt>2015-02-24T11:40:30.917+0100</doneAt>\n <mccmnc>22801</mccmnc>\n <price>\n <pricePerLookup>0.0100</pricePerLookup>\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 <error>\n <groupId>2</groupId>\n <groupName>USER_ERRORS</groupName>\n <id>4096</id>\n <name>EC_INVALID_PDU_FORMAT</name>\n <description>Invalid PDU Format</description>\n <permanent>true</permanent>\n </error>\n </result>\n <result>\n <bulkId>15743c28-5a56-4f12-872f-bd178e620546</bulkId>\n <messageId>26938ce9-1a27-4595-a990-a01129129a05</messageId>\n <to>41793026727</to>\n <sentAt>2015-02-23T16:25:30.777+0100</sentAt>\n <doneAt>2015-02-23T16:25:30.777+0100</doneAt>\n <mccmnc>22801</mccmnc>\n <price>\n <pricePerLookup>0.0000</pricePerLookup>\n <currency>EUR</currency>\n </price>\n <status>\n <groupId>5</groupId>\n <groupName>REJECTED</groupName>\n <id>6</id>\n <name>REJECTED_NETWORK</name>\n <description>Network is forbidden</description>\n <action>Contact account manager</action>\n </status>\n <error>\n <groupId>0</groupId>\n <groupName>OK</groupName>\n <id>0</id>\n <name>NO_ERROR</name>\n <description>No Error</description>\n <permanent>false</permanent>\n </error>\n </result>\n </results>\n</ncLogsResponse>", "language": "xml" } ] } [/block] # Getting logs with multiple `message id` as filter **Request** [block:code] { "codes": [ { "code": "GET /number/1/logs?messageId=24bd66d4-97c9-4598-9283-401224591bbd,26938ce9-1a27-4595-a990-a01129129a05 HTTP/1.1\nHost: api.infobip.com\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\nAccept: application/json", "language": "json" }, { "code": "GET /number/1/logs?messageId=24bd66d4-97c9-4598-9283-401224591bbd,26938ce9-1a27-4595-a990-a01129129a05 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/number/1/logs?messageId=24bd66d4-97c9-4598-9283-401224591bbd,26938ce9-1a27-4595-a990-a01129129a05", "language": "curl" }, { "code": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, array(\n CURLOPT_URL => \"http://api.infobip.com/number/1/logs?messageId=24bd66d4-97c9-4598-9283-401224591bbd%2C26938ce9-1a27-4595-a990-a01129129a05\",\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/number/1/logs?messageId=24bd66d4-97c9-4598-9283-401224591bbd%2C26938ce9-1a27-4595-a990-a01129129a05\")\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\", \"/number/1/logs?messageId=24bd66d4-97c9-4598-9283-401224591bbd%2C26938ce9-1a27-4595-a990-a01129129a05\", 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/number/1/logs?messageId=24bd66d4-97c9-4598-9283-401224591bbd%2C26938ce9-1a27-4595-a990-a01129129a05\")\n .header(\"authorization\", \"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\")\n .header(\"accept\", \"application/json\")\n .asString();", "language": "java" }, { "code": "var client = new RestClient(\"https://api.infobip.com/number/1/logs?messageId=24bd66d4-97c9-4598-9283-401224591bbd%2C26938ce9-1a27-4595-a990-a01129129a05\");\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/number/1/logs?messageId=24bd66d4-97c9-4598-9283-401224591bbd%2C26938ce9-1a27-4595-a990-a01129129a05\");\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\":\"6455bad7-e83c-483e-8b51-1a32abe83d25\",\n \"messageId\":\"24bd66d4-97c9-4598-9283-401224591bbd\",\n \"to\":\"41793026727\",\n \"sentAt\":\"2015-02-24T11:40:30.893+0100\",\n \"doneAt\":\"2015-02-24T11:40:30.917+0100\",\n \"mccmnc\":\"22801\",\n \"price\":{ \n \"pricePerLookup\":0.01,\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 \"error\":{ \n \"groupId\":2,\n \"groupName\":\"USER_ERRORS\",\n \"id\":4096,\n \"name\":\"EC_INVALID_PDU_FORMAT\",\n \"description\":\"Invalid PDU Format\",\n \"permanent\":true\n }\n },\n { \n \"bulkId\":\"15743c28-5a56-4f12-872f-bd178e620546\",\n \"messageId\":\"26938ce9-1a27-4595-a990-a01129129a05\",\n \"to\":\"41793026727\",\n \"sentAt\":\"2015-02-23T16:25:30.777+0100\",\n \"doneAt\":\"2015-02-23T16:25:30.777+0100\",\n \"mccmnc\":\"22801\",\n \"price\":{ \n \"pricePerLookup\":0,\n \"currency\":\"EUR\"\n },\n \"status\":{ \n \"groupId\":5,\n \"groupName\":\"REJECTED\",\n \"id\":6,\n \"name\":\"REJECTED_NETWORK\",\n \"description\":\"Network is forbidden\",\n \"action\":\"Contact account manager\"\n },\n \"error\":{ \n \"groupId\":0,\n \"groupName\":\"OK\",\n \"id\":0,\n \"name\":\"NO_ERROR\",\n \"description\":\"No Error\",\n \"permanent\":false\n }\n }\n ]\n}", "language": "json" }, { "code": "HTTP/1.1 200 OK\nContent-Type: application/xml\n\n<ncLogsResponse>\n <results>\n <result>\n <bulkId>6455bad7-e83c-483e-8b51-1a32abe83d25</bulkId>\n <messageId>24bd66d4-97c9-4598-9283-401224591bbd</messageId>\n <to>41793026727</to>\n <sentAt>2015-02-24T11:40:30.893+0100</sentAt>\n <doneAt>2015-02-24T11:40:30.917+0100</doneAt>\n <mccmnc>22801</mccmnc>\n <price>\n <pricePerLookup>0.0100</pricePerLookup>\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 <error>\n <groupId>2</groupId>\n <groupName>USER_ERRORS</groupName>\n <id>4096</id>\n <name>EC_INVALID_PDU_FORMAT</name>\n <description>Invalid PDU Format</description>\n <permanent>true</permanent>\n </error>\n </result>\n <result>\n <bulkId>15743c28-5a56-4f12-872f-bd178e620546</bulkId>\n <messageId>26938ce9-1a27-4595-a990-a01129129a05</messageId>\n <to>41793026727</to>\n <sentAt>2015-02-23T16:25:30.777+0100</sentAt>\n <doneAt>2015-02-23T16:25:30.777+0100</doneAt>\n <mccmnc>22801</mccmnc>\n <price>\n <pricePerLookup>0.0000</pricePerLookup>\n <currency>EUR</currency>\n </price>\n <status>\n <groupId>5</groupId>\n <groupName>REJECTED</groupName>\n <id>6</id>\n <name>REJECTED_NETWORK</name>\n <description>Network is forbidden</description>\n <action>Contact account manager</action>\n </status>\n <error>\n <groupId>0</groupId>\n <groupName>OK</groupName>\n <id>0</id>\n <name>NO_ERROR</name>\n <description>No Error</description>\n <permanent>false</permanent>\n </error>\n </result>\n </results>\n</ncLogsResponse>", "language": "xml" } ] } [/block] # Getting logs with `number`, `status`, `time range`, and `limit` as filters **Request** [block:code] { "codes": [ { "code": "GET /number/1/logs?to=41793026727&generalStatus=REJECTED&sentSince=2015-02-23T16:20:30.777%2b01:00&limit=1 HTTP/1.1\nHost: api.infobip.com\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\nAccept: application/json", "language": "json" }, { "code": "GET /number/1/logs?to=41793026727&generalStatus=REJECTED&sentSince=2015-02-23T16:20:30.777%2b01:00&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/number/1/logs?to=41793026727&generalStatus=REJECTED&sentSince=2015-02-23T16:20:30.777%2b01:00&limit=1", "language": "curl" }, { "code": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, array(\n CURLOPT_URL => \"http://api.infobip.com/number/1/logs?to=41793026727&generalStatus=REJECTED&sentSince=2015-02-23T16%3A20%3A30.777%252b01%3A00&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/number/1/logs?to=41793026727&generalStatus=REJECTED&sentSince=2015-02-23T16%3A20%3A30.777%2B01%3A00&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\", \"/number/1/logs?to=41793026727&generalStatus=REJECTED&sentSince=2015-02-23T16%3A20%3A30.777%2B01%3A00&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/number/1/logs?to=41793026727&generalStatus=REJECTED&sentSince=2015-02-23T16%3A20%3A30.777%2B01%3A00&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/number/1/logs?to=41793026727&generalStatus=REJECTED&sentSince=2015-02-23T16%3A20%3A30.777%2B01%3A00&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/number/1/logs?to=41793026727&generalStatus=REJECTED&sentSince=2015-02-23T16%3A20%3A30.777%2B01%3A00&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\":\"15743c28-5a56-4f12-872f-bd178e620546\",\n \"messageId\":\"26938ce9-1a27-4595-a990-a01129129a05\",\n \"to\":\"41793026727\",\n \"sentAt\":\"2015-02-23T16:25:30.777+0100\",\n \"doneAt\":\"2015-02-23T16:25:30.777+0100\",\n \"mccmnc\":\"22801\",\n \"price\":{ \n \"pricePerLookup\":0,\n \"currency\":\"EUR\"\n },\n \"status\":{ \n \"groupId\":5,\n \"groupName\":\"REJECTED\",\n \"id\":6,\n \"name\":\"REJECTED_NETWORK\",\n \"description\":\"Network is forbidden\",\n \"action\":\"Contact account manager\"\n },\n \"error\":{ \n \"groupId\":0,\n \"groupName\":\"OK\",\n \"id\":0,\n \"name\":\"NO_ERROR\",\n \"description\":\"No Error\",\n \"permanent\":false\n }\n }\n ]\n}", "language": "json" }, { "code": "HTTP/1.1 200 OK\nContent-Type: application/xml\n\n<ncLogsResponse>\n <results>\n <result>\n <bulkId>15743c28-5a56-4f12-872f-bd178e620546</bulkId>\n <messageId>26938ce9-1a27-4595-a990-a01129129a05</messageId>\n <to>41793026727</to>\n <mccmnc>22801</mccmnc>\n <sentAt>2015-02-23T16:25:30.777+0100</sentAt>\n <doneAt>2015-02-23T16:25:30.777+0100</doneAt>\n <price>\n <pricePerLookup>0.0000</pricePerLookup>\n <currency>EUR</currency>\n </price>\n <status>\n <groupId>5</groupId>\n <groupName>REJECTED</groupName>\n <id>6</id>\n <name>REJECTED_NETWORK</name>\n <description>Network is forbidden</description>\n <action>Contact account manager</action>\n </status>\n <error>\n <groupId>0</groupId>\n <groupName>OK</groupName>\n <id>0</id>\n <name>NO_ERROR</name>\n <description>No Error</description>\n <permanent>false</permanent>\n </error>\n </result>\n </results>\n</ncLogsResponse>", "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 }}