qr2coupon youtube video channel

API INTEGRATION

Build Mobile Coupon Apps That Talk

JSON REST API

REST Web Service Interface


Connect to the QR2Coupon API in the cloud

The Future of Mobile Couponing

A few years ago, we started QR2coupon, to let any developer build mobile coupons that communicate with Clients, Pos Systems and databases. Today, we see awesome mobile couponing experiences beginning to permeate the web, and mobile coupon initiatives have become a full-fledged peer of the web.

We built QR2coupon to give every developer, whether web or mobile, at big companies and small, the ability to build world-class mobile communications awesomeness into their apps or on a standalone basis. We hope you have fun reinventing the way your users communicatie via mobile coupons. We can't wait to see what you build.





 



API FAQ

Frequently Asked API Questions

Here are answers to some commonly asked questions about our API's and how to use them


  1. Why Integrate Our API's? : With our Restful Json API's you can connect your software to our platform.

  2. How difficult is it to integrate these API's? : It is relatively easy to do - We built QR2coupon to give every developer, whether web or mobile, at big companies and small, the ability to build world-class mobile communications awesomeness into their apps or on a standalone basis.

  3. What can i do with a REST Web Service Interface? : The Qr2coupon REST API allows you to query meta-data about your white label or normal account, about your coupons, about scan id's, it gives you scan data and all kinds of other information. It offers you the option to redeem and validate coupons and vouchers via a API and since our API's are based on REST principles, it's very easy to write and test your applications. Just use a browser to access URLs, and use pretty much any HTTP client in any programming language to interact with the API.

  4. What Are RESTful Web Services? : RESTful web services are built to work best on the Web. Representational State Transfer (REST) is an architectural style that specifies constraints, such as the uniform interface, that if applied to a web service induce desirable properties, such as performance, scalability, and modifiability, that enable services to work best on the Web. In the REST architectural style, data and functionality are considered resources and are accessed using Uniform Resource Identifiers (URIs), typically links on the Web. The resources are acted upon by using a set of simple, well-defined operations. The REST architectural style constrains an architecture to a client/server architecture and is designed to use a stateless communication protocol, typically HTTP. In the REST architecture style, clients and servers exchange representations of resources by using a standardized interface and protocol.

  5. Why would i use the QR2coupon Json API's? : It will save you lots of time, gives you a easy framework to work with and offers you the tools to integrate world-class redeemable mobile coupons and vouchers into your software, applications and apps.







Cases

Example cases

Want to check the validity of a coupon?



The QR2Coupon API makes it perfectly possible to do exactly that. In order to understand how you can do so, we’ll show you two possible cases in which you might need this functionality. Of course there are many more ways to implement our API.


Case 1: POS integration


Let’s assume we’d like to have a POS system which is capable of processing a coupon from the scanning of a barcode to the printing of the receipt. How does this work? Make your POS do all your work by connecting it to our API

  1. Send the barcode value to our server
    Send a POST request (with your client_id, client_secret and barcode value) to this URL: http://utap.at/api/json/r1/coupon/validate_via_scan_id.

    Notes:
    • Both client_id and client_secret can be found in your account in the API section
    • The url might contain "v1" instead of "r1" depending on the type of account you are using. The API section in your account will point out the exact version you’ll have to use.
    • The barcode value is the barcode which the POS just scanned.
  2. Receive and process the server response
    Let’s have a look at the possible server responses. The coupon can either be valid or not.

    Let’s assume it’s valid first. The server responds with a "success=true". This means the barcode value was accepted by our servers and the coupon is now registered as "validated" (the barcode is no longer valid). Now is the time to tell the POS system to implement a discount value. The server response also contains the value of the discount within the "coupon_value" variable since a discount might differ when using "Scratch & Win" coupons.

    In case our servers respond with a "success=false", you know of course that the scanned coupon was not valid. Question is: Why? A reason as well as a solution will be sent along with the response and can be found in de variables "reason" and "solution". These messages are textual, so they can be shown within the POS to assist the staff in finding a solution. An example of a "reason" would be: "Coupon already validated last Tuesday".
  3. That’s it
    Let the POS system continue its normal functionality. The scanned barcode is of course no longer valid. So the scanning of the same barcode will result in a "success=false".



Case 2: Cashback functionality


Our second case is a cashback functionality. Assume you offer coupons for free, but charge a price per validation, you’ll have to be sure you get notified once a coupon was validated. A smart way to do so would be to work with cashbacks. Your coupon users will make sure their coupon will get validated when they go in-store to get a product or service, otherwise they’re not entitled to a cashback. QR2Coupon offers the functionality to redirect coupons (after validation) to a location of choice. So customers enter your (personal) website after validation. Of course you’d like to know WHO validated the coupon and WHICH coupon was just validated. This can be done by sending the unique ID we send to your webpage to our API service. The API will respond with the necessary information. How does it work? Connect your cashback system to our API

  1. Set up your coupon to redirect users to your webpage
    When you enter your coupon settings you’ll find the "Redirect URL" in the "Validation options"-section. Here you can enter the URL of your webpage. After a validation, our system ADDS a GET variable to your URL, containing a unique ID, which can be used to check WHO validated WHICH coupon.

    An example redirect URL:
    • URL you set up: http://www.google.com
    • URL QR2Coupon uses for redirect: http://www.google.com?unique_scan_id=XXXX
  2. Send the unique id you receive from us to our API
    Send a POST request (with your client_id and client_secret) to this URL: http://utap.at/api/json/r1/ coupon/scan_id/[scan_id].

    Notes:
    • Both client_id and client_secret can be found in your account in the API section
    • The url might contain "v1" instead of "r1" depending on the type of account you are using. The API section in your account will point out the exact version you’ll have to use.
    • [scan_id] is the unique id we sent to your webpage.
  3. Receive and process the server response
    Depending on the information you need, you can access multiple variables from the server response (assuming the unique ID was valid). Let’s say for example you need to know which coupon was validated, you can access the "coupon_code" variable. This is an identification number of a coupon. You can also see where the coupon was validated by looking at the "redeem_location_id". Furthermore, if your coupon is set up to recognize customers by Facebook Connect or by Email login, the "customer_id" will be available to you (across different coupons) to identify a specific user.

    As you can see, there are different pieces of information you can access, depending on your needs.




Case 3: Payment Integration - Can redemption be made based on a payment to a Paypal account?


Sure you can. Try this - Inside your client account, in the menu under validation widget and API's, if you scroll down, you will see our API documentation and test it yourself options. Try this; add a redirect (www.google.co.uk) to your coupon, then claim it and click use now; you will see it redirect to the location you set (you will see something like this https://www.google.co.uk/?validation_code=4eiq4s&unique_scan_code=4eiq4smxd991spa3cx6c&gws_rd=ssl ). Now (imagine you receive payment) , go to the test it yourself options ( validation widget & API in the menu )and open "validate a coupon via scan id" . Copy and paste the (example code; 4eiq4smxd991spa3cx6c ) and click the blue button Make API call. How does it work? Payment Integration - Can redemption be made based on a payment to for instance a Paypal account?


Payment Integration

Payment Integration Demo

Can redemption be made based on a payment to for instance a Paypal account? Check the video...




 





API documentation
Please also check our
POS Integration Documentation to get even more detailed information about the use of our API. Furthermore, your (test)account has the ability to check our API’s functionality right off the bat, without even implementing it.



API Documentation

How to use our API

Please check our API documentation below for WHITE LABEL and NORMAL accounts. Furthermore, your (trial)account has the ability to check our API’s functionality right off the bat, without even implementing it.



White label
Normal account
Shadow On Qr2coupon Site


START FREE TRIAL
PRICING
NO CREDITCARD REQUIRED OUR PRICINGS IN € AND $
Start your free no-risk trial! Pricing for Coupons, White Label, Scratch & Win

Build Your Mobile Project

Call us for support :

+31 (0)84 003 0530

General info:

info@qr2coupon.net

Media Inquiries:

support@qr2coupon.net

Request a call back

Name :*  
E-mail :*  
Phone Number :  
Message :  
 

The fields with a red * are required.