Welcome‎ > ‎Version 2‎ > ‎Publisher Api (Read/Write)‎ > ‎Methods‎ > ‎1 - Offer‎ > ‎

By Id

Will get the offer details for a specific offer.

Method: /api/v2/publisher/offer/{offerId}

RequiredParameters:
 
offerId - The id of the offer.

Returns:
  An Offer Detail

Sample Request:
GET http://api.groupcommerce.local/api/v2/publisher/offer/174 HTTP/1.1

Authorization: OAuth oauth_signature="MZPFch0HWxwdBGKFzc2pt2Ji%2bAY%3d", oauth_nonce="8861202", oauth_timestamp="1305315463", oauth_consumer_key="43c5c674-620c-4f2b-bdcf-3082c99e8186", oauth_signature_method="HMAC-SHA1", oauth_version="1.0"

Host: apitest.groupcommerce.com

Sample XML Response:
<offerDetail xmlns="http://schemas.datacontract.org/2004/07/RestApiEnd.Models" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
    <version xmlns="">2.0</version>
    <success xmlns="">true</success>
    <lastPublished xmlns="">2011-05-13T20:23:33.3875247Z</lastPublished>
    <data>
        <copy>&lt;p&gt;Description&lt;/p&gt;</copy>
        <customFields>
            <field>
                <key>AdditionalCopy</key>
                <value i:nil="true"/>
            </field>
            <field>
                <key>AdditionalCopy2</key>
                <value i:nil="true"/>
            </field>
            <field>
                <key>AdditionalCopy3</key>
                <value i:nil="true"/>
            </field>
            <field>
                <key>EmailSubjectLine</key>
                <value>email subject line</value>
            </field>
        </customFields>
        <endDate>2012-01-30T05:00:00</endDate>
        <fineprint>&lt;p&gt;Fine print&lt;/p&gt;</fineprint>
        <hasEnded>false</hasEnded>
        <hasSoldOut>false</hasSoldOut>
        <headline>This is the DEAL title</headline>
        <highlights>
            &lt;ol&gt;&#xD;
            &lt;li&gt;highlights&lt;/li&gt;&#xD;
            &lt;/ol&gt;
        </highlights>
        <images>
            <image>
                <caption i:nil="true"/>
                <displayOrder>1</displayOrder>
                <isOfferImage>True</isOfferImage>
                <size>620x270</size>
                <tags/>
                <url>http://gcs-dev.s3.amazonaws.com/shared/images/deals/114/174/hatch.png</url>
            </image>
        </images>
        <locations>
            <address>
                <city>New York</city>
                <country>US</country>
                <latitude>4</latitude>
                <longitude>5</longitude>
                <name i:nil="true"/>
                <postalCode>x</postalCode>
                <state>NY</state>
                <street1>x</street1>
                <street2 i:nil="true"/>
            </address>
        </locations>
        <maxQuantityPerBuyer>100</maxQuantityPerBuyer>
        <merchant>
            <address>
                <city>New York</city>
                <country>US</country>
                <latitude>4</latitude>
                <longitude>5</longitude>
                <name i:nil="true"/>
                <postalCode>x</postalCode>
                <state>NY</state>
                <street1>x</street1>
                <street2 i:nil="true"/>
            </address>
            <companyName>Manhattan Kayak Company</companyName>
            <id>6</id>
            <phone>x</phone>
            <website>http://www.manhattankayak.com/blogs/</website>
        </merchant>
        <offerId>174</offerId>
        <rank>0</rank>
        <redemptionInstructions i:nil="true"/>
        <segments>
            <segment>
                <key>new-york</key>
                <name>New York</name>
            </segment>
        </segments>
        <startDate>2010-12-21T05:00:00</startDate>
        <subtitle>This is the subtitle</subtitle>
        <url>http://dealstest.dailycandy.com/deal/174/this-is-the-deal-title</url>
        <demandStrategy>NotSpecified</demandStrategy>
        <numberSold>10</numberSold>
        <options>
            <option>
                <blurb>&lt;p&gt;Description&lt;/p&gt;</blurb>
                <hasSoldOut>false</hasSoldOut>
                <inventoryRemaining>990</inventoryRemaining>
                <maxQuantity>1000</maxQuantity>
                <numberSold>10</numberSold>
                <offerOptionId>125</offerOptionId>
                <pricing>
                    <currency>USD</currency>
                    <originalPrice>100</originalPrice>
                    <price>15</price>
                    <promotionalPrice i:nil="true"/>
                    <discountPercent>85.00</discountPercent>
                    <savings>85</savings>
                </pricing>
                <title>This is the DEAL title</title>
            </option>
        </options>
        <offerKey>this-is-the-deal-title</offerKey>
        <pricingStrategy>NotSpecified</pricingStrategy>
        <video i:nil="true"/>
    </data>
</offerDetail>


Sample JSON Response:
{
    "version": "2.0",
    "success": true,
    "lastPublished": "\/Date(1305318889419)\/",
    "data": {
        "copy": "<p>Description<\/p>",
        "customFields": [
            {
                "Key": "AdditionalCopy",
                "Value": null
            },
            {
                "Key": "AdditionalCopy2",
                "Value": null
            },
            {
                "Key": "AdditionalCopy3",
                "Value": null
            },
            {
                "Key": "EmailSubjectLine",
                "Value": "email subject line"
            }
        ],
        "endDate": "\/Date(1327917600000-0500)\/",
        "fineprint": "<p>Fine print<\/p>",
        "hasEnded": false,
        "hasSoldOut": false,
        "headline": "This is the DEAL title",
        "highlights": "<ol>\u000d\u000a<li>highlights<\/li>\u000d\u000a<\/ol>",
        "images": [
            {
                "caption": null,
                "displayOrder": "1",
                "isOfferImage": "True",
                "size": "620x270",
                "tags": [
                   
                ],
                "url": "http:\/\/gcs-dev.s3.amazonaws.com\/shared\/images\/deals\/114\/174\/hatch.png"
            }
        ],
        "locations": [
            {
                "city": "New York",
                "country": "US",
                "latitude": 4,
                "longitude": 5,
                "name": null,
                "postalCode": "x",
                "state": "NY",
                "street1": "x",
                "street2": null
            }
        ],
        "maxQuantityPerBuyer": 100,
        "merchant": {
            "address": {
                "city": "New York",
                "country": "US",
                "latitude": 4,
                "longitude": 5,
                "name": null,
                "postalCode": "x",
                "state": "NY",
                "street1": "x",
                "street2": null
            },
            "companyName": "Manhattan Kayak Company",
            "id": 6,
            "phone": "x",
            "website": "http:\/\/www.manhattankayak.com\/blogs\/"
        },
        "offerId": 174,
        "rank": 0,
        "redemptionInstructions": null,
        "segments": [
            {
                "key": "new-york",
                "name": "New York"
            }
        ],
        "startDate": "\/Date(1292925600000-0500)\/",
        "subtitle": "This is the subtitle",
        "url": "http:\/\/dealstest.dailycandy.com\/deal\/174\/this-is-the-deal-title",
        "demandStrategy": "NotSpecified",
        "numberSold": 10,
        "options": [
            {
                "blurb": "<p>Description<\/p>",
                "hasSoldOut": false,
                "inventoryRemaining": 990,
                "maxQuantity": 1000,
                "numberSold": 10,
                "offerOptionId": 125,
                "pricing": {
                    "currency": "USD",
                    "originalPrice": 100,
                    "price": 15,
                    "promotionalPrice": null,
                    "discountPercent" : 85.00,
                    "savings" : 15
                },
                "title": "This is the DEAL title"
            }
        ],
        "offerKey": "this-is-the-deal-title",
        "pricingStrategy": "NotSpecified",
        "video": null
    }
}

Comments