Is it true that only Soap/Web Service API can be used with Ampscript? What about Ampscript and REST API?
You can perform GET and POST methods to perform REST API calls.
Create your AMPscript using the functions below and place them in the content areas of landing pages and email messages. For example, you can use the URLEncode() function to encode spaces or non-alphanumeric characters contained in a URL for use by your subscribers.
There are also methods to update headers if that's needed, as well. Passing data may also cause some difficulty and the issue is if the result is JSON, there isn't a great way to handle it.
Depending on the situation, you would be better off with SSJS, but if this happening during a send, it's best to get the data prior to sending anything. If it's on a landing page - you would be ok.
var url = 'http://www.example.com'; var headerNames = ["MyTestHeader1", "MyTestHeader2"]; var headerValues = ["MyTestValue1", "MyTestValue2"]; var response = HTTP.Get(url, headerNames, headerValues);