// Get single coupon code from Coupon API

var companyID = "testcompanyid";
var APIUser = "testcompanyapiusername";
var APIPassword = "testcompanyapipassword";
var couponPrefix = "abcd";
var URL = "https://api.fastspring.com/company/" + companyID + "/coupon/" + couponPrefix + "/generate?user=" + APIUser + "&pass=" + APIPassword;
var response = httpPost(URL);
// strip all xml tags from result
var coupon = response.body.replace(/<.*?>/g,"");

coupon;