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
Host: apitest.groupcommerce.com Sample XML Response: <orders xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> 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 } } |