{"_id":"56ab8ca8f25f160d00e17f00","project":"568fce2a04440a1700e4cb47","parentDoc":null,"user":"55116f88e2990b0d00fb0552","version":{"_id":"568fce2b04440a1700e4cb4a","project":"568fce2a04440a1700e4cb47","__v":20,"createdAt":"2016-01-08T14:56:43.101Z","releaseDate":"2016-01-08T14:56:43.101Z","categories":["568fce2b04440a1700e4cb4b","568fd1b8b700ce0d002f4b1c","568fd23804440a1700e4cb5b","568fd2444719c119002ce5d8","568ff21204440a1700e4cbc1","5693732c8aa8040d009f2c28","5693738393445b0d00abdad0","5693740093445b0d00abdad1","56937445974aaa0d001ca699","5693b82173f48f0d0075c90d","5694c4cd1005590d0062cb25","569f854466a5640d00efa54c","56a264cdd15dd70d008d825b","56aa56bf318e6c1700a19ddb","56b0e6347ae4550d000627bd","56b200c0f48f270d00e0de6f","56b200c6f48f270d00e0de70","56b22a9665ddf50d0076ba40","56e92ef71996862200fd7f42","574d6577fb835c0e00ca316a"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"__v":14,"category":{"_id":"568fd23804440a1700e4cb5b","project":"568fce2a04440a1700e4cb47","__v":3,"pages":["569fb6a8b4f2d31900898ced","56ab2dc70b9e0b0d006161c4","56efbfcb20419a0e00113caa"],"version":"568fce2b04440a1700e4cb4a","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-01-08T15:14:00.072Z","from_sync":false,"order":7,"slug":"soap-web-services","title":"SOAP API"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-01-29T16:00:40.934Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":7,"body":"[block:callout]\n{\n  \"type\": \"warning\",\n  \"body\": \"This method is restricted to authorised users only as of preferred method of sending data to customer in the [forwarding system](doc:receipt-forwarding), rather than polling for efficiency reasons. If you are interested in using this method please contact us to arrange access.\",\n  \"title\": \"Restricted Access\"\n}\n[/block]\nOutbound message receipts for messages sent via the SOAP or REST Messaging API can be polled via a call to PollMessageReceipts. Each call to this method returns a batch of receipts and a unique identifier for the start of the batch that can be used to start over in the event of an error within your own system.\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"Polling can be used to retrieve receipts up to 7 days old. Receipts that are older than 7 days will not be returned.\"\n}\n[/block]\n##Request\n\n**For Soap 1.0 & 1.1 the service endpoint is**\n<div class=\"alert alert-success\"><div class=\"label label-success\">SOAP</div> &nbsp; **https://services.dynmark.com/WebServices/MessagingServicesWS.asmx**\n\n<div class=\"label label-success\">WSDL</div> &nbsp; **https://services.dynmark.com/WebServices/MessagingServicesWS.asmx?wsdl**</div>\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"<code>name</code><span class=\\\"c-danger\\\">*</span>\",\n    \"4-0\": \"<code>impersonateUsername</code>\",\n    \"3-0\": \"<code>resetKey</code>\",\n    \"0-1\": \"Your username\",\n    \"4-1\": \"If name is a reseller user, then passing the username of a child account’s user will fetch receipts for that user\",\n    \"3-1\": \"The optional batch key that can be used to rewind the system a specific batch in the event of a client error\",\n    \"h-0\": \"Parameter\",\n    \"h-1\": \"Description\",\n    \"2-1\": \"The maximum number of receipts to return. This must be in the range 50-50,000, you should supply a batch size tuned to your system\",\n    \"2-0\": \"<code>batchSize</code><span class=\\\"c-danger\\\">*</span>\",\n    \"1-0\": \"<code>password</code><span class=\\\"c-danger\\\">*</span>\",\n    \"1-1\": \"Your password\"\n  },\n  \"cols\": 2,\n  \"rows\": 5\n}\n[/block]\n##Response\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Property\",\n    \"h-1\": \"Description\",\n    \"0-0\": \"<code>MessageReceipts</code><span class=\\\"c-danger\\\">*</span>\",\n    \"1-0\": \"<code>ResetKey</code><span class=\\\"c-danger\\\">*</span>\",\n    \"1-1\": \"A batch key that can be used to replay from the start of this batch in the event of a client error\",\n    \"0-1\": \"An array of [MessageReceipt](#section-messagereceipt-object) objects\"\n  },\n  \"cols\": 2,\n  \"rows\": 2\n}\n[/block]\n##MessageReceipt Object\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Property\",\n    \"h-1\": \"Description\",\n    \"0-1\": \"The integer message id of the message that the receipt applies to, this is unique to the message the receipt is for, but you may receive more than one status per message\",\n    \"1-1\": \"The name of the user that received the receipt\",\n    \"2-1\": \"The integer transaction id of the message. This identifies the original submission so will cover the whole batch. Used in conjunction with the Recipient field, it uniquely identifies a message when you don’t have the message Id\",\n    \"4-1\": \"The integer id of the [Message Status](doc:message-statuses)\",\n    \"5-1\": \"The date and time the receipt was received. Note: this may not correlate with the time the handset received the message due to receipting delays.\",\n    \"6-1\": \"The client ref value is a value that can be populated by the user when a message is sent through the Dynmark Web Services. The value that was specified in the sent message will be returned on the receipt\",\n    \"6-0\": \"<code>ClientReference</code><span class=\\\"c-danger\\\">*</span>\",\n    \"5-0\": \"<code>StatusUpdated</code><span class=\\\"c-danger\\\">*</span>\",\n    \"4-0\": \"<code>StatusId</code><span class=\\\"c-danger\\\">*</span>\",\n    \"2-0\": \"<code>TransactionId</code><span class=\\\"c-danger\\\">*</span>\",\n    \"1-0\": \"<code>ReceivingUsername</code><span class=\\\"c-danger\\\">*</span>\",\n    \"0-0\": \"<code>MessageId</code><span class=\\\"c-danger\\\">*</span>\",\n    \"3-0\": \"<code>Recipient</code><span class=\\\"c-danger\\\">*</span>\",\n    \"3-1\": \"The phone number the message was sent to. When used in conjunction with the TransactionId field, it uniquely identifies a message when you don’t have the message Id\"\n  },\n  \"cols\": 2,\n  \"rows\": 7\n}\n[/block]\nYou will only get one notification of each status change, but there may be several statuses during the receipting cycle.\n\nYou may not get all stages of receipt statuses. If a status changes multiple times in between calls to the PollMessageReceipts method, you will only get the latest status. \n\nOnce a message has achieved a final status, it will not change.","excerpt":"","slug":"soap-polling-pollmessagereceipts","type":"fn","title":"PollMessageReceipts"}

PollMessageReceipts


[block:callout] { "type": "warning", "body": "This method is restricted to authorised users only as of preferred method of sending data to customer in the [forwarding system](doc:receipt-forwarding), rather than polling for efficiency reasons. If you are interested in using this method please contact us to arrange access.", "title": "Restricted Access" } [/block] Outbound message receipts for messages sent via the SOAP or REST Messaging API can be polled via a call to PollMessageReceipts. Each call to this method returns a batch of receipts and a unique identifier for the start of the batch that can be used to start over in the event of an error within your own system. [block:callout] { "type": "info", "body": "Polling can be used to retrieve receipts up to 7 days old. Receipts that are older than 7 days will not be returned." } [/block] ##Request **For Soap 1.0 & 1.1 the service endpoint is** <div class="alert alert-success"><div class="label label-success">SOAP</div> &nbsp; **https://services.dynmark.com/WebServices/MessagingServicesWS.asmx** <div class="label label-success">WSDL</div> &nbsp; **https://services.dynmark.com/WebServices/MessagingServicesWS.asmx?wsdl**</div> [block:parameters] { "data": { "0-0": "<code>name</code><span class=\"c-danger\">*</span>", "4-0": "<code>impersonateUsername</code>", "3-0": "<code>resetKey</code>", "0-1": "Your username", "4-1": "If name is a reseller user, then passing the username of a child account’s user will fetch receipts for that user", "3-1": "The optional batch key that can be used to rewind the system a specific batch in the event of a client error", "h-0": "Parameter", "h-1": "Description", "2-1": "The maximum number of receipts to return. This must be in the range 50-50,000, you should supply a batch size tuned to your system", "2-0": "<code>batchSize</code><span class=\"c-danger\">*</span>", "1-0": "<code>password</code><span class=\"c-danger\">*</span>", "1-1": "Your password" }, "cols": 2, "rows": 5 } [/block] ##Response [block:parameters] { "data": { "h-0": "Property", "h-1": "Description", "0-0": "<code>MessageReceipts</code><span class=\"c-danger\">*</span>", "1-0": "<code>ResetKey</code><span class=\"c-danger\">*</span>", "1-1": "A batch key that can be used to replay from the start of this batch in the event of a client error", "0-1": "An array of [MessageReceipt](#section-messagereceipt-object) objects" }, "cols": 2, "rows": 2 } [/block] ##MessageReceipt Object [block:parameters] { "data": { "h-0": "Property", "h-1": "Description", "0-1": "The integer message id of the message that the receipt applies to, this is unique to the message the receipt is for, but you may receive more than one status per message", "1-1": "The name of the user that received the receipt", "2-1": "The integer transaction id of the message. This identifies the original submission so will cover the whole batch. Used in conjunction with the Recipient field, it uniquely identifies a message when you don’t have the message Id", "4-1": "The integer id of the [Message Status](doc:message-statuses)", "5-1": "The date and time the receipt was received. Note: this may not correlate with the time the handset received the message due to receipting delays.", "6-1": "The client ref value is a value that can be populated by the user when a message is sent through the Dynmark Web Services. The value that was specified in the sent message will be returned on the receipt", "6-0": "<code>ClientReference</code><span class=\"c-danger\">*</span>", "5-0": "<code>StatusUpdated</code><span class=\"c-danger\">*</span>", "4-0": "<code>StatusId</code><span class=\"c-danger\">*</span>", "2-0": "<code>TransactionId</code><span class=\"c-danger\">*</span>", "1-0": "<code>ReceivingUsername</code><span class=\"c-danger\">*</span>", "0-0": "<code>MessageId</code><span class=\"c-danger\">*</span>", "3-0": "<code>Recipient</code><span class=\"c-danger\">*</span>", "3-1": "The phone number the message was sent to. When used in conjunction with the TransactionId field, it uniquely identifies a message when you don’t have the message Id" }, "cols": 2, "rows": 7 } [/block] You will only get one notification of each status change, but there may be several statuses during the receipting cycle. You may not get all stages of receipt statuses. If a status changes multiple times in between calls to the PollMessageReceipts method, you will only get the latest status. Once a message has achieved a final status, it will not change.