{"id":924,"date":"2022-08-24T05:01:38","date_gmt":"2022-08-24T05:01:38","guid":{"rendered":"https:\/\/developer.suresms.com\/?page_id=924"},"modified":"2025-01-10T10:48:25","modified_gmt":"2025-01-10T10:48:25","slug":"https-get-message-price","status":"publish","type":"page","link":"https:\/\/developer.suresms.com\/https\/https-get-message-price\/","title":{"rendered":"HTTP(s) &#8211; Get Message Price"},"content":{"rendered":"\n\n\t<p>With the HTTP(s) API it is possible to get an actuall price for sending a batch of messages. this can be usefull if you want to make sure the balance on the account is sufficient before starting to send a larger batch.<\/p>\n<p>Call<em><strong> https:\/\/api.suresms.com\/script\/v2\/GetMessagePrice.aspx<\/strong><\/em> with the following parameters:<\/p>\n<p><strong>Login, password and messageid or startutcdatetime and endutcdatetime<\/strong><\/p>\n<table>\n<tbody>\n<tr>\n<td>Login<\/td>\n<td>Your\u00a0SureSMS account login<\/td>\n<td>Mandatory<\/td>\n<\/tr>\n<tr>\n<td>Password<\/td>\n<td>\u00a0Your SureSMS account password<\/td>\n<td>Mandatory<\/td>\n<\/tr>\n<tr>\n<td>Text<\/td>\n<td>The message text. Remember to URL encode this field.<\/td>\n<td>Mandatory<\/td>\n<\/tr>\n<tr>\n<td>To<\/td>\n<td>The recipient of the message. (remember countrycode)<\/td>\n<td>Mandatory<\/td>\n<\/tr>\n<tr>\n<td>From<\/td>\n<td>You are able to set a sender id here. Max 11 chars. Setting special chars as sender, will make the SMS turn to 8bit encoding and hence it can only be 71 chars before being split into two messages. You need the SenderID <a href=\"https:\/\/suresms.com\/docs\/account\/sendername\/\">approved<\/a> otherwise you will get a 401.<\/td>\n<td>Mandatory<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Note: The parameters are NOT case senstive.<\/p>\n<p>Example :<\/p>\n<p>If your SureSMS account is &#8220;XXX&#8221; and your code is 8r7e3.<\/p>\n<p>If you want to find the price of a message call :<\/p>\nhttps:\/\/api.suresms.com\/script\/getmessageprice.aspx?login=XXX&#038;password=8r7e3&#038;to=+4540818824&#038;from=Hest&#038;text=Hello%20world\n<p>You will then get the response in the prefered currency of the user.<\/p>\n<h3>Result<\/h3>\n<p>You will then get the response in the prefered currency of the user.<\/p>\n\n","protected":false},"excerpt":{"rendered":"<p>With the HTTP(s) API it is possible to get an actuall price for sending a batch of messages. this can be usefull if you want to make sure the balance on the account is sufficient before starting to send a larger batch. Call https:\/\/api.suresms.com\/script\/v2\/GetMessagePrice.aspx with the following parameters: Login, password and messageid or startutcdatetime and&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":9,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-924","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/developer.suresms.com\/wp-json\/wp\/v2\/pages\/924","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/developer.suresms.com\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/developer.suresms.com\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/developer.suresms.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/developer.suresms.com\/wp-json\/wp\/v2\/comments?post=924"}],"version-history":[{"count":3,"href":"https:\/\/developer.suresms.com\/wp-json\/wp\/v2\/pages\/924\/revisions"}],"predecessor-version":[{"id":1027,"href":"https:\/\/developer.suresms.com\/wp-json\/wp\/v2\/pages\/924\/revisions\/1027"}],"up":[{"embeddable":true,"href":"https:\/\/developer.suresms.com\/wp-json\/wp\/v2\/pages\/9"}],"wp:attachment":[{"href":"https:\/\/developer.suresms.com\/wp-json\/wp\/v2\/media?parent=924"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}