Interactive REST API: Coupon Request Command
This example demonstrates the command a user would make to via the interactive REST web-service to request a coupon.
Note: A coupon may be send back without be formally requested. Also a business account is required to utilize this API.
Data Formats Sent and Received
HTTPS POST - REST
REST API Parameters
This is the name of an item the user is interested in.
The attribute of the name in the object parameter the user wants information on.
Verb applies more to a condition of the value in the target field.
This is usually today's date in XML Format YYYY-MM-DD.
This allows the user to further refine the value in target.
This is the 2 letter state or province code at the user's current location.
This is the postal code at the user's current location.
The latitude in radians of the user's location.
The longitude in radians of the user's location.
The ISO3 country code.
The UTC offset in minutes from the user's local time.
This is the arghon developer key.
API Response XML Fields
A name that describes the answer. In most cases it's the value in the target parameter from the request.
Tells the success or failure of the request.
Each answer is rated for an age appropriate audience.
See AnswerFormatType in the xsd specification file.
An answer can be a list or a single value.
Set to 1 if the result can be cached.
This is a number that communicates quantity, price or value.
This is the answer to the users request (question).
A optional expire date. Primarily used for holding the expiration date of a coupon.
A URL to an image of the product or service.
The URL Arghon connects to is specified by you on the developer profile page in the communication url field.
REST Request of user asking for a coupon:
https://yourwebsite.com/services/arghoninteractive/ HTTP POST
Example XML response to coupon request:
<value>We have a $2.45 per case coupon from now through 12/19/2014</value>