Welcome‎ > ‎Version 2‎ > ‎Publisher Api (Read/Write)‎ > ‎Methods‎ > ‎3 - Consumer‎ > ‎

Orders

Method used for retrieving orders by a consumer.

It will contain a list of Order Details.  For example, if a consumer makes the following purchase:

2 for themselves
1 for a friend
3 for another friend

The result object will contain 3 order details

OD1 will contain 2 voucher records.
OD2 will be marked as gift and contain 1 voucher record.
OD3 will be marked as gift and contain 3 voucher records.

Method: /api/v2/publisher/consumer/{userKey}/orders
Authentication: oauth

Required Parameters:
  userKey - The publisher assigned userKey for the consumer.

Optional Parameters:
  none

Returns:
  List of Order

Sample Request:
GET /api/v2/publisher/consumer/5509477/orders HTTP/1.1

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


Host: apitest.groupcommerce.com

Sample XML Response:
<orders xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
    <version>2.0</version>
    <success>true</success>
    <lastPublished>2011-05-05T23:40:06.763337Z</lastPublished>
    <data>
        <order>
            <amount>70</amount>
            <expirationDate>2012-04-10T00:00:00</expirationDate>
            <gifts>
                <gift>
                    <firstName>noahfriend</firstName>
                    <lastName i:nil="true"/>
                </gift>
            </gifts>
            <headline>Haircut Concierge from Frank’s Chop Shop</headline>
            <merchantName>Frank's Chop Shop</merchantName>
            <offerId>126</offerId>
            <offerOptionId>82</offerOptionId>
            <optionTitle>Haircut Concierge from Frank’s Chop Shop</optionTitle>
            <orderDate>2010-11-23T21:38:28</orderDate>
            <segmentKey>ny</segmentKey>
            <subtitle>Half-off Cuts, free scotch &amp; a table reservation at Milk and Honey</subtitle>
            <vouchers>
                <voucher>
                    <redemptionUrl i:nil="true"/>
                    <voucherUrl>http://rewards.staging.thrillist.com/voucher?SecretKey=JNZnzeylec%2bg%2f67fjw41z64ApiioSNfy&amp;Code=F-1EE-00-75C</voucherUrl>
                </voucher>
            </vouchers>
        </order>
        <order>
            <amount>70</amount>
            <expirationDate>2012-04-10T00:00:00</expirationDate>
            <gifts>
                <gift>
                    <firstName>noahfriend</firstName>
                    <lastName i:nil="true"/>
                </gift>
            </gifts>
            <headline>Haircut Concierge from Frank’s Chop Shop</headline>
            <merchantName>Frank's Chop Shop</merchantName>
            <offerId>126</offerId>
            <offerOptionId>82</offerOptionId>
            <optionTitle>Haircut Concierge from Frank’s Chop Shop</optionTitle>
            <orderDate>2010-11-23T21:36:33</orderDate>
            <segmentKey>ny</segmentKey>
            <subtitle>Half-off Cuts, free scotch &amp; a table reservation at Milk and Honey</subtitle>
            <vouchers>
                <voucher>
                    <redemptionUrl i:nil="true"/>
                    <voucherUrl>http://rewards.staging.thrillist.com/voucher?SecretKey=JNZnzeylec8CS4rRvrbmV64ApiioSNfy&amp;Code=F-1ED-00-5D5</voucherUrl>
                </voucher>
            </vouchers>
        </order>
    </data>
    <metaData>
        <pageCount>1</pageCount>
        <pageNumber>1</pageNumber>
        <pageSize>7</pageSize>
        <totalItems>7</totalItems>
    </metaData>
</orders>


Sample JSON Response:
{
    "version": "2.0",
    "success": true,
    "lastPublished": "\/Date(1304638888462)\/",
    "data": [
        {
            "amount": 70,
            "expirationDate": "\/Date(1334016000000+0000)\/",
            "gifts": [
                {
                    "firstName": "noahfriend",
                    "lastName": null
                }
            ],
            "headline": "Haircut Concierge from Frank’s Chop Shop",
            "merchantName": "Frank's Chop Shop",
            "offerId": 126,
            "offerOptionId": 82,
            "optionTitle": "Haircut Concierge from Frank’s Chop Shop",
            "orderDate": "\/Date(1290548308000+0000)\/",
            "segmentKey": "ny",
            "subtitle": "Half-off Cuts, free scotch & a table reservation at Milk and Honey",
            "vouchers": [
                {
                    "redemptionUrl": null,
                    "voucherUrl": "http:\/\/rewards.staging.thrillist.com\/voucher?SecretKey=JNZnzeylec%2bg%2f67fjw41z64ApiioSNfy&Code=F-1EE-00-75C"
                }
            ]
        },
        {
            "amount": 70,
            "expirationDate": "\/Date(1334016000000+0000)\/",
            "gifts": [
                {
                    "firstName": "noahfriend",
                    "lastName": null
                }
            ],
            "headline": "Haircut Concierge from Frank’s Chop Shop",
            "merchantName": "Frank's Chop Shop",
            "offerId": 126,
            "offerOptionId": 82,
            "optionTitle": "Haircut Concierge from Frank’s Chop Shop",
            "orderDate": "\/Date(1290548193000+0000)\/",
            "segmentKey": "ny",
            "subtitle": "Half-off Cuts, free scotch & a table reservation at Milk and Honey",
            "vouchers": [
                {
                    "redemptionUrl": null,
                    "voucherUrl": "http:\/\/rewards.staging.thrillist.com\/voucher?SecretKey=JNZnzeylec8CS4rRvrbmV64ApiioSNfy&Code=F-1ED-00-5D5"
                }
            ]
        }
    ],
    "metaData": {
        "pageCount": 1,
        "pageNumber": 1,
        "pageSize": 7,
        "totalItems": 7
    }
}
Comments