-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Documentation for Coupon Code endpoint? #11
Comments
I found a more complete documentation on https://docs.fastspring.com/integrating-with-fastspring/fastspring-api But it's not clear which parts of the API are for the "Classic" or "Contextual" store product. |
Hi Joel, I responded to you via Email within our Ticketing system, but it sounds like you didn't receive my response. This was my response - Hi Joel, I received your request in GitHub about this issue below. You are currently on our Classic system and in our API we do not have that functionality. We are currently working towards a Contextual Platform that has better API handling. If it's crucial to your business, we can create a contextual store for you so you could use all the API functionality if needed. To answer your second question. Everything on docs.fastspring.com is for Contextual. |
I am on classical store, I am not able to generate random coupon, based on this doc setting prefix to the new coupon name, I get this error:
it seems that I have to provide a pre-existing coupon? and if do so, I get this error:
what I need to do, is to create new codes on the fly.. |
@hopewise Here is a complete example that works for me: var couponURL = 'https://api.fastspring.com/company/REPLACE_BY_YOUR_COMPANY_LOGIN/coupon/REPLACE_WITH_COUPON_NAME/generate'
var httpOptions = {
url: couponURL,
method: 'POST',
json: false,
headers: {
'Authorization': 'Basic REPLACE_BY_AUTH'
}
}
request(httpOptions, function (err, httpResp, body) {
...
} It returns an XML though. It's recommended that you create a new user on your account and use these credentials for auth. If my final coupon code is |
Hi!
The only documentation I found is https://github.com/fastspring/fastspring-api/blob/master/sections/misc.mdown
And there are no doc about the parameters & infos needed to create a coupon...
By the is it doable in JSON instead of XML? It would be easier in javascript...!
The text was updated successfully, but these errors were encountered: