{"__v":23,"_id":"551551d4f854a31900368737","category":{"__v":65,"_id":"551546edbc466623002afe72","pages":["551549c0bc466623002afe76","55154afbc859ac2f0001b486","55154daec859ac2f0001b48b","55154f36bc466623002afe7c","551550c5e68daa2f00cff84c","551551d4f854a31900368737","551552e7c859ac2f0001b494","551be4e3a0ee622b0087f69e","5527acc447b71d0d0044e6cd","552f84ad633a5b0d00e99daf","5537533df162750d00bbf7d0","554b3ffd6b448d0d00646d79","55506416fa289c0d0075e4f0","5550aaea00420e0d00d13113","55545865b450630d00041d80","55546906f9a7871700ef8e3c","555c4bf87e271d0d00f3c8c4","5564318c1fa8002300ea4bb0","556ffbd5910c090d00c432b6","557019f4cc189a21001ab258","55703aefcc189a21001ab2a3","5575a3c60b81dc230069c910","558ab69575eaf50d004e4cf3","55b0b41fb3171b3700b1539a","55ba2e48d72d1e1900276ac1","55ba45c804775a2f00628101","55c0b789344dc40d00f55933","55c0b8c837298d0d00088d88","55c0c095344dc40d00f55960","55d43e05b49ab11900328e2e","55d72c8c60fc730d00fc2738","55e6c564d678ad17001589ac","55e9b7780c9b420d0042b275","55f7cf2de32e9b0d00a2d4b6","56094efea7b2590d0089eb95","5613cdbeecbebc21003fa179","5613d8de6a092921004c30b8","5613de7c443514170060dbb6","5613e02823ecf6350009eefc","5613e4271db46e2100e142ad","5614d73c8113d20d00082e3e","561e11ae50e0a62100955946","561e2008efcf8217003adf77","5620f184b244890d001868e0","5620feb740e2c30d0002a899","562105ce40e2c30d0002a8a3","56210b3340e2c30d0002a8b3","56210c74b244890d0018690e","56249a0372ac510d00e49149","56249df185a31117001c53de","56249f0c85a31117001c53e1","5624a9e7c4bf501700bc5ec8","5624b29806e8040d005ed6a0","562507435a86b42300946324","563877854bfb360d00a463c1","5639e0f91846790d0089529a","565327d17d29410d004a0835","565457df04feff210074b17d","56545821ec189235002967af","565485099c4c6d0d00aeda02","5666f1f1f672550d000851ad","566abc7b74d574170070b700","566ad3c7c7c3cd1700265d14","566aede7b5ccc20d00817f71","566aef3147ebaf1900fe65d6"],"project":"54eb50e5615ffc1900305a16","version":"54eb63b859b1172100334fae","sync":{"url":"","isSync":false},"reference":true,"createdAt":"2015-03-27T12:02:53.314Z","from_sync":false,"order":9,"slug":"advanced-tutorials","title":"Advanced tutorials"},"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-03-27T12:49:24.097Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":true,"order":17,"body":"In case you were wondering which one of these two to use, this tutorial will help you see the difference between logs and delivery reports.\n\nLogs and reports carry similar information about sent messages. The main difference is that delivery reports can only be retrieved one time. Once you retrieve a delivery report, you will not be able to get the same report again. As opposed to delivery reports, logs can be requested as many times as you want.\n\n--------\n\n**Logs example:** \n\nYou have sent out a lot of promotional SMS messages and want to conduct a statistical analysis of the delivery rate with a generated report. In this case, you should request **logs** and for example set a filter for specific [`messageId`](doc:bulk-id-and-message-id) :\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"GET /sms/1/logs?messageId=2df1d520-714c-4b1c-ba71-8b189df34954,c82cb129-1564-435f-2f51-34b750dc5c75 HTTP/1.1\\nHost: api.infobip.com\\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\nContent-Type: application/json\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n`messageId` is not the only parameter you can use as a filter. The entire list of available parameters is available [here](http://dev.infobip.com/v1/docs/message-logs).\n\nResponse contains information about all the messages you have sent during past 48 hours, their delivery statuses and some more info. It looks like this:\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\\\":\\\"2df1d520-714c-4b1c-ba71-8b189df34954\\\",\\n         \\\"to\\\":\\\"41793026727\\\",\\n         \\\"from\\\":\\\"InfoSMS\\\",\\n         \\\"text\\\":\\\"Test SMS.\\\",\\n         \\\"sentAt\\\":\\\"2015-06-17T17:41:11.833+0100\\\",\\n         \\\"doneAt\\\":\\\"2015-06-17T17:41:11.843+0100\\\",\\n         \\\"smsCount\\\":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         \\\"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         \\\"bulkId\\\":\\\"06479ba3-5977-47f6-9346-fee0369bc76b\\\",\\n         \\\"messageId\\\":\\\"c82cb129-1564-435f-2f51-34b750dc5c75\\\",\\n         \\\"to\\\":\\\"41793026727\\\",\\n         \\\"from\\\":\\\"InfoSMS\\\",\\n         \\\"text\\\":\\\"Test SMS.\\\",\\n         \\\"sentAt\\\":\\\"2015-06-16T17:40:31.773+0100\\\",\\n         \\\"doneAt\\\":\\\"2015-06-16T17:40:31.787+0100\\\",\\n         \\\"smsCount\\\":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         \\\"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}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"Important:\",\n  \"body\": \"**SMS logs are available for the last 48 hours!**\\n\\nWith logs, you are able to see the result for your messages regardless of their current status.\"\n}\n[/block]\n----------\n**Delivery reports example:**  \n\nYou have sent a bulk SMS message to 200 recipients a minute ago and you can't wait to see the results.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"GET /sms/1/reports HTTP/1.1\\nHost: api.infobip.com\\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\nContent-Type: application/json\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nThe first time you request delivery reports, you will receive only an array of results for the messages that have a terminal (final) status:\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\\\":\\\"08fe4407-c48f-4d4b-a2f4-9ff583c985b8\\\",\\n         \\\"messageId\\\":\\\"bcfb828b-7df9-4e7b-8715-f34f5c61271a\\\",\\n         \\\"to\\\":\\\"38598111\\\",\\n         \\\"sentAt\\\":\\\"2015-02-26T17:41:11.833+0100\\\",\\n         \\\"doneAt\\\":\\\"2015-02-26T17:41:11.843+0100\\\",\\n         \\\"smsCount\\\":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         \\\"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         \\\"bulkId\\\":\\\"08fe4407-c48f-4d4b-a2f4-9ff583c985b8\\\",\\n         \\\"messageId\\\":\\\"12db39c3-7822-4e72-a3ec-c87442c0ffc5\\\",\\n         \\\"to\\\":\\\"385981112\\\",\\n         \\\"sentAt\\\":\\\"2015-02-27T17:40:31.773+0100\\\",\\n         \\\"doneAt\\\":\\\"2015-02-27T17:40:31.787+0100\\\",\\n         \\\"smsCount\\\":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         \\\"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}\n[/block]\nReports listed above are now marked as read and will not be shown again.\n\nIf you request delivery reports again in a couple of minutes, you will get only the remaining results you haven't seen before. So, delivery reports are ideal to use if you want to track changes, to see what happened after the last received delivery report.\n\n-------------\n#### **Tip:** Setup a custom [bulk id and message id](doc:bulk-id-and-message-id) so you can identify your SMS messages more easily.","excerpt":"Find out the difference between one time delivery reports and message logs history.","slug":"logs-vs-delivery-reports","type":"basic","title":"Delivery reports vs. Logs"}

Delivery reports vs. Logs

Find out the difference between one time delivery reports and message logs history.

In case you were wondering which one of these two to use, this tutorial will help you see the difference between logs and delivery reports. Logs and reports carry similar information about sent messages. The main difference is that delivery reports can only be retrieved one time. Once you retrieve a delivery report, you will not be able to get the same report again. As opposed to delivery reports, logs can be requested as many times as you want. -------- **Logs example:** You have sent out a lot of promotional SMS messages and want to conduct a statistical analysis of the delivery rate with a generated report. In this case, you should request **logs** and for example set a filter for specific [`messageId`](doc:bulk-id-and-message-id) : [block:code] { "codes": [ { "code": "GET /sms/1/logs?messageId=2df1d520-714c-4b1c-ba71-8b189df34954,c82cb129-1564-435f-2f51-34b750dc5c75 HTTP/1.1\nHost: api.infobip.com\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\nContent-Type: application/json", "language": "json" } ] } [/block] `messageId` is not the only parameter you can use as a filter. The entire list of available parameters is available [here](http://dev.infobip.com/v1/docs/message-logs). Response contains information about all the messages you have sent during past 48 hours, their delivery statuses and some more info. It looks like this: [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\":\"2df1d520-714c-4b1c-ba71-8b189df34954\",\n \"to\":\"41793026727\",\n \"from\":\"InfoSMS\",\n \"text\":\"Test SMS.\",\n \"sentAt\":\"2015-06-17T17:41:11.833+0100\",\n \"doneAt\":\"2015-06-17T17:41:11.843+0100\",\n \"smsCount\":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 \"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 \"bulkId\":\"06479ba3-5977-47f6-9346-fee0369bc76b\",\n \"messageId\":\"c82cb129-1564-435f-2f51-34b750dc5c75\",\n \"to\":\"41793026727\",\n \"from\":\"InfoSMS\",\n \"text\":\"Test SMS.\",\n \"sentAt\":\"2015-06-16T17:40:31.773+0100\",\n \"doneAt\":\"2015-06-16T17:40:31.787+0100\",\n \"smsCount\":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 \"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" } ] } [/block] [block:callout] { "type": "warning", "title": "Important:", "body": "**SMS logs are available for the last 48 hours!**\n\nWith logs, you are able to see the result for your messages regardless of their current status." } [/block] ---------- **Delivery reports example:** You have sent a bulk SMS message to 200 recipients a minute ago and you can't wait to see the results. [block:code] { "codes": [ { "code": "GET /sms/1/reports HTTP/1.1\nHost: api.infobip.com\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\nContent-Type: application/json", "language": "json" } ] } [/block] The first time you request delivery reports, you will receive only an array of results for the messages that have a terminal (final) status: [block:code] { "codes": [ { "code": "HTTP/1.1 200 OK\nContent-Type: application/json\n\n{ \n \"results\":[ \n { \n \"bulkId\":\"08fe4407-c48f-4d4b-a2f4-9ff583c985b8\",\n \"messageId\":\"bcfb828b-7df9-4e7b-8715-f34f5c61271a\",\n \"to\":\"38598111\",\n \"sentAt\":\"2015-02-26T17:41:11.833+0100\",\n \"doneAt\":\"2015-02-26T17:41:11.843+0100\",\n \"smsCount\":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 \"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 \"bulkId\":\"08fe4407-c48f-4d4b-a2f4-9ff583c985b8\",\n \"messageId\":\"12db39c3-7822-4e72-a3ec-c87442c0ffc5\",\n \"to\":\"385981112\",\n \"sentAt\":\"2015-02-27T17:40:31.773+0100\",\n \"doneAt\":\"2015-02-27T17:40:31.787+0100\",\n \"smsCount\":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 \"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" } ] } [/block] Reports listed above are now marked as read and will not be shown again. If you request delivery reports again in a couple of minutes, you will get only the remaining results you haven't seen before. So, delivery reports are ideal to use if you want to track changes, to see what happened after the last received delivery report. ------------- #### **Tip:** Setup a custom [bulk id and message id](doc:bulk-id-and-message-id) so you can identify your SMS messages more easily.