Welcome‎ > ‎Version 2‎ > ‎Publisher Api (Read/Write)‎ > ‎Methods‎ > ‎5 - Miscellaneous‎ > ‎

Voucher

Method used for retrieving details to print a voucher.

Method: /api/v2/publisher/voucher?secretKey={secretKey}&code={code}
Authentication: oauth

Required Parameters:
  secretKey - The secret key associated with the voucher.  This is to protect against tampering.
  code
- The code associated with the voucher

Optional Parameters:
  none

Returns:
  A Voucher.

Sample Request:
GET /api/v2/publisher/voucher?secretKey=JNZnzeylec8CS4rRvrbmV64ApiioSNfy&code=F-1ED-00-5D5 HTTP/1.1

Authorization: OAuth oauth_signature="tyrSSeTfG5im4FNpqKGy28eB9sE%3d", oauth_nonce="492304", oauth_timestamp="1304618285", oauth_consumer_key="43c5c674-620c-4f2b-bdcf-3082c99e8186", oauth_signature_method="HMAC-SHA1", oauth_version="1.0"

Host: apitest.groupcommerce.com


Sample XML Response:
<voucherResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
    <version>1</version>
    <success>true</success>
    <lastPublished>2011-05-05T18:03:40.7995133Z</lastPublished>
    <data>
        <expirationDate>2012-04-10T00:00:00</expirationDate>
        <fineprint>&lt;p&gt;The offer is final and nonrefundable. Redemption of this offer is subject to normal availability; please call at least two days in advance of desired dates. Offer must be redeemed by March 1, 2011. Must be at least 21 years of age to consume alcohol. Offer does not include tax and gratuity. Tax will be calculated at checkout. You're getting a sick deal so please make sure to tip on the full value, you cheap bastard.&lt;/p&gt;</fineprint>
        <headline>Haircut Concierge from Frank's Chop Shop</headline>
        <howToText>
            &lt;p&gt;What's Next:&lt;br /&gt;&#xD;
            1. Purchase.&lt;br /&gt;&#xD;
            2. Contact Frank&amp;rsquo;s Chop Shop using the number provided on your Rewards certificate to make your reservation.&lt;br /&gt;&#xD;
            3. Enjoy your cut, cocktail, and FCS experience&lt;/p&gt;
        </howToText>
        <merchant>
            <address>
                <city>New York</city>
                <country>US</country>
                <latitude>12.34</latitude>
                <longitude>-67.89</longitude>
                <name i:nil="true"/>
                <postalCode>10002</postalCode>
                <state>NY</state>
                <street1>19 Essex St </street1>
                <street2>b/w Hester and Canal St.</street2>
            </address>
            <companyName>Frank's Chop Shop</companyName>
            <id>1013</id>
            <phone>212-555-1211</phone>
            <website>http://www.frankschopshop.com</website>
        </merchant>
        <nameOnVoucher>noahfriend </nameOnVoucher>
        <offerId>126</offerId>
        <offerOptionId>82</offerOptionId>
        <pricing>
            <currency>USD</currency>
            <originalPrice>140</originalPrice>
            <price>70</price>
            <promotionalPrice>0</promotionalPrice>
        </pricing>
        <redemptionInstructions>
            &lt;p&gt;What's Next:&lt;br /&gt;&#xD;
            1. Purchase.&lt;br /&gt;&#xD;
            2. Contact Frank&amp;rsquo;s Chop Shop using the number provided on your Rewards certificate to make your reservation.&lt;br /&gt;&#xD;
            3. Enjoy your cut, cocktail, and FCS experience&lt;/p&gt;
        </redemptionInstructions>
        <segmentKey>ny</segmentKey>
        <subtitle>Half-off Cuts, free scotch &amp; a table reservation at Milk and Honey</subtitle>
        <voucherCode>F-1ED-00-5D5</voucherCode>
        <voucherTitle>Frank's Chop Shop</voucherTitle>
    </data>
</voucherResult>


Sample JSON Response:
{
    "version": "1",
    "success": true,
    "lastPublished": "\/Date(1304473498391)\/",
    "data": {
        "expirationDate": "\/Date(1334030400000-0400)\/",
        "fineprint": "<p>The offer is final and nonrefundable. Redemption of this offer is subject to normal availability; please call at least two days in advance of desired dates. Offer must be redeemed by March 1, 2011. Must be at least 21 years of age to consume alcohol. Offer does not include tax and gratuity. Tax will be calculated at checkout. You're getting a sick deal so please make sure to tip on the full value, you cheap bastard.<\/p>",
        "headline": "Haircut Concierge from Frank's Chop Shop",
        "howToText": "<p>What's Next:<br \/>\u000d\u000a1. Purchase.<br \/>\u000d\u000a2. Contact Frank&rsquo;s Chop Shop using the number provided on your Rewards certificate to make your reservation.<br \/>\u000d\u000a3. Enjoy your cut, cocktail, and FCS experience<\/p>",
        "merchant": {
            "address": {
                "city": "New York",
                "country": "US",
                "latitude": 12.34,
                "longitude": -56.78,
                "name": null,
                "postalCode": "10002",
                "state": "NY",
                "street1": "19 Essex St ",
                "street2": "b\/w Hester and Canal St."
            },
            "companyName": "Frank's Chop Shop",
            "id": 1013,
            "phone": "212-555-1211",
            "website": "http:\/\/www.frankschopshop.com"
        },
        "nameOnVoucher": "noahfriend ",
        "offerId": 126,
        "offerOptionId": 82,
        "pricing": {
            "currency": "USD",
            "originalPrice": 140,
            "price": 70,
            "promotionalPrice": 0
        },
        "redemptionInstructions": "<p>What's Next:<br \/>\u000d\u000a1. Purchase.<br \/>\u000d\u000a2. Contact Frank&rsquo;s Chop Shop using the number provided on your Rewards certificate to make your reservation.<br \/>\u000d\u000a3. Enjoy your cut, cocktail, and FCS experience<\/p>",
        "segmentKey": "ny",
        "subtitle": "Half-off Cuts, free scotch & a table reservation at Milk and Honey",
        "voucherCode": "F-1ED-00-5D5",
        "voucherTitle": "Frank's Chop Shop"
    }
}

Comments