//[[restapi:start|RESTful API]]// ====== Blast a Smart URL ====== ==== Overview ==== Generate a short URL to redirect a user to a given destination allowing the API to keep track about the user interaction. This method will blast the URL to a list of recipients. ==== URL ==== Parameters on the following URL are inside braces { } {base_url}/rest/api/tools/createRedirectURLBatch/{instanceId}/{redirectURL}/{oneTime}/{externalId}/{type}/{idType}/{publicKey}/{signature} Please note that on the URL you won't see any POST parameters, only the regular parameters \\ All POST parameters will be highlighted in the following table. ^ Parameter Name ^ Description ^ | instanceId | An **instance id** is the workspace identification number, //if you don't know yours please request it using our [[misc:otto|ticketing tool]], you will need to provide your Mobile Engagement Campaign Manager's URL and your user login// | | redirectURL | The URL that users will be redirected to from Facebook after registration finished. This parameter must be [[restapi:appx_ciphering|Base64 encoded]]. | | oneTime | Indicates if a user can use this redirection more than once If true, the generated URL will only be valid for one use. | | externalId | ID defined for the user. This associated the url with external uses (an arbitrary string, can be a number). | | type | Type of object associated with the redirect. (Ex: The type could be "ScratchCard") | | idType | Id of the object. (Ex: The IdType could be the ScratchCard's id ) | | to \\ POST | Recipients who will receive the message. Please read the [[restapi:appx_phonelist#basic_csv_recipient_list|basic phone list file guidelines]] for more information about this text file | | publicKey | The public key to access this API. //if you don't know yours please request it using our [[misc:otto|ticketing tool]], you will need to provide your Mobile Engagement Campaign Manager's URL and your user login// | | signature | The unique [[restapi:appx_ciphering#SHA256 - Cipher|SHA256]] signature for this call, it's involve all input parameters. To learn about generating the correct signature please visit our [[restapi:appx_call_ex|Java Example]] | ==== Response ==== The Response XML is divided in a static part and a dynamic one, we call it dynamic because it will vary depending on the method you invoke. Please read our [[restapi:appx_resp_xml|Response XML Basics]] section if you want to learn more about the response parts. createRedirectURLBatch OK Completed https://api.messangi.com/rest/message/executeRedirect/d43ffe13-2 http://messangi.com/r/d43ffe13-2 13056708084 ... https://api.messangi.com/rest/message/executeRedirect/d43ffe13-2 http://messangi.com/r/d43ffe13-2 18133210984 Please be aware that the **////** tag and its content is a generic object and may apply to other responses in other methods. == Result parameters == ^ Parameter Name ^ Description ^ Possible Values ^ | url.fullUrl | The real API URL. | URL | | url.shortUrl | A short version of the URL that uses apache redirects to resolve to the API URL. | URL | | url.to | Recipient's mobile number | Text | ====== Activate a Smart URL ====== ==== Overview ==== Smart URL can be turned on or off any time, use this method to turn on a smart URL. ==== URL ==== Parameters on the following URL are inside braces { } {base_url}/rest/api/tools/activateRedirectURL/{instanceId}/{id}/{publicKey}/{signature} ^ Parameter Name ^ Description ^ | instanceId | An **instance id** is the workspace identification number, //if you don't know yours please request it using our [[misc:otto|ticketing tool]], you will need to provide your Mobile Engagement Campaign Manager's URL and your user login// | | id | Smart URL's id | | publicKey | The public key to access this API. //if you don't know yours please request it using our [[misc:otto|ticketing tool]], you will need to provide your Mobile Engagement Campaign Manager's URL and your user login// | | signature | The unique [[restapi:appx_ciphering#SHA256 - Cipher|SHA256]] signature for this call, it's involve all input parameters. To learn about generating the correct signature please visit our [[restapi:appx_call_ex|Java Example]] | ==== Response ==== The Response XML is divided in a static part and a dynamic one, we call it dynamic because it will vary depending on the method you invoke. Please read our [[restapi:appx_resp_xml|Response XML Basics]] section if you want to learn more about the response parts. activateRedirectURL OK Completed true Redirect Url activated == Result parameters == ^ Parameter Name ^ Description ^ Possible Values ^ | successful | Indicates if the URL was activated | true \\ false | | message | A human readable explanation | Text | ====== Deactivate a Smart URL ====== ==== Overview ==== Smart URL can be turned on or off any time, use this method to turn off a smart URL. ==== URL ==== Parameters on the following URL are inside braces { } {base_url}/rest/api/tools/deactivateRedirectURL/{instanceId}/{id}/{publicKey}/{signature} ^ Parameter Name ^ Description ^ | instanceId | An **instance id** is the workspace identification number, //if you don't know yours please request it using our [[misc:otto|ticketing tool]], you will need to provide your Mobile Engagement Campaign Manager's URL and your user login// | | id | Smart URL's id | | publicKey | The public key to access this API. //if you don't know yours please request it using our [[misc:otto|ticketing tool]], you will need to provide your Mobile Engagement Campaign Manager's URL and your user login// | | signature | The unique [[restapi:appx_ciphering#SHA256 - Cipher|SHA256]] signature for this call, it's involve all input parameters. To learn about generating the correct signature please visit our [[restapi:appx_call_ex|Java Example]] | ==== Response ==== The Response XML is divided in a static part and a dynamic one, we call it dynamic because it will vary depending on the method you invoke. Please read our [[restapi:appx_resp_xml|Response XML Basics]] section if you want to learn more about the response parts. deactivateRedirectURL OK Completed true Redirect Url activated == Result parameters == ^ Parameter Name ^ Description ^ Possible Values ^ | successful | Indicates if the URL was deactivated | true \\ false | | message | A human readable explanation | Text | ====== Retrieve a Smart URL by Id ====== ==== Overview ==== Retrieve a Smart URL configuration by its Id. ==== URL ==== Parameters on the following URL are inside braces { } {base_url}/rest/api/tools/getRedirectURL/{instanceId}/{id}/{publicKey}/{signature} ^ Parameter Name ^ Description ^ | instanceId | An **instance id** is the workspace identification number, //if you don't know yours please request it using our [[misc:otto|ticketing tool]], you will need to provide your Mobile Engagement Campaign Manager's URL and your user login// | | id | Smart URL's id | | publicKey | The public key to access this API. //if you don't know yours please request it using our [[misc:otto|ticketing tool]], you will need to provide your Mobile Engagement Campaign Manager's URL and your user login// | | signature | The unique [[restapi:appx_ciphering#SHA256 - Cipher|SHA256]] signature for this call, it's involve all input parameters. To learn about generating the correct signature please visit our [[restapi:appx_call_ex|Java Example]] | ==== Response ==== The Response XML is divided in a static part and a dynamic one, we call it dynamic because it will vary depending on the method you invoke. Please read our [[restapi:appx_resp_xml|Response XML Basics]] section if you want to learn more about the response parts. getRedirectURL OK Completed https://api.messangi.com/rest/message/executeRedirect/d43ffe13-2 http://messangi.com/r/d43ffe13-2 https://api.messangi.com/messangi-staging/content/scratchcards/cards/7da380f4-f2e6-4c81-w11c-194fe657c3100 588754853330 CAMPAINGNAME D79BFFVx2TjXcJrrnktB 0 true false 2015-11-07T10:44:03.327-05:00 Please be aware that the **////** tag and its content is a generic object and may apply to other responses in other methods. == Result parameters == ^ Parameter Name ^ Description ^ Possible Values ^ | url.fullUrl | The real API URL. | URL | | url.shortUrl | A short version of the URL that uses apache redirects to resolve to the API URL. | URL | | url.destinationURL | URL where you will be redirected. | URL | | url.to | Recipient's mobile number | Text | | url.externalId | Campaign name which owns this Smart Url. | Text | | url.clientId | The Client's identifier. | Text | | url.visits | How many hits has received this Smart URL | Number | | url.oneTime | true if the Smart URL is valid just for one time | true \\ false | | url.isActive | true if the Smart URL is currently active | true \\ false | | url.clientDate | Time mark at the origination moment | A formatted date string: **yyyy-MM-dd'T'HH:mm:ss.SSSZZ** \\ For more information please review the [[restapi:appx_date#date_format_-_pattern_letters|pattern letters]] quick reference | ====== Execute a Smart URL Redirection ====== ==== Overview ==== Redirects the user (using HTTP redirect) to the configured URL that corresponds with the given Smart URL Id. If the URL is configured for just one execution, no further redirects will be allowed. ==== URL ==== Parameters on the following URL are inside braces { } {base_url}/rest/api/tools/executeRedirect/{instanceId}/{id}/{publicKey}/{signature} ^ Parameter Name ^ Description ^ | instanceId | An **instance id** is the workspace identification number, //if you don't know yours please request it using our [[misc:otto|ticketing tool]], you will need to provide your Mobile Engagement Campaign Manager's URL and your user login// | | id | Smart URL's id | | publicKey | The public key to access this API. //if you don't know yours please request it using our [[misc:otto|ticketing tool]], you will need to provide your Mobile Engagement Campaign Manager's URL and your user login// | | signature | The unique [[restapi:appx_ciphering#SHA256 - Cipher|SHA256]] signature for this call, it's involve all input parameters. To learn about generating the correct signature please visit our [[restapi:appx_call_ex|Java Example]] | ==== Response ==== This method does not have any response, it just perform a web redirection.